OpenAPI Specification
openapi: 3.0.1
info:
description: Activity Log
title: CarbonHub activities estimation_methods API
version: 1.0.0
servers:
- url: https://api.validere.io
security:
- Staging: []
- Integration: []
- Local: []
tags:
- description: Estimation Methods
name: estimation_methods
paths:
/app/v1/estimation_methods/:
post:
operationId: bulk_add_estimation_method
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/BulkAddEstimationMethodToEntitiesRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CreateEstimationMethodsBulkResponse'
description: Successfully Created Estimation Methods in bulk
summary: Bulk create estimation methods
tags:
- estimation_methods
/app/v1/estimation_methods/run:
post:
deprecated: true
operationId: run_estimation_methods
parameters:
- $ref: '#/components/parameters/PreviewCalculation'
- $ref: '#/components/parameters/PromoteCalculation'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorRunsFilter'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorRunsResponse'
description: Successfully ran estimation method calculations
summary: Run calculators based on filtered configurations
tags:
- estimation_methods
/app/v2/estimation_methods/run:
post:
operationId: run_estimation_methods_v2
parameters:
- $ref: '#/components/parameters/PreviewCalculation'
- $ref: '#/components/parameters/PromoteCalculation'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorRunsFilter'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorRunsBulkResponse'
description: Successfully ran estimation method calculations
summary: Bulk run calculators based on filtered configurations
tags:
- estimation_methods
/app/v2/estimation_methods/run_async:
post:
operationId: run_async_estimation_methods_v2
parameters:
- $ref: '#/components/parameters/PreviewCalculation'
- $ref: '#/components/parameters/PromoteCalculation'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorRunsFilter'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorAsyncRunsBulkResponse'
description: Successfully starts an asynchronous job to run estimation method calculations
summary: Start an asynchronous job to bulk run calculators based on filtered configurations
tags:
- estimation_methods
/app/v1/estimation_methods/search:
post:
operationId: search_estimation_methods
parameters:
- $ref: '#/components/parameters/parameters-Period'
requestBody:
content:
application/json:
schema:
type: object
allOf:
- $ref: '#/components/schemas/Paginated'
- $ref: '#/components/schemas/EstimationMethodSort'
- $ref: '#/components/schemas/EstimationMethodFilter'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PagedEstimationMethodList'
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
schema:
$ref: '#/components/schemas/XLSXResponse'
description: Successfully something
summary: Search and list Estimation Methods
tags:
- estimation_methods
/app/v1/estimation_methods/search/configurations:
post:
operationId: search_estimation_method_configurations
requestBody:
content:
application/json:
schema:
type: object
allOf:
- $ref: '#/components/schemas/Paginated'
- $ref: '#/components/schemas/EstimationMethodConfigurationSort'
- $ref: '#/components/schemas/EstimationMethodConfigurationFilter'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PagedEstimationMethodWithConfigurationList'
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
schema:
$ref: '#/components/schemas/XLSXResponse'
description: Successfully something
summary: Search and list Estimation Methods with calculator configs and runs
tags:
- estimation_methods
/app/v1/estimation_methods/export:
post:
operationId: export_estimation_methods
requestBody:
content:
application/json:
schema:
type: object
allOf:
- $ref: '#/components/schemas/EstimationMethodSort'
- $ref: '#/components/schemas/EstimationMethodFilter'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ReportWithS3Url'
description: A successful with the link to download report
summary: Export estimation methods based on search input
tags:
- estimation_methods
/app/v1/estimation_methods/export/configurations:
post:
operationId: export_estimation_method_configurations
requestBody:
content:
application/json:
schema:
type: object
allOf:
- $ref: '#/components/schemas/EstimationMethodConfigurationSort'
- $ref: '#/components/schemas/EstimationMethodConfigurationFilter'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ReportWithS3Url'
description: A successful with the link to download report
summary: Search and export Estimation Methods with calculator configs and runs
tags:
- estimation_methods
/app/v1/estimation_methods/{entity_type}:
post:
operationId: add_estimation_method
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AddEstimationMethodToEntityRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/EstimationMethodWithEntityInfoResponse'
description: Successfully Added Estimation Method to Entity
summary: Add Estimation Method to Entity
tags:
- estimation_methods
/app/v1/estimation_methods/{entity_type}/{id}:
get:
operationId: get_estimation_method
parameters:
- $ref: '#/components/parameters/parameters-EstimationMethodEntityType'
- $ref: '#/components/parameters/parameters-EstimationMethodId'
- $ref: '#/components/parameters/parameters-Period'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/EstimationMethodWithReportingGroupsResponse'
description: Successfully retrieved an estimation event
summary: Get an estimation method
tags:
- estimation_methods
put:
operationId: update_estimation_method
parameters:
- $ref: '#/components/parameters/parameters-EstimationMethodEntityType'
- $ref: '#/components/parameters/parameters-EstimationMethodId'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateEstimationMethodRequestBody'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateEstimationMethodResponse'
description: Successfully updated an estimation event
summary: Update an estimation method
tags:
- estimation_methods
delete:
operationId: delete_estimation_method
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
responses:
'200':
description: A successful operation
summary: Delete an estimation method
tags:
- estimation_methods
/app/v1/estimation_methods/{entity_type}/{id}/runs:
get:
operationId: list_estimation_method_runs
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/SortBy'
- $ref: '#/components/parameters/SortDirection'
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Pagination'
- $ref: '#/components/schemas/CalculatorRunsResponse'
description: Successfully return runs for a given estimation method
summary: List runs for a given estimation method
tags:
- estimation_methods
/app/v1/estimation_methods/{entity_type}/{id}/configuration/{year_month}:
get:
operationId: get_estimation_method_configuration
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/EstimationMethodConfiguration'
description: Successfully retrieved an estimation method configuration
summary: Get an estimation method configuration
tags:
- estimation_methods
put:
operationId: update_estimation_method_configuration
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SetCalculatorConfigurationRequestBody'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/EstimationMethodConfiguration'
description: Successfully updated an estimation method configuration
summary: Update an estimation method configuration
tags:
- estimation_methods
/app/v1/estimation_methods/{entity_type}/{id}/configuration/{year_month}/apply_defaults:
put:
operationId: apply_defaults_estimation_method_configuration
parameters:
- $ref: '#/components/parameters/parameters-EstimationMethodEntityType'
- $ref: '#/components/parameters/parameters-EstimationMethodId'
- $ref: '#/components/parameters/parameters-YearMonth'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ApplyDefaultsEstimationMethodConfigurationResponse'
description: Successfully set defaults on the calculator configuration
summary: Re-apply defaults to a calculator configuration
tags:
- estimation_methods
/app/v1/estimation_methods/configurations/apply_defaults:
put:
operationId: bulk_apply_defaults_estimation_method_configuration
requestBody:
content:
application/json:
schema:
type: array
items:
type: object
properties:
estimation_method_id:
type: string
format: uuid
year_month:
type: string
required: true
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/BulkResponse'
- properties:
data:
description: Dictionary of results where the key is {Estimation method ID}_{Year month}
type: object
additionalProperties:
properties:
status:
$ref: '#/components/schemas/BulkItemStatus'
error:
type: string
errors:
type: array
description: List of errors
items:
$ref: '#/components/schemas/CalculationResultError'
data:
type: object
properties:
estimation_method_id:
type: string
format: UUID
year_month:
type: string
calculation_status:
$ref: '#/components/schemas/CalculationStatus'
description: Successfully set defaults on the calculator configurations
summary: Re-apply defaults to multiple calculator configurations
tags:
- estimation_methods
/app/v1/estimation_methods/configurations/apply_defaults_async:
post:
operationId: bulk_apply_defaults_estimation_method_configuration_async
requestBody:
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/EstimationMethodConfigurationFilter'
- properties:
year_months:
type: array
items:
type: string
example: 202212
required: true
responses:
'200':
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/BulkResponse'
- properties:
job:
$ref: '#/components/schemas/Job'
description: Successfully starts an asynchronous job to set defaults on the calculator configurations
summary: Start an asynchronous job to re-apply defaults to multiple calculator configurations
tags:
- estimation_methods
/app/v1/estimation_methods/{entity_type}/{id}/configuration/{year_month}/run:
get:
operationId: get_estimation_method_configuration_run
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorRunSourceResponse'
description: Successfully retrieved a calculator run
summary: Get a calculator run
tags:
- estimation_methods
post:
operationId: run_estimation_method_configuration
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
- $ref: '#/components/parameters/PreviewCalculation'
- $ref: '#/components/parameters/PromoteCalculation'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorRunSourceResponse'
description: Successfully ran estimation method calculations
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorRun422Error'
description: Calculator validation error
summary: Run estimation method calculator for a single period
tags:
- estimation_methods
/app/v1/estimation_methods/{entity_type}/{id}/record/{year_month}/{input_name}:
put:
operationId: set_calculator_input_record
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
- $ref: '#/components/parameters/EstimationMethodInputName'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorInputRecordInput'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorInputRecord'
description: Successfully updated calculator input record
summary: Set the input record for a given calculator configuration
tags:
- estimation_methods
get:
operationId: get_calculator_input_record
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
- $ref: '#/components/parameters/EstimationMethodInputName'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorInputRecord'
description: A successful operation
summary: Get the input record for a given calculator configuration
tags:
- estimation_methods
delete:
operationId: delete_calculator_input_record
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
- $ref: '#/components/parameters/EstimationMethodInputName'
responses:
'200':
description: A successful operation
summary: Delete the input record for a given calculator configuration
tags:
- estimation_methods
/app/v1/estimation_methods/{entity_type}/{id}/record/{year_month}/{target_asset_id}/{input_name}:
put:
operationId: set_calculator_input_record_target_asset
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
- $ref: '#/components/parameters/EstimationMethodTargetAssetId'
- $ref: '#/components/parameters/EstimationMethodInputName'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorInputRecordInput'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorInputRecord'
description: Successfully updated calculator input record on target asset
summary: Set the input record for a given calculator configuration and target asset
tags:
- estimation_methods
get:
operationId: get_calculator_input_record_target_asset
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
- $ref: '#/components/parameters/EstimationMethodTargetAssetId'
- $ref: '#/components/parameters/EstimationMethodInputName'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CalculatorInputRecord'
description: A successful operation
summary: Get the input record for a given calculator configuration and target asset
tags:
- estimation_methods
delete:
operationId: delete_calculator_input_record_target_asset
parameters:
- $ref: '#/components/parameters/EstimationMethodEntityType'
- $ref: '#/components/parameters/EstimationMethodId'
- $ref: '#/components/parameters/YearMonth'
- $ref: '#/components/parameters/EstimationMethodTargetAssetId'
- $ref: '#/components/parameters/EstimationMethodInputName'
responses:
'200':
description: A successful operation
summary: Delete the input record for a given calculator configuration and target asset
tags:
- estimation_methods
components:
schemas:
CalculatorRunsFilter:
type: object
properties:
filters:
allOf:
- properties:
year_month:
type: string
example: 202306
status:
$ref: '#/components/schemas/CalculationStatus'
estimation_method_id:
format: uuid
type: string
estimation_method.name:
type: string
estimation_method.analytics_calculator_id:
$ref: '#/components/schemas/EstimationMethodCalculatorId'
estimation_method.analytics_library_id:
$ref: '#/components/schemas/EstimationMethodLibraryId'
estimation_method.entity_id:
$ref: '#/components/schemas/EstimationMethodEntityId'
estimation_method.entity_type:
type: string
enum:
- equipment
- flow
- asset_group
estimation_method.reporting_group_id:
type: string
entity_name:
type: string
entity_type:
type: string
enum:
- equipment
- flow
- asset_group
facility.id:
type: string
format: uuid
facility.name:
type: string
- $ref: '#/components/schemas/EquipmentPrimaryFilterFieldsWithPrefix'
- $ref: '#/components/schemas/FlowPrimaryFilterFieldsWithPrefix'
- $ref: '#/components/schemas/EquipmentFacilityPrimaryFilterFieldsWithPrefix'
- $ref: '#/components/schemas/FlowFacilityPrimaryFilterFieldsWithPrefix'
- $ref: '#/components/schemas/FlowEquipmentPrimaryFilterFieldsWithPrefix'
- $ref: '#/components/schemas/AssetGroupFilterWithPrefix'
CalculatorResultRecordValueConfiguration:
properties:
configuration_type:
type: string
enum:
- calculator_result
aggregate_function:
$ref: '#/components/schemas/RecordValueConfigurationFunction'
calculator_result_ids:
type: array
items:
format: uuid
type: string
type: object
EquipmentStatus:
type: string
enum:
- active
- inactive
- deprecated
FlowTypes:
type: string
description: Use `id` value of any index in `GET /v1/flow_types`
AssetGroupFilterWithPrefix:
properties:
asset_group.id:
type: string
asset_group.name:
type: string
asset_group.status:
$ref: '#/components/schemas/AssetGroupStatus'
asset_group.asset_group_type_id:
type: string
asset_group.custom_attributes:
type: object
type: object
XLSXResponse:
format: binary
type: string
CalculatorRun422Error:
properties:
status:
type: boolean
error:
type: string
description: Error message
example: Validation failed for node 9a911b4d-c6c9-4faa-acbe-f8297b1dbd6d_202403, calculation CO2InjectedMassFlowMeterV1
detail:
type: object
properties:
errors:
type: array
description: List of errors
items:
$ref: '#/components/schemas/CalculationResultError'
CalculatorRunSourceResponse:
type: object
allOf:
- $ref: '#/components/schemas/CalculatorRunResponse'
- type: object
properties:
input_sources:
$ref: '#/components/schemas/CalculatorRunInputSources'
CalculatorAsyncRunsBulkResponse:
allOf:
- $ref: '#/components/schemas/BulkResponse'
- properties:
job:
$ref: '#/components/schemas/Job'
CalculatorInputParameter:
properties:
id:
type: string
example: mass_injected
display_name:
type: string
example: Mass Injected
required:
type: boolean
example: true
measurement_quantity:
type: string
example: Mass CO2
measurement_type:
type: string
example: Mass
measurement_unit:
type: string
example: grams
description:
type: string
example: Mass of CO2 injected
type:
type: string
example: number
minimum:
type: number
example: 0
maximum:
type: number
example: 100
min_length:
type: number
example: 0
mex_length:
type: number
example: 100
measurement_value:
type: number
example: 25400
CustomAttributes:
example:
attribute1: 12345
attribute2: value1
type: object
EstimationMethodConfigurationWithoutInputSources:
properties:
estimation_method_id:
format: uuid
type: string
inputs:
$ref: '#/components/schemas/AnalyticsCalculatorInputs'
asset_inputs:
$ref: '#/components/schemas/AnalyticsCalculatorAssetInputs'
calculator_version:
type: string
example: V1
created_at:
format: date-time
type: string
updated_at:
format: date-time
type: string
created_by:
format: uuid
type: string
updated_by:
format: uuid
type: string
company_id:
type: string
format: uuid
CalculationResultError:
description: Calculation specific error
type: object
properties:
loc:
description: Parameter where the error occurred
type: string
example: mass_injected
msg:
description: Error message
type: string
example: Field required
type:
description: Type of error
type: string
example: missing
JobStatus:
type: string
enum:
- started
- finished
- failed
- partial
PagedEstimationMethodWithConfigurationList:
allOf:
- $ref: '#/components/schemas/Pagination'
- properties:
data:
items:
allOf:
- $ref: '#/components/schemas/EstimationMethodWithRenamedStatusResponse'
- properties:
facility_id:
type: string
format: uuid
facility_name:
type: string
entity_name:
type: string
entity_type_type:
type: string
description: eg. equipment type or facility type
status:
$ref: '#/components/schemas/CalculationStatus'
calculator_configuration:
$ref: '#/components/schemas/EstimationMethodConfiguration'
calculator_run:
$ref: '#/components/schemas/CalculatorRunResponse'
reporting_groups:
type: array
items:
$ref: '#/components/schemas/ReportingGroupInput'
type: array
type: object
RecordValueConfigurationFunction:
type: string
enum:
- avg
- sum
EstimationMethodSearchResponse:
type: object
properties:
id:
type: string
format: uuid
company_id:
type: string
format: uuid
asset_id:
type: string
format: uuid
analytics_library_id:
type: string
minLength: 1
maxLength: 255
example: 2024-SubpartW
analytics_calculator_id:
type: string
minLength: 1
maxLength: 255
example: 2024-SubpartW-AcidGasRemovalMethod1
name:
type: string
minLength: 1
maxLength: 255
example: SubpartW AGR Method
status:
type: string
enum:
- active
- inactive
default_values:
type: object
additionalProperties:
type: object
properties:
value:
anyOf:
- type: string
- type: number
- nullable: true
- type: boolean
- nullable: true
unit:
type: string
measurement_type:
type: string
measurement_quantity:
type: string
required:
- value
example:
fuel_type:
value: Eastern
unit: ''
measurement_type: measurement_type
measurement_quantity: dimensionless_coefficient
volume:
value: 5
unit: e3m3
measurement_type: measurement_type
measurement_quantity: volume
default_asset_values:
type: object
additionalProperties:
type: object
additionalProperties:
type: object
properties:
value:
anyOf:
- type: string
- type: number
- nullable: true
- type: boolean
- nullable: true
unit:
type: string
measurement_type:
type: string
measurement_quantity:
type: string
required:
- value
example:
fuel_type:
value: Eastern
unit: ''
measurement_type: measurement_type
measurement_quantity: dimensionless_coefficient
volume:
value: 5
unit: e3m3
measurement_type: measurement_type
measurement_quantity: volume
example:
a04b4387-5145-4935-9edc-d53ecdb7a6c0:
fuel_type:
value: Eastern
unit: ''
measurement_type: measurement_type
measurement_quantity: dimensionless_coefficient
volume:
value: 5
unit: e3m3
measurement_type: measurement_type
measurement_quantity: volume
99a45dd3-6ce1-4290-9d16-79415111cc43:
fuel_type:
value: Eastern
unit: ''
measurement_type: measurement_type
measurement_quantity: dimensionless_coefficient
volume:
value: 5
unit: e3m3
measurement_type: measurement_type
measurement_quantity: volume
crea
# --- truncated at 32 KB (107 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/validere/refs/heads/main/openapi/validere-estimation-methods-api-openapi.yml