API reference
Restriction Batches
Endpoints tagged “Restriction Batches” in the API specification.
GET/v1/restriction_batches
List Restriction Batches
asset.read
Required scopes: asset.read
List the restriction batches of the caller's organizations, newest first.
Query parameters
- status
- enum
pendingappliedrejectedcancelledexpiredFilter by batch status
curl "https://api.ebx.energy/v1/restriction_batches" \
-H "Authorization: Bearer $EBX_TOKEN"import httpx
r = httpx.get(
"https://api.ebx.energy/v1/restriction_batches",
headers={"Authorization": f"Bearer {token}"},
)
print(r.json())const res = await fetch("https://api.ebx.energy/v1/restriction_batches", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await res.json();{
"batches": [
{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "<string>",
"source": "fleet_action",
"status": "pending",
"reason": "maintenance",
"reason_description": "<string>",
"asset_ids": [
"<string>"
],
"requested_start_time": "2026-10-22T20:30:00Z",
"requested_end_time": "2026-10-22T20:30:00Z",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"assets": [
{
"asset_id": "<string>",
"asset_name": "<string>",
"result": "applied",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"original_end_time": "2026-10-22T20:30:00Z",
"skip_reason": "already_unavailable",
"conflict_start_time": "2026-10-22T20:30:00Z",
"conflict_end_time": "2026-10-22T20:30:00Z"
}
],
"created_at": "2026-10-22T20:30:00Z",
"created_by": "<string>",
"created_by_email": "<string>",
"decided_at": "2026-10-22T20:30:00Z",
"decided_by": "<string>",
"decision_note": "<string>",
"ended_at": "2026-10-22T20:30:00Z",
"ended_by": "<string>"
}
]
}POST/v1/restriction_batches
Submit Restriction Batch
asset.write
Required scopes: asset.write
Make many assets of one organization unavailable at once, in one transaction.
With restrictions.write_direct the batch applies at once; otherwise it is stored as one pending request, approved or rejected as a whole. Submitting the same id again returns the stored batch when it asked for the same change, and is refused with 409 when it did not.
Request body · required
- asset_idsREQUIRED
- array[string]The assets to make unavailable, all of one organization
- start_time
- string<date-time>Start in UTC ISO 8601 format; omitted: from when the batch is applied. A request approved after its start applies from the approval
- end_time
- string<date-time>End in UTC ISO 8601 format; omitted: until the batch is ended
- idREQUIRED
- string<uuid>Chosen by the client and kept for retries: submitting the same id again returns the batch it created instead of applying the change twice
- reasonREQUIRED
- enum
maintenancefaultgrid_eventcommercialtestingoperationalotherReason a restriction (unavailability, power limit, energy limit) is being requested. - reason_description
- stringOptional description of the reason
curl -X POST "https://api.ebx.energy/v1/restriction_batches" \
-H "Authorization: Bearer $EBX_TOKEN" \
-H "Content-Type: application/json" \
-d '{"asset_ids":["DE_50HZ_WEM_PAS_1","DE_TNG_ALT_1"],"start_time":"2026-10-21T08:00:00Z","end_time":"2026-10-21T18:00:00Z","id":"00000000-0000-0000-0000-000000000000","reason":"maintenance","reason_description":"Optimization platform outage"}'import httpx
r = httpx.post(
"https://api.ebx.energy/v1/restriction_batches",
headers={"Authorization": f"Bearer {token}"},
json={
"asset_ids": [
"DE_50HZ_WEM_PAS_1",
"DE_TNG_ALT_1",
],
"start_time": "2026-10-21T08:00:00Z",
"end_time": "2026-10-21T18:00:00Z",
"id": "00000000-0000-0000-0000-000000000000",
"reason": "maintenance",
"reason_description": "Optimization platform outage",
},
)
print(r.json())const res = await fetch("https://api.ebx.energy/v1/restriction_batches", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"asset_ids":["DE_50HZ_WEM_PAS_1","DE_TNG_ALT_1"],"start_time":"2026-10-21T08:00:00Z","end_time":"2026-10-21T18:00:00Z","id":"00000000-0000-0000-0000-000000000000","reason":"maintenance","reason_description":"Optimization platform outage"}),
});
const data = await res.json();{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "<string>",
"source": "fleet_action",
"status": "pending",
"reason": "maintenance",
"reason_description": "<string>",
"asset_ids": [
"<string>"
],
"requested_start_time": "2026-10-22T20:30:00Z",
"requested_end_time": "2026-10-22T20:30:00Z",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"assets": [
{
"asset_id": "<string>",
"asset_name": "<string>",
"result": "applied",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"original_end_time": "2026-10-22T20:30:00Z",
"skip_reason": "already_unavailable",
"conflict_start_time": "2026-10-22T20:30:00Z",
"conflict_end_time": "2026-10-22T20:30:00Z"
}
],
"created_at": "2026-10-22T20:30:00Z",
"created_by": "<string>",
"created_by_email": "<string>",
"decided_at": "2026-10-22T20:30:00Z",
"decided_by": "<string>",
"decision_note": "<string>",
"ended_at": "2026-10-22T20:30:00Z",
"ended_by": "<string>"
}- 400malformed request
- 401no valid token
- 403scope missing
- 409state conflict
- 422validation failed
- 429rate limited
GET/v1/restriction_batches/{batch_id}
Get Restriction Batch
asset.read
Required scopes: asset.read
Get one restriction batch of the caller's organizations.
Path parameters
- batch_idREQUIRED
- string<uuid>
curl "https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000" \
-H "Authorization: Bearer $EBX_TOKEN"import httpx
r = httpx.get(
"https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000",
headers={"Authorization": f"Bearer {token}"},
)
print(r.json())const res = await fetch("https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000", {
method: "GET",
headers: {
Authorization: `Bearer ${token}`,
},
});
const data = await res.json();{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "<string>",
"source": "fleet_action",
"status": "pending",
"reason": "maintenance",
"reason_description": "<string>",
"asset_ids": [
"<string>"
],
"requested_start_time": "2026-10-22T20:30:00Z",
"requested_end_time": "2026-10-22T20:30:00Z",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"assets": [
{
"asset_id": "<string>",
"asset_name": "<string>",
"result": "applied",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"original_end_time": "2026-10-22T20:30:00Z",
"skip_reason": "already_unavailable",
"conflict_start_time": "2026-10-22T20:30:00Z",
"conflict_end_time": "2026-10-22T20:30:00Z"
}
],
"created_at": "2026-10-22T20:30:00Z",
"created_by": "<string>",
"created_by_email": "<string>",
"decided_at": "2026-10-22T20:30:00Z",
"decided_by": "<string>",
"decision_note": "<string>",
"ended_at": "2026-10-22T20:30:00Z",
"ended_by": "<string>"
}PATCH/v1/restriction_batches/{batch_id}
Change Restriction Batch End
restrictions.write_direct
Required scopes: restrictions.write_direct
End all the batch put in force now (end_now), or set one end for all of it (new_end_time).
Ending removes the batch's unavailabilities that have not started, ends the running ones now, and puts each unavailability the batch extended back to its own end (or ends it now when that has passed). A new end moves every unavailability the batch keeps in force, but never ends an extended one before its own end; an extension that would run into another restriction refuses the whole change. Unavailabilities changed otherwise in the meantime are left as they are. Ending is safe to retry.
Path parameters
- batch_idREQUIRED
- string<uuid>
Request body · required
- new_end_time
- string<date-time>Scheduled replacement end_time in UTC: earlier shortens the interval, later extends it up to the next interval of the same type; mutually exclusive with end_now=true
- end_now
- booleandefault falseEnd a started interval at server time, without the scheduled-shortening lead time. Safe to retry.
curl -X PATCH "https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000" \
-H "Authorization: Bearer $EBX_TOKEN" \
-H "Content-Type: application/json" \
-d '{"new_end_time":"2025-01-01T18:15:00Z","end_now":false}'import httpx
r = httpx.patch(
"https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000",
headers={"Authorization": f"Bearer {token}"},
json={
"new_end_time": "2025-01-01T18:15:00Z",
"end_now": False,
},
)
print(r.json())const res = await fetch("https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000", {
method: "PATCH",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"new_end_time":"2025-01-01T18:15:00Z","end_now":false}),
});
const data = await res.json();{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "<string>",
"source": "fleet_action",
"status": "pending",
"reason": "maintenance",
"reason_description": "<string>",
"asset_ids": [
"<string>"
],
"requested_start_time": "2026-10-22T20:30:00Z",
"requested_end_time": "2026-10-22T20:30:00Z",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"assets": [
{
"asset_id": "<string>",
"asset_name": "<string>",
"result": "applied",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"original_end_time": "2026-10-22T20:30:00Z",
"skip_reason": "already_unavailable",
"conflict_start_time": "2026-10-22T20:30:00Z",
"conflict_end_time": "2026-10-22T20:30:00Z"
}
],
"created_at": "2026-10-22T20:30:00Z",
"created_by": "<string>",
"created_by_email": "<string>",
"decided_at": "2026-10-22T20:30:00Z",
"decided_by": "<string>",
"decision_note": "<string>",
"ended_at": "2026-10-22T20:30:00Z",
"ended_by": "<string>"
}- 400malformed request
- 401no valid token
- 403scope missing
- 404unknown or not visible
- 409state conflict
- 422validation failed
- 429rate limited
POST/v1/restriction_batches/{batch_id}/approve
Approve Restriction Batch
restrictions.approve
Required scopes: restrictions.approve
Apply a pending batch as a whole, from now if its requested start has passed.
The batch is planned again against the assets' restrictions of now. When it cannot apply, it stays pending and the error is returned.
Path parameters
- batch_idREQUIRED
- string<uuid>
Request body · required
- note
- stringOptional note shown back to the requester
curl -X POST "https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000/approve" \
-H "Authorization: Bearer $EBX_TOKEN" \
-H "Content-Type: application/json" \
-d '{"note":"<string>"}'import httpx
r = httpx.post(
"https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000/approve",
headers={"Authorization": f"Bearer {token}"},
json={
"note": "<string>",
},
)
print(r.json())const res = await fetch("https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000/approve", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"note":"<string>"}),
});
const data = await res.json();{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "<string>",
"source": "fleet_action",
"status": "pending",
"reason": "maintenance",
"reason_description": "<string>",
"asset_ids": [
"<string>"
],
"requested_start_time": "2026-10-22T20:30:00Z",
"requested_end_time": "2026-10-22T20:30:00Z",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"assets": [
{
"asset_id": "<string>",
"asset_name": "<string>",
"result": "applied",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"original_end_time": "2026-10-22T20:30:00Z",
"skip_reason": "already_unavailable",
"conflict_start_time": "2026-10-22T20:30:00Z",
"conflict_end_time": "2026-10-22T20:30:00Z"
}
],
"created_at": "2026-10-22T20:30:00Z",
"created_by": "<string>",
"created_by_email": "<string>",
"decided_at": "2026-10-22T20:30:00Z",
"decided_by": "<string>",
"decision_note": "<string>",
"ended_at": "2026-10-22T20:30:00Z",
"ended_by": "<string>"
}- 400malformed request
- 401no valid token
- 403scope missing
- 404unknown or not visible
- 409state conflict
- 422validation failed
- 429rate limited
POST/v1/restriction_batches/{batch_id}/cancel
Cancel Restriction Batch
asset.write
Required scopes: asset.write
Withdraw a pending batch. Allowed for its requester or an EBX admin.
Path parameters
- batch_idREQUIRED
- string<uuid>
Request body · required
- note
- stringOptional note shown back to the requester
curl -X POST "https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000/cancel" \
-H "Authorization: Bearer $EBX_TOKEN" \
-H "Content-Type: application/json" \
-d '{"note":"<string>"}'import httpx
r = httpx.post(
"https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000/cancel",
headers={"Authorization": f"Bearer {token}"},
json={
"note": "<string>",
},
)
print(r.json())const res = await fetch("https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000/cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"note":"<string>"}),
});
const data = await res.json();{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "<string>",
"source": "fleet_action",
"status": "pending",
"reason": "maintenance",
"reason_description": "<string>",
"asset_ids": [
"<string>"
],
"requested_start_time": "2026-10-22T20:30:00Z",
"requested_end_time": "2026-10-22T20:30:00Z",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"assets": [
{
"asset_id": "<string>",
"asset_name": "<string>",
"result": "applied",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"original_end_time": "2026-10-22T20:30:00Z",
"skip_reason": "already_unavailable",
"conflict_start_time": "2026-10-22T20:30:00Z",
"conflict_end_time": "2026-10-22T20:30:00Z"
}
],
"created_at": "2026-10-22T20:30:00Z",
"created_by": "<string>",
"created_by_email": "<string>",
"decided_at": "2026-10-22T20:30:00Z",
"decided_by": "<string>",
"decision_note": "<string>",
"ended_at": "2026-10-22T20:30:00Z",
"ended_by": "<string>"
}- 400malformed request
- 401no valid token
- 403scope missing
- 404unknown or not visible
- 409state conflict
- 422validation failed
- 429rate limited
POST/v1/restriction_batches/{batch_id}/reject
Reject Restriction Batch
restrictions.approve
Required scopes: restrictions.approve
Reject a pending batch.
Path parameters
- batch_idREQUIRED
- string<uuid>
Request body · required
- note
- stringOptional note shown back to the requester
curl -X POST "https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000/reject" \
-H "Authorization: Bearer $EBX_TOKEN" \
-H "Content-Type: application/json" \
-d '{"note":"<string>"}'import httpx
r = httpx.post(
"https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000/reject",
headers={"Authorization": f"Bearer {token}"},
json={
"note": "<string>",
},
)
print(r.json())const res = await fetch("https://api.ebx.energy/v1/restriction_batches/00000000-0000-0000-0000-000000000000/reject", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"note":"<string>"}),
});
const data = await res.json();{
"id": "00000000-0000-0000-0000-000000000000",
"organization_id": "<string>",
"source": "fleet_action",
"status": "pending",
"reason": "maintenance",
"reason_description": "<string>",
"asset_ids": [
"<string>"
],
"requested_start_time": "2026-10-22T20:30:00Z",
"requested_end_time": "2026-10-22T20:30:00Z",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"assets": [
{
"asset_id": "<string>",
"asset_name": "<string>",
"result": "applied",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"original_end_time": "2026-10-22T20:30:00Z",
"skip_reason": "already_unavailable",
"conflict_start_time": "2026-10-22T20:30:00Z",
"conflict_end_time": "2026-10-22T20:30:00Z"
}
],
"created_at": "2026-10-22T20:30:00Z",
"created_by": "<string>",
"created_by_email": "<string>",
"decided_at": "2026-10-22T20:30:00Z",
"decided_by": "<string>",
"decision_note": "<string>",
"ended_at": "2026-10-22T20:30:00Z",
"ended_by": "<string>"
}- 400malformed request
- 401no valid token
- 403scope missing
- 404unknown or not visible
- 409state conflict
- 422validation failed
- 429rate limited
POST/v1/restriction_batches/preview
Preview Restriction Batch
asset.write
Required scopes: asset.write
Show what making these assets unavailable would do to each of them now, without storing anything.
An asset without a power limit in the window becomes unavailable (applied). One whose running unavailability ends inside the window gets its end moved to the window's end (extended). Any other is skipped, with the reason. Applying the batch plans again against the state of then.
Request body · required
- asset_idsREQUIRED
- array[string]The assets to make unavailable, all of one organization
- start_time
- string<date-time>Start in UTC ISO 8601 format; omitted: from when the batch is applied. A request approved after its start applies from the approval
- end_time
- string<date-time>End in UTC ISO 8601 format; omitted: until the batch is ended
curl -X POST "https://api.ebx.energy/v1/restriction_batches/preview" \
-H "Authorization: Bearer $EBX_TOKEN" \
-H "Content-Type: application/json" \
-d '{"asset_ids":["DE_50HZ_WEM_PAS_1","DE_TNG_ALT_1"],"start_time":"2026-10-21T08:00:00Z","end_time":"2026-10-21T18:00:00Z"}'import httpx
r = httpx.post(
"https://api.ebx.energy/v1/restriction_batches/preview",
headers={"Authorization": f"Bearer {token}"},
json={
"asset_ids": [
"DE_50HZ_WEM_PAS_1",
"DE_TNG_ALT_1",
],
"start_time": "2026-10-21T08:00:00Z",
"end_time": "2026-10-21T18:00:00Z",
},
)
print(r.json())const res = await fetch("https://api.ebx.energy/v1/restriction_batches/preview", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"asset_ids":["DE_50HZ_WEM_PAS_1","DE_TNG_ALT_1"],"start_time":"2026-10-21T08:00:00Z","end_time":"2026-10-21T18:00:00Z"}),
});
const data = await res.json();{
"organization_id": "<string>",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"assets": [
{
"asset_id": "<string>",
"asset_name": "<string>",
"result": "applied",
"start_time": "2026-10-22T20:30:00Z",
"end_time": "2026-10-22T20:30:00Z",
"original_end_time": "2026-10-22T20:30:00Z",
"skip_reason": "already_unavailable",
"conflict_start_time": "2026-10-22T20:30:00Z",
"conflict_end_time": "2026-10-22T20:30:00Z"
}
]
}- 400malformed request
- 401no valid token
- 403scope missing
- 409state conflict
- 422validation failed
- 429rate limited