M8-R08: add atomic meter close and binding transfer
This commit is contained in:
@@ -1360,6 +1360,46 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/HTTPValidationError'
|
||||
/api/energy/meters/{meter_id}/close:
|
||||
post:
|
||||
tags:
|
||||
- api-energy-meters
|
||||
summary: Close Energy Meter
|
||||
operationId: close_energy_meter_api_energy_meters__meter_id__close_post
|
||||
parameters:
|
||||
- name: meter_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
title: Meter Id
|
||||
- name: X-CSRF-Token
|
||||
in: header
|
||||
required: false
|
||||
schema:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: X-Csrf-Token
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/MeterCloseRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/MeterResponse'
|
||||
'422':
|
||||
description: Validation Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/HTTPValidationError'
|
||||
/api/energy/meters/{meter_id}:
|
||||
patch:
|
||||
tags:
|
||||
@@ -1802,6 +1842,46 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/HTTPValidationError'
|
||||
/api/energy/meters/{meter_id}/bindings/transfer:
|
||||
post:
|
||||
tags:
|
||||
- api-energy-meter-sources
|
||||
summary: Post Binding Transfer
|
||||
operationId: post_binding_transfer_api_energy_meters__meter_id__bindings_transfer_post
|
||||
parameters:
|
||||
- name: meter_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
title: Meter Id
|
||||
- name: X-CSRF-Token
|
||||
in: header
|
||||
required: false
|
||||
schema:
|
||||
anyOf:
|
||||
- type: string
|
||||
- type: 'null'
|
||||
title: X-Csrf-Token
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BindingTransferRequest'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful Response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BindingTransferResponse'
|
||||
'422':
|
||||
description: Validation Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/HTTPValidationError'
|
||||
/api/expose:
|
||||
get:
|
||||
tags:
|
||||
@@ -2783,6 +2863,39 @@ components:
|
||||
- created_at
|
||||
- updated_at
|
||||
title: BindingResponse
|
||||
BindingTransferRequest:
|
||||
properties:
|
||||
from_binding_uuid:
|
||||
type: string
|
||||
maxLength: 36
|
||||
minLength: 1
|
||||
title: From Binding Uuid
|
||||
to_source_channel_uuid:
|
||||
type: string
|
||||
maxLength: 36
|
||||
minLength: 1
|
||||
title: To Source Channel Uuid
|
||||
effective_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: Effective At
|
||||
type: object
|
||||
required:
|
||||
- from_binding_uuid
|
||||
- to_source_channel_uuid
|
||||
- effective_at
|
||||
title: BindingTransferRequest
|
||||
BindingTransferResponse:
|
||||
properties:
|
||||
closed_binding:
|
||||
$ref: '#/components/schemas/BindingResponse'
|
||||
created_binding:
|
||||
$ref: '#/components/schemas/BindingResponse'
|
||||
type: object
|
||||
required:
|
||||
- closed_binding
|
||||
- created_binding
|
||||
title: BindingTransferResponse
|
||||
CatalogEntrySchema:
|
||||
properties:
|
||||
entity:
|
||||
@@ -3618,6 +3731,17 @@ components:
|
||||
- ended_at
|
||||
title: MeterBindingSummary
|
||||
description: Stable, non-sensitive binding identity embedded in meter responses.
|
||||
MeterCloseRequest:
|
||||
properties:
|
||||
ended_at:
|
||||
type: string
|
||||
format: date-time
|
||||
title: Ended At
|
||||
type: object
|
||||
required:
|
||||
- ended_at
|
||||
title: MeterCloseRequest
|
||||
description: Close the active meter epoch at an exclusive end boundary.
|
||||
MeterCostPeriodSchema:
|
||||
properties:
|
||||
commodity:
|
||||
|
||||
Reference in New Issue
Block a user