Metering API
- Base URL:
https://metering.sls.epilot.io - API Docs: https://docs.epilot.io/api/metering
Quick Start​
# List available operations
epilot metering
# Call an operation
epilot metering getCustomerMeters
Common Flags​
| Flag | Description |
|---|---|
-p key=value | Set a named parameter |
-d '{...}' | Request body JSON |
-H 'Key: Value' | Custom header |
-t, --token <token> | Bearer token for authentication |
--profile <name> | Use a named profile |
-s, --server <url> | Override server base URL |
-i, --include | Include response headers in output |
--json | Output raw JSON (no formatting) |
-v, --verbose | Verbose output (show request details) |
--jsonata <expr> | JSONata expression to transform response |
--definition <file> | Override OpenAPI spec file/URL |
--guided | Prompt for all parameters interactively |
--no-interactive | Disable interactive prompts |
Operations​
ECP
getCustomerMeters— Retrieves all meters related to a customer.getMetersByContractId— Retrieves all meters related to a contract.getMeter— Retrieves the details of a meter.updateMeter— Updates the details of a meter.getMeterCounters— Retrieves all counters for a given meter.getCounterDetails— Retrieves the details of a meter counter.createPortalMeterReadings— Inserts multiple meter readings at once for a given meter. Limited to 2 readings per request.
ECP Admin
createMeterReading— Inserts a new meter reading.createMeterReadings— Inserts multiple meter readings at once. Limited to 100 readings per request.batchWriteMeterReadings— Upserts/Deletes multiple meter readings at once. Limited to 100 readings per request.createMeterReadingFromSubmission— Creates a reading from a journey submission.getAllowedReadingForMeter— Get allowed reading for the given metercreateReadingWithMeter— Creates a reading along with a meter.getReadingsByInterval— Retrieves all readings specified in an interval.updateMeterReading— Updates a meter reading.deleteMeterReading— Deletes a meter reading.
getCustomerMeters​
Retrieves all meters related to a customer.
GET /v1/metering/meter
Sample Call
epilot metering getCustomerMeters
With JSONata filter:
epilot metering getCustomerMeters --jsonata 'data'
Sample Response
{
"data": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter",
"ma_lo_id": "A09-123",
"status": "active",
"meter_type": "three-phase-meter",
"tariff_type": "Peak load tariff",
"meter_number": "J-1093-1AK",
"sector": "power",
"location": [
{
"country": "Germany",
"city": "Koln",
"postal_code": 81475,
"street": "Melatengürtel",
"street_number": 71,
"additional_info": "5. Etage",
"_tags": ["billing", "delivery"]
}
],
"used_for": "Domestic Usage",
"manufacturer": "Energy One",
"calibration_date": "2022-10-10T00:00:00.000Z",
"contract": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"customer": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"journey_actions": {
"journey_id": "string",
"action_label": {
"en": "string",
"de": "string"
},
"slug": "string",
"rules": [
{
"entity": "string",
"attribute": "string",
"attribute_value": "string"
}
]
},
"last_reading": "2022-10-10T00:00:00.000Z",
"current_consumption": 100.5
}
]
}
getMetersByContractId​
Retrieves all meters related to a contract.
GET /v1/metering/contract/meters/{contract_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
contract_id | path | string (uuid) | Yes | The ID of the Contract. |
Sample Call
epilot metering getMetersByContractId \
-p contract_id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot metering getMetersByContractId 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot metering getMetersByContractId -p contract_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter",
"ma_lo_id": "A09-123",
"status": "active",
"meter_type": "three-phase-meter",
"tariff_type": "Peak load tariff",
"meter_number": "J-1093-1AK",
"sector": "power",
"location": [
{
"country": "Germany",
"city": "Koln",
"postal_code": 81475,
"street": "Melatengürtel",
"street_number": 71,
"additional_info": "5. Etage",
"_tags": ["billing", "delivery"]
}
],
"used_for": "Domestic Usage",
"manufacturer": "Energy One",
"calibration_date": "2022-10-10T00:00:00.000Z",
"contract": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"customer": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
}
}
]
}
getMeter​
Retrieves the details of a meter.
GET /v1/metering/meter/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | The ID of the meter. |
Sample Call
epilot metering getMeter \
-p id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot metering getMeter 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot metering getMeter -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": {
"entity": {
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter",
"ma_lo_id": "A09-123",
"status": "active",
"meter_type": "three-phase-meter",
"tariff_type": "Peak load tariff",
"meter_number": "J-1093-1AK",
"sector": "power",
"location": [
{
"country": "Germany",
"city": "Koln",
"postal_code": 81475,
"street": "Melatengürtel",
"street_number": 71,
"additional_info": "5. Etage",
"_tags": ["billing", "delivery"]
}
],
"used_for": "Domestic Usage",
"manufacturer": "Energy One",
"calibration_date": "2022-10-10T00:00:00.000Z",
"contract": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"customer": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
}
},
"journey_actions": {
"journey_id": "string",
"action_label": {
"en": "string",
"de": "string"
},
"slug": "string",
"rules": [
{
"entity": "string",
"attribute": "string",
"attribute_value": "string"
}
]
},
"relations": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z"
}
]
}
}
updateMeter​
Updates the details of a meter.
PATCH /v1/metering/meter/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string (uuid) | Yes | The ID of the meter. |
Request Body
Sample Call
epilot metering updateMeter \
-p id=123e4567-e89b-12d3-a456-426614174000 \
-d '{}'
Using positional args for path parameters:
epilot metering updateMeter 123e4567-e89b-12d3-a456-426614174000
Using stdin pipe:
cat body.json | epilot metering updateMeter -p id=123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot metering updateMeter -p id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": {
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter",
"ma_lo_id": "A09-123",
"status": "active",
"meter_type": "three-phase-meter",
"tariff_type": "Peak load tariff",
"meter_number": "J-1093-1AK",
"sector": "power",
"location": [
{
"country": "Germany",
"city": "Koln",
"postal_code": 81475,
"street": "Melatengürtel",
"street_number": 71,
"additional_info": "5. Etage",
"_tags": ["billing", "delivery"]
}
],
"used_for": "Domestic Usage",
"manufacturer": "Energy One",
"calibration_date": "2022-10-10T00:00:00.000Z",
"contract": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
},
"customer": {
"$relation": [
{
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_slug": "contact"
}
]
}
}
}
getMeterCounters​
Retrieves all counters for a given meter.
GET /v1/metering/counter
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
meter_id | query | string (uuid) | Yes |
Sample Call
epilot metering getMeterCounters \
-p meter_id=123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot metering getMeterCounters -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": [
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter_counter",
"obis_number": "A-34",
"direction": "feed-in",
"transformer_ratio": 70,
"unit": "string",
"forecast_reading_value": 270,
"forecast_as_of": "2022-12-10T00:00:00.000Z",
"current_consumption": 240,
"last_reading": "2022-10-10T00:00:00.000Z",
"conversion_factor": 3,
"tariff_type": "ht"
}
]
}
getCounterDetails​
Retrieves the details of a meter counter.
GET /v1/metering/counter/{counter_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
counter_id | path | string | Yes | The ID of the counter. |
Sample Call
epilot metering getCounterDetails \
-p counter_id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot metering getCounterDetails 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot metering getCounterDetails -p counter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": {
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_title": "Example Entity",
"_org": "123",
"_tags": ["example", "mock"],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_schema": "meter_counter",
"obis_number": "A-34",
"direction": "feed-in",
"transformer_ratio": 70,
"unit": "string",
"forecast_reading_value": 270,
"forecast_as_of": "2022-12-10T00:00:00.000Z",
"current_consumption": 240,
"last_reading": "2022-10-10T00:00:00.000Z",
"conversion_factor": 3,
"tariff_type": "ht"
}
}
createMeterReading​
Inserts a new meter reading.
POST /v1/metering/reading
Request Body (required)
Sample Call
epilot metering createMeterReading
With request body:
epilot metering createMeterReading \
-d '{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}'
Using stdin pipe:
cat body.json | epilot metering createMeterReading
With JSONata filter:
epilot metering createMeterReading --jsonata 'data'
Sample Response
{
"data": {
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
}
createMeterReadings​
Inserts multiple meter readings at once. Limited to 100 readings per request.
POST /v1/metering/readings
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
async | query | boolean | No | Don't wait for the reading to become available in GetReadings API. Useful for large migrations |
activity_id | query | string (ulid) | No | Activity to include in event feed |
skip_validation | query | boolean | No | When set to true, all validations will be skipped and the system will allow the reading to be created. |
If set to false or not provided, the system performs the following validations: Validation Rule |
Request Body (required)
Sample Call
epilot metering createMeterReadings
With request body:
epilot metering createMeterReadings \
-d '{
"readings": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}'
Using stdin pipe:
cat body.json | epilot metering createMeterReadings
With JSONata filter:
epilot metering createMeterReadings --jsonata 'data'
Sample Response
{
"data": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}
createPortalMeterReadings​
Inserts multiple meter readings at once for a given meter. Limited to 2 readings per request.
POST /v1/metering/readings/{meter_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
meter_id | path | string | Yes | The ID of the meter. |
Request Body (required)
Sample Call
epilot metering createPortalMeterReadings \
-p meter_id=123e4567-e89b-12d3-a456-426614174000
With request body:
epilot metering createPortalMeterReadings \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-d '{
"readings": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}'
Using positional args for path parameters:
epilot metering createPortalMeterReadings 123e4567-e89b-12d3-a456-426614174000
Using stdin pipe:
cat body.json | epilot metering createPortalMeterReadings -p meter_id=123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot metering createPortalMeterReadings -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}
batchWriteMeterReadings​
Upserts/Deletes multiple meter readings at once. Limited to 100 readings per request.
POST /v2/metering/readings
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
async | query | boolean | No | Don't wait for the reading to become available in GetReadings API. Useful for large migrations |
skip_validation | query | boolean | No | When set to true, all validations will be skipped and the system will allow the reading to be created. |
If set to false or not provided, the system performs the following validations:
Validation Rule |
| activity_id | query | string (ulid) | No | Activity to include in event feed |
Request Body (required)
Sample Call
epilot metering batchWriteMeterReadings
With request body:
epilot metering batchWriteMeterReadings \
-d '{
"identifiers": ["string"],
"readings": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string",
"operation": "create"
}
]
}'
Using stdin pipe:
cat body.json | epilot metering batchWriteMeterReadings
With JSONata filter:
epilot metering batchWriteMeterReadings --jsonata 'data'
Sample Response
{
"data": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
]
}
createMeterReadingFromSubmission​
Creates a reading from a journey submission.
POST /v1/metering/reading/submission
Request Body (required)
Sample Call
epilot metering createMeterReadingFromSubmission
With request body:
epilot metering createMeterReadingFromSubmission \
-d '{
"org_id": "123",
"entity": {
"_org": "123",
"meterReadings": [
{
"meterId": "string",
"readings": [
{
"counterId": "string",
"direction": "feed-in",
"unit": "string",
"value": 240
}
],
"readingValue": 240,
"readingDate": "2022-10-10T10:10:00.000Z",
"readBy": "John Doe",
"reason": "",
"maloId": "A09-123",
"obisNumber": "A-34",
"readingUnit": "string",
"meterType": "one_tariff",
"feedInValue": 240,
"feedOutValue": 240,
"htValue": 240,
"ntValue": 240
}
]
}
}'
Using stdin pipe:
cat body.json | epilot metering createMeterReadingFromSubmission
With JSONata filter:
epilot metering createMeterReadingFromSubmission --jsonata 'message'
Sample Response
{
"message": "Successfully Processed"
}
getAllowedReadingForMeter​
Get allowed reading for the given meter
GET /v1/metering/allowed/reading/{meter_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
meter_id | path | string | Yes | The ID of the meter. |
timestamp | query | string | No | If not provided, the system will default to now. |
Sample Call
epilot metering getAllowedReadingForMeter \
-p meter_id=123e4567-e89b-12d3-a456-426614174000
Using positional args for path parameters:
epilot metering getAllowedReadingForMeter 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot metering getAllowedReadingForMeter -p meter_id=123e4567-e89b-12d3-a456-426614174000 --jsonata 'data'
Sample Response
{
"data": [
{
"counter_id": "string",
"min_value": 0,
"max_value": 0
}
]
}
createReadingWithMeter​
Creates a reading along with a meter.
POST /v1/metering/reading/with-meter
Request Body (required)
Sample Call
epilot metering createReadingWithMeter
With request body:
epilot metering createReadingWithMeter \
-d '{
"ma_lo_id": "A09-123",
"meter_id": "string",
"obis_number": "A-34",
"unit": "string",
"direction": "feed-in",
"tariff_type": "ht",
"value": 240,
"read_by": "John Doe",
"reason": "",
"timestamp": "2022-10-10T10:10:00.000Z",
"source": "ECP"
}'
Using stdin pipe:
cat body.json | epilot metering createReadingWithMeter
With JSONata filter:
epilot metering createReadingWithMeter --jsonata 'data'
Sample Response
{
"data": {
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
}
getReadingsByInterval​
Retrieves all readings specified in an interval.
GET /v1/metering/reading/{meter_id}/{counter_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
meter_id | path | string | Yes | The ID of the meter. |
counter_id | path | string | Yes | The ID of the counter. |
start_date | query | string | No | If not provided, the system will default to 2000-01-01. |
end_date | query | string | No | If not provided, the system will default to today's date. |
direction | query | "feed-in" | "feed-out" | No | |
size | query | number | No | Returns the first n results after the specified offset (from). |
If this value is provided as -1, then it returns all results at once.
|
| from | query | number | No | |
| type | query | "cumulative" | "relative" | Yes | Since meter readings are cumulative, users may need to request actual consumptions, which are the difference between consecutive measurements.
If this value is provided as "cumulative", then actual re |
| sort | query | "asc" | "desc" | No | If this value is provided as "asc", then the results will be sorted by the timestamp field in ascending order.
If this value is provided as "desc", then the results will be sorted by the timestamp fie |
Sample Call
epilot metering getReadingsByInterval \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p type=example
Using positional args for path parameters:
epilot metering getReadingsByInterval 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot metering getReadingsByInterval -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p type=example --jsonata 'results[0]'
Sample Response
{
"results": [
{
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
],
"hits": 120,
"firstRecordCreatedAt": "2022-10-01T20:00:00.000Z"
}
updateMeterReading​
Updates a meter reading.
PUT /v1/metering/reading/{meter_id}/{counter_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
meter_id | path | string | Yes | The ID of the meter entity. |
counter_id | path | string | Yes | The ID of the counter entity. |
timestamp | query | string | Yes | The timestamp when the reading was created. |
Request Body (required)
Sample Call
epilot metering updateMeterReading \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p timestamp=2022-10-01T20:00:00.000Z
With request body:
epilot metering updateMeterReading \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p timestamp=2022-10-01T20:00:00.000Z \
-d '{
"value": 240,
"read_by": "John Doe",
"reason": "string",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
}
}'
Using positional args for path parameters:
epilot metering updateMeterReading 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000
Using stdin pipe:
cat body.json | epilot metering updateMeterReading -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p timestamp=2022-10-01T20:00:00.000Z
With JSONata filter:
epilot metering updateMeterReading -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p timestamp=2022-10-01T20:00:00.000Z --jsonata 'data'
Sample Response
{
"data": {
"value": 240,
"read_by": "John Doe",
"reason": "",
"meter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"counter_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"direction": "feed-in",
"timestamp": "2022-10-10T00:00:00.000Z",
"source": "ECP",
"status": "valid",
"external_id": "string",
"remark": "Customer reported unusual consumption",
"metadata": {
"registration_id": "1234567890",
"business_unit": "ABC"
},
"note": "string",
"unit": "string"
}
}
deleteMeterReading​
Deletes a meter reading.
DELETE /v1/metering/reading/{meter_id}/{counter_id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
meter_id | path | string | Yes | The ID of the meter entity. |
counter_id | path | string | Yes | The ID of the counter entity. |
timestamp | query | string | Yes | The timestamp when the reading was created. |
Sample Call
epilot metering deleteMeterReading \
-p meter_id=123e4567-e89b-12d3-a456-426614174000 \
-p counter_id=123e4567-e89b-12d3-a456-426614174000 \
-p timestamp=2022-10-01T20:00:00.000Z
Using positional args for path parameters:
epilot metering deleteMeterReading 123e4567-e89b-12d3-a456-426614174000 123e4567-e89b-12d3-a456-426614174000
With JSONata filter:
epilot metering deleteMeterReading -p meter_id=123e4567-e89b-12d3-a456-426614174000 -p counter_id=123e4567-e89b-12d3-a456-426614174000 -p timestamp=2022-10-01T20:00:00.000Z --jsonata 'data'
Sample Response
{
"data": {
"meterId": "string",
"counterId": "string",
"timestamp": "2022-10-01T20:00:00.000Z"
}
}