Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: ZopNight Platform Actions & Execution API
version: 1.1.0
summary: Cloud cost, inventory and deployment operations across AWS, GCP, Azure and Kubernetes.
description: 'REST API for ZopNight: cloud resources, costs, schedules, recommendations,
budgets, deployments, teams and audit logs. Authentication is bearer-token: a JWT from `POST /auth/login`, or a Personal
Access Token minted self-serve from Developer Settings. Every operation
requires one except the `/auth/*` endpoints that issue them. SCOPE OF THIS DOCUMENT. It is generated from the published endpoint index,
which records each operation''s method, path and description. It is therefore
a complete and accurate inventory of the API surface, but it does NOT carry
request bodies, response schemas or query parameters, because those are not
published. Read operations are fully callable from this document; write
operations are addressable but their request bodies are undocumented here. Consult the linked documentation for payload shapes. RATE LIMITS. 100 requests per minute per organization, enforced at the
gateway in a fixed window that resets on the clock minute. All org-scoped
endpoints share one bucket; there are no per-endpoint limits. The `/auth/*`
endpoints that issue credentials are exempt. Exceeding the limit returns 429
with `{"error": "rate limit exceeded"}`. No `Retry-After` and no `X-RateLimit-*`
headers are sent, so a client cannot read its remaining budget or the reset
time from a response: back off exponentially instead. PAGINATION. Where it is documented, list endpoints take `page` (1-based) and
a page-size parameter — spelled `limit` on most, `size` on
/recommendations/resources and /smart-tags. Read the parameter each operation
declares rather than assuming; an unrecognised one is ignored, not rejected,
so guessing returns page 1 forever. Pagination is
page/limit; there is no cursor. Two response envelopes are in use and each
operation declares which: `{"data":{"items":[…],"total":…}}` for /audit-logs
and /state-history, and a bare `{"data":[…]}` for /resources, which you page
until a short page comes back. An operation that declares no page parameter has
no documented pagination — an absence of documentation, not a guarantee that it
returns everything. LONG-RUNNING WORK. Some writes answer 202 with a job identifier instead of a
finished result; poll the status endpoint the response description names until
it reports a terminal state. No `Location` header is sent — follow the
documented poll URL. ACTING IN BULK. A few endpoints take many items in one request rather than
making you loop: `/actions/bulk` applies one action to a whole resource group,
`/notifications/subscriptions/bulk` upserts many subscriptions, and
`/resources/by-uids` fetches many resources by native provider ID. Those three
carry request-body schemas; most other write bodies are not published here. PERMISSIONS. Authorization is RBAC, not OAuth scopes. Policies are identifiers
of the form `:` (`schedules:write`, `provisioning:create`),
granted to roles and assigned to users, optionally scoped to a team or
resource. `GET /permissions` returns the effective permissions of the current
caller — call it before attempting a write rather than discovering a 403. A
Personal Access Token inherits its creator’s role and cannot be narrowed. The
`mcp:read`/`mcp:write` scopes advertised at api.zop.dev/.well-known/
oauth-protected-resource govern the MCP server, NOT this REST API. ERRORS. Every non-2xx produced by the API itself is `application/json` and
matches the `ApiError` schema, a `oneOf` over the three shapes it returns:
`{"error":{"message":"…"}}` from the platform services, a bare
`{"error":"…"}` from the gateway (observed on 401, 405 and 429), and RFC
6749 `{"error":"…","error_description":"…"}` from the `/oauth/*` endpoints. Which shape you get is decided by the layer that answered, not by the status
code, and `error` is a string in two of the three — so branch on structure,
never on status. CHECK `Content-Type` BEFORE PARSING. Two cases are not JSON at all.'
contact:
name: ZopDev Support
email: support@zop.dev
url: https://zop.dev/contact
termsOfService: https://zop.dev/legal/website-terms-of-service
license:
name: Proprietary — see Terms of Service
url: https://zop.dev/legal/website-terms-of-service
servers:
- url: https://api.zop.dev
description: Production
security:
- bearerAuth: []
tags:
- name: Actions & Execution
description: Endpoints for Actions & Execution.
paths:
/actions:
post:
operationId: postActions
summary: Submit manual action
tags:
- Actions & Execution
security:
- bearerAuth: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
'400':
description: The request was malformed or failed validation.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing, expired or invalid bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: The caller is authenticated but lacks permission.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'429':
description: 'Rate limit exceeded: more than 100 requests in the current one-minute window for this organization. No `Retry-After` or `X-RateLimit-*` headers are returned — back off exponentially (1s, 2s, 4s). The window is fixed and resets on the clock minute, so a 429 late in a minute clears quickly.'
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Unexpected server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/actions/bulk:
post:
operationId: postActionsBulk
summary: Submit bulk action
tags:
- Actions & Execution
requestBody:
required: true
description: One action applied to every resource in a group.
content:
application/json:
schema:
type: object
required:
- type
- groupID
properties:
type:
type: string
description: The action to apply, e.g. `start`, `stop`.
groupID:
type: string
description: Resource group to apply it to.
security:
- bearerAuth: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
'400':
description: The request was malformed or failed validation.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: Missing, expired or invalid bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: The caller is authenticated but lacks permission.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'429':
description: 'Rate limit exceeded: more than 100 requests in the current one-minute window for this organization. No `Retry-After` or `X-RateLimit-*` headers are returned — back off exponentially (1s, 2s, 4s). The window is fixed and resets on the clock minute, so a 429 late in a minute clears quickly.'
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Unexpected server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/actions/{actionID}:
get:
operationId: getActionsByActionID
summary: Get action status
tags:
- Actions & Execution
parameters:
- name: actionID
in: path
required: true
description: Unique identifier of the action.
schema:
type: string
security:
- bearerAuth: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
'401':
description: Missing, expired or invalid bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: The caller is authenticated but lacks permission.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: No such resource, or it is not visible to this caller.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'429':
description: 'Rate limit exceeded: more than 100 requests in the current one-minute window for this organization. No `Retry-After` or `X-RateLimit-*` headers are returned — back off exponentially (1s, 2s, 4s). The window is fixed and resets on the clock minute, so a 429 late in a minute clears quickly.'
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Unexpected server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/actions/bulk/{bulkActionID}:
get:
operationId: getActionsBulkByBulkActionID
summary: Get bulk action status
tags:
- Actions & Execution
parameters:
- name: bulkActionID
in: path
required: true
description: Unique identifier of the bulk action.
schema:
type: string
security:
- bearerAuth: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
'401':
description: Missing, expired or invalid bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: The caller is authenticated but lacks permission.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'404':
description: No such resource, or it is not visible to this caller.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'429':
description: 'Rate limit exceeded: more than 100 requests in the current one-minute window for this organization. No `Retry-After` or `X-RateLimit-*` headers are returned — back off exponentially (1s, 2s, 4s). The window is fixed and resets on the clock minute, so a 429 late in a minute clears quickly.'
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Unexpected server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/actions/bulk/latest:
get:
operationId: getActionsBulkLatest
summary: Get the most recent bulk action
tags:
- Actions & Execution
security:
- bearerAuth: []
responses:
'200':
description: Successful response.
content:
application/json:
schema:
$ref: '#/components/schemas/GenericResponse'
'401':
description: Missing, expired or invalid bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: The caller is authenticated but lacks permission.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'429':
description: 'Rate limit exceeded: more than 100 requests in the current one-minute window for this organization. No `Retry-After` or `X-RateLimit-*` headers are returned — back off exponentially (1s, 2s, 4s). The window is fixed and resets on the clock minute, so a 429 late in a minute clears quickly.'
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Unexpected server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
/state-history:
get:
operationId: getStateHistory
summary: Get state history
tags:
- Actions & Execution
parameters:
- name: page
in: query
required: false
description: 1-based page number.
schema:
type: integer
minimum: 1
default: 1
- name: limit
in: query
required: false
description: Items per page.
schema:
type: integer
minimum: 1
default: 50
security:
- bearerAuth: []
responses:
'200':
description: Successful response. `data` carries the page plus its counts.
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResponse'
'401':
description: Missing, expired or invalid bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'403':
description: The caller is authenticated but lacks permission.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'429':
description: 'Rate limit exceeded: more than 100 requests in the current one-minute window for this organization. No `Retry-After` or `X-RateLimit-*` headers are returned — back off exponentially (1s, 2s, 4s). The window is fixed and resets on the clock minute, so a 429 late in a minute clears quickly.'
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'500':
description: Unexpected server error.
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
components:
schemas:
PaginatedResponse:
type: object
description: A page of results with its counts. Documented for /audit-logs and /state-history (administration/audit-logs.mdx, operations/actions.mdx).
properties:
data:
type: object
properties:
items:
type: array
items:
type: object
additionalProperties: true
total:
type: integer
description: Total matching items across all pages.
page:
type: integer
description: The page returned.
limit:
type: integer
description: Items per page for this response.
GenericResponse:
type: object
additionalProperties: true
description: Response payload. Per-endpoint response schemas are not yet published — see the linked documentation for the concrete shape of each.
ApiError:
description: 'Error payload. Three shapes are in use: the GoFr service envelope, a bare string at the gateway, and RFC 6749 on the /oauth/* endpoints. Verified against the live API rather than inferred from documentation.'
oneOf:
- type: object
title: Service error (GoFr envelope)
description: 'Returned by the platform services — the common case. Example: `{"error":{"message":"missing auth header in key ''Authorization''"}}`.'
required:
- error
properties:
error:
type: object
required:
- message
properties:
message:
type: string
description: Human-readable reason, written by the service that handled the request.
- type: object
title: Gateway error (bare string)
description: 'Returned by the gateway, in front of the services. Observed on 401, 405 and 429 — the shape is decided by which layer answered, not by the status code, so do not switch on status to pick a branch. Example: `{"error":"rate limit exceeded"}`.'
required:
- error
not:
required:
- error_description
properties:
error:
type: string
description: Human-readable reason.
- type: object
title: OAuth error (RFC 6749)
description: 'Returned by the /oauth/* endpoints only, per RFC 6749 section 5.2. Example: `{"error":"invalid_redirect_uri","error_description":"redirect_uris is required (RFC 7591 section 2)"}`.'
required:
- error
- error_description
properties:
error:
type: string
description: RFC 6749 error code, e.g. `invalid_request`, `invalid_grant`.
error_description:
type: string
description: Human-readable detail. Present on OAuth errors; absent on the other two shapes.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 'A JWT access token from POST /auth/login, or a Personal Access Token minted self-serve from Developer Settings. Send as `Authorization: Bearer <token>`.'
externalDocs:
description: Full API reference
url: https://zop.dev/developer-docs/reference/api-reference
x-zop-generated: derived-from-endpoint-index