{"openapi":"3.1.0","info":{"title":"Maple API","version":"2.0.0","description":"The Maple public API is a resource-oriented REST interface for customer-stable resources and workflows.\nIt follows Stripe's design philosophy, modernized where useful:\n\n- **Resources** are plural nouns under `/v2` (`/v2/api_keys`). Related resources share a product namespace (`/v2/alerts/rules`, `/v2/alerts/destinations`). Non-CRUD verbs are sub-resource POSTs (`/v2/api_keys/{id}/roll`).\n- **Object IDs** are opaque, prefixed strings (`key_…`, `dash_…`) — reversible encodings of internal IDs.\n- **Wire format** is snake_case JSON with an `object` type field on every resource and ISO-8601 UTC timestamps.\n- **Lists** use cursor pagination and a uniform `{ object: \"list\", data, has_more, next_cursor }` envelope.\n- **Errors** use a uniform `{ error: { _tag, type, code, title, message, retryable, recovery } }` envelope. `_tag` is the semantic Maple error identity; `code` remains the stable public integration key.\n- **Auth** is a Bearer API key (`maple_ak_…`) or dashboard session token; keys can be restricted with scopes.\n\nSee `docs/api-v2.md` for the full conventions.","summary":"The public, stability-committed HTTP API for the Maple observability platform.","contact":{"name":"Maple Support","url":"https://maple.dev","email":"support@maple.dev"}},"paths":{"/v2/api_keys":{"get":{"tags":["API Keys"],"operationId":"listApiKeys","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of API keys.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns your organization's API keys, most recently created first. Cursor-paginated. Requires the `api_keys:read` scope.","summary":"List API keys"},"post":{"tags":["API Keys"],"operationId":"createApiKey","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"An API key including its one-time `secret`. Returned only by the create and roll endpoints; every other endpoint returns the `ApiKey` object without the secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithSecret"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Creates an API key and returns it **with its one-time `secret`** — store the secret securely, it cannot be retrieved later. Requires an org-admin role and the `api_keys:write` scope.","summary":"Create an API key","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateParams"}}},"required":true}}},"/v2/api_keys/{id}":{"get":{"tags":["API Keys"],"operationId":"getApiKey","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_ApiKeyId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A credential for programmatic access to the Maple API, scoped to one organization. The secret is shown only once (at creation or roll); afterward only its `key_prefix` is stored and returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ApiKeyNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a single API key by its `key_…` ID (without the secret). Requires the `api_keys:read` scope.","summary":"Retrieve an API key"},"delete":{"tags":["API Keys"],"operationId":"revokeApiKey","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_ApiKeyId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The final API key state after a mutation. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients; other public API consumers do not need it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyMutationResponse"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ApiKeyNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Permanently revokes an API key and returns the final object. A revoked key can no longer authenticate. Requires an org-admin role and the `api_keys:write` scope.","summary":"Revoke an API key"}},"/v2/api_keys/{id}/roll":{"post":{"tags":["API Keys"],"operationId":"rollApiKey","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_ApiKeyId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"An API key including its one-time `secret`. Returned only by the create and roll endpoints; every other endpoint returns the `ApiKey` object without the secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithSecret"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ApiKeyNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Revokes the existing key and creates a replacement with a new `key_…` ID and one-time `secret`, preserving its name, description, kind, and scopes. Requires an org-admin role and the `api_keys:write` scope.","summary":"Roll an API key"}},"/v2/dashboards":{"get":{"tags":["Dashboards"],"operationId":"listDashboards","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a cursor-paginated list of dashboards, most recently updated first.","summary":"List dashboards"},"post":{"tags":["Dashboards"],"operationId":"createDashboard","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The committed dashboard. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients; other public API consumers do not need it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardMutationResponseEncoded"}}}},"400":{"description":"The @maple/http/errors/DashboardValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Creates a dashboard and returns the committed object, with optional ElectricSQL reconciliation metadata when available.","summary":"Create a dashboard","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardCreateParamsEncoded"}}},"required":true}}},"/v2/dashboards/import/perses":{"post":{"tags":["Dashboards"],"operationId":"importPersesDashboard","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"DashboardPersesImport","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardPersesImport"}}}},"400":{"description":"The @maple/http/errors/DashboardValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Converts a Perses dashboard into Maple's dashboard model and returns any conversion warnings.","summary":"Import a Perses dashboard","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardPersesImportParams"}}},"required":true}}},"/v2/dashboards/templates":{"get":{"tags":["Dashboards"],"operationId":"listDashboardTemplates","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardTemplateList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the built-in dashboard templates in the standard cursor-paginated list envelope.","summary":"List dashboard templates"}},"/v2/dashboards/templates/{template_id}/preview":{"post":{"tags":["Dashboards"],"operationId":"previewDashboardTemplate","parameters":[{"name":"template_id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardTemplateId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The dashboard a template would build, without creating it. Nothing is persisted; the widgets are identical to what `instantiate` would save for the same parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardTemplatePreviewEncoded"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardTemplateNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardTemplateNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Builds the template for the given parameters and returns the resulting dashboard without saving it. Read-only — use `instantiate` to create the dashboard.","summary":"Preview a dashboard template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardTemplatePreviewParams"}}},"required":true}}},"/v2/dashboards/templates/{template_id}/instantiate":{"post":{"tags":["Dashboards"],"operationId":"instantiateDashboardTemplate","parameters":[{"name":"template_id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardTemplateId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The committed dashboard. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients; other public API consumers do not need it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardMutationResponseEncoded"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/ParameterMissingError failure. HTTP 400. | The @maple/http/errors/DashboardValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/ParameterMissingError"},{"$ref":"#/components/schemas/DashboardValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardTemplateNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardTemplateNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Builds and persists a new dashboard from a template and its required parameters.","summary":"Instantiate a dashboard template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardTemplateInstantiateParams"}}},"required":true}}},"/v2/dashboards/{id}":{"get":{"tags":["Dashboards"],"operationId":"getDashboard","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A complete Maple dashboard definition, including its widgets and variables.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a complete dashboard definition by its opaque `dash_` public ID.","summary":"Retrieve a dashboard"},"patch":{"tags":["Dashboards"],"operationId":"updateDashboard","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The committed dashboard. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients; other public API consumers do not need it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardMutationResponseEncoded"}}}},"400":{"description":"The @maple/http/errors/DashboardValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"409":{"description":"The @maple/http/errors/DashboardConcurrencyError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardConcurrencyError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Applies a partial JSON update; omitted fields retain their current values.","summary":"Update a dashboard","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardUpdateParamsEncoded"}}},"required":true}},"delete":{"tags":["Dashboards"],"operationId":"deleteDashboard","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A dashboard deletion tombstone. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardDeleted"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Permanently deletes a dashboard and returns a tombstone, with optional ElectricSQL reconciliation metadata when available.","summary":"Delete a dashboard"}},"/v2/dashboards/{id}/versions":{"get":{"tags":["Dashboards"],"operationId":"listDashboardVersions","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardVersionList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a newest-first, cursor-paginated audit history for a dashboard.","summary":"List dashboard versions"}},"/v2/dashboards/{id}/versions/{version_id}":{"get":{"tags":["Dashboards"],"operationId":"getDashboardVersion","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true},{"name":"version_id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardVersionId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"DashboardVersionDetail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardVersionDetailEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404. | The @maple/http/errors/DashboardVersionNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardNotFoundError"},{"$ref":"#/components/schemas/DashboardVersionNotFoundError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns one dashboard version together with its complete immutable snapshot.","summary":"Retrieve a dashboard version"}},"/v2/dashboards/{id}/versions/{version_id}/restore":{"post":{"tags":["Dashboards"],"operationId":"restoreDashboardVersion","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true},{"name":"version_id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardVersionId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The committed dashboard. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients; other public API consumers do not need it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardMutationResponseEncoded"}}}},"400":{"description":"The @maple/http/errors/DashboardValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404. | The @maple/http/errors/DashboardVersionNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardNotFoundError"},{"$ref":"#/components/schemas/DashboardVersionNotFoundError"}]}}}},"409":{"description":"The @maple/http/errors/DashboardConcurrencyError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardConcurrencyError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Restores a historical snapshot as the dashboard's new current version.","summary":"Restore a dashboard version"}},"/v2/dashboards/{id}/shares":{"get":{"tags":["Dashboards"],"operationId":"listDashboardShares","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DashboardShareEncoded"}}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503. | The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SharePersistenceError"},{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns every live share on the dashboard — the board's own link, plus one per shared widget, each with its token.","summary":"List a dashboard's share links"}},"/v2/dashboards/{id}/widgets/{widget_id}/share":{"get":{"tags":["Dashboards"],"operationId":"getDashboardWidgetShare","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true},{"name":"widget_id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardShareEncoded"},{"type":"null"}]}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503. | The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SharePersistenceError"},{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the live share link for one widget, or `null` when that widget is not shared.","summary":"Retrieve a widget's share link"},"put":{"tags":["Dashboards"],"operationId":"upsertDashboardWidgetShare","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true},{"name":"widget_id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A share link for a dashboard, including its `token`. `mode` is `public` (anyone with the link) or `org` (signed-in members of the owning organization).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardShareEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404. | The @maple/http/errors/ShareWidgetNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardNotFoundError"},{"$ref":"#/components/schemas/ShareWidgetNotFoundError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503. | The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503. | The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SharePersistenceError"},{"$ref":"#/components/schemas/ShareNotConfiguredError"},{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Creates a share link scoped to one widget, or changes the mode of the one it already has. Independent of the dashboard's own share: revoking or re-scoping the board leaves widget links untouched. A `public` widget share may be embedded in an iframe.","summary":"Share a single widget","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardShareParams"}}},"required":true}},"delete":{"tags":["Dashboards"],"operationId":"revokeDashboardWidgetShare","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true},{"name":"widget_id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Returned whether or not a live share existed — revoking an unshared dashboard is a no-op, not an error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardShareDeletedEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503. | The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SharePersistenceError"},{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Revokes the widget's share link. Idempotent — revoking an unshared widget succeeds and reports `deleted: true`.","summary":"Stop sharing a widget"}},"/v2/dashboards/{id}/widgets/{widget_id}/share/rotate":{"post":{"tags":["Dashboards"],"operationId":"rotateDashboardWidgetShare","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true},{"name":"widget_id","in":"path","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A share link for a dashboard, including its `token`. `mode` is `public` (anyone with the link) or `org` (signed-in members of the owning organization).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardShareEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ShareNotFoundError failure. HTTP 404. | The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareNotFoundError"},{"$ref":"#/components/schemas/DashboardNotFoundError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503. | The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503. | The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SharePersistenceError"},{"$ref":"#/components/schemas/ShareNotConfiguredError"},{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Revokes the widget's current link and mints a replacement. Any embed using the old URL stops rendering immediately.","summary":"Regenerate a widget's share link"}},"/v2/dashboards/{id}/share":{"get":{"tags":["Dashboards"],"operationId":"getDashboardShare","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardShareEncoded"},{"type":"null"}]}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503. | The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SharePersistenceError"},{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the dashboard's live share link and its token, or `null` when it is not shared.","summary":"Retrieve a dashboard's share link"},"put":{"tags":["Dashboards"],"operationId":"upsertDashboardShare","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A share link for a dashboard, including its `token`. `mode` is `public` (anyone with the link) or `org` (signed-in members of the owning organization).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardShareEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503. | The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503. | The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SharePersistenceError"},{"$ref":"#/components/schemas/ShareNotConfiguredError"},{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Creates the dashboard's share link, or changes the mode of the one it already has. Changing the mode keeps the same link, so the returned token is unchanged.","summary":"Share a dashboard","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardShareParams"}}},"required":true}},"delete":{"tags":["Dashboards"],"operationId":"revokeDashboardShare","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Returned whether or not a live share existed — revoking an unshared dashboard is a no-op, not an error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardShareDeletedEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503. | The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SharePersistenceError"},{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Revokes the dashboard's share link. Idempotent — revoking an unshared dashboard succeeds and reports `deleted: true`.","summary":"Stop sharing a dashboard"}},"/v2/dashboards/{id}/share/rotate":{"post":{"tags":["Dashboards"],"operationId":"rotateDashboardShare","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A share link for a dashboard, including its `token`. `mode` is `public` (anyone with the link) or `org` (signed-in members of the owning organization).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardShareEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ShareNotFoundError failure. HTTP 404. | The @maple/http/errors/DashboardNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareNotFoundError"},{"$ref":"#/components/schemas/DashboardNotFoundError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503. | The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503. | The @maple/http/errors/DashboardPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SharePersistenceError"},{"$ref":"#/components/schemas/ShareNotConfiguredError"},{"$ref":"#/components/schemas/DashboardPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Revokes the current link and mints a replacement in one step. The previous URL stops resolving immediately.","summary":"Regenerate a dashboard's share link"}},"/v2/alerts/rules":{"get":{"tags":["Alert Rules"],"operationId":"listAlertRules","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of alert rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertRuleStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertRuleStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns your organization's alert rules, most recently created first. Cursor-paginated. Requires the `alerts:read` scope.","summary":"List alert rules"},"post":{"tags":["Alert Rules"],"operationId":"createAlertRule","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The alert rule state after a create or update. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients; other public API consumers do not need it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleMutationResponse"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/errors/AlertValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/AlertValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertRuleDestinationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleDestinationNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Creates an alert rule. Referenced `destination_ids` must exist. Requires an org-admin role and the `alerts:write` scope.","summary":"Create an alert rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleCreateParams"}}},"required":true}}},"/v2/alerts/rules/{id}":{"get":{"tags":["Alert Rules"],"operationId":"getAlertRule","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A monitor that evaluates a built-in signal, query-builder query, or raw SQL over a rolling window and opens incidents when the threshold condition holds for enough consecutive checks. Metrics use the same query-builder path as metric charts. Notifications are delivered to the referenced alert destinations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRule"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertRuleNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertRuleStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertRuleStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a single alert rule by its `alrt_…` ID. Requires the `alerts:read` scope.","summary":"Retrieve an alert rule"},"patch":{"tags":["Alert Rules"],"operationId":"updateAlertRule","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The alert rule state after a create or update. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients; other public API consumers do not need it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleMutationResponse"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/errors/AlertValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/AlertValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertRuleNotFoundError failure. HTTP 404. | The @maple/http/errors/AlertRuleDestinationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertRuleNotFoundError"},{"$ref":"#/components/schemas/AlertRuleDestinationNotFoundError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertRuleStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertRuleStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Updates an alert rule. Omitted fields are left unchanged — `{\"enabled\": false}` pauses a rule without touching its condition. Requires an org-admin role and the `alerts:write` scope.","summary":"Update an alert rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleUpdateParams"}}},"required":true}},"delete":{"tags":["Alert Rules"],"operationId":"deleteAlertRule","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Confirmation that an alert rule was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleDeleteResponse"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertRuleNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Permanently deletes an alert rule and its incident history linkage. Requires an org-admin role and the `alerts:write` scope.","summary":"Delete an alert rule"}},"/v2/alerts/rules/test":{"post":{"tags":["Alert Rules"],"operationId":"testAlertRule","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The outcome of a one-off rule evaluation against live data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleTestResult"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/errors/AlertValidationError failure. HTTP 400. | The @maple/http/errors/QueryEngineValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/AlertValidationError"},{"$ref":"#/components/schemas/QueryEngineValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertRuleDestinationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleDestinationNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertDestinationDecryptionError failure. HTTP 500. | The @maple/http/errors/AlertDestinationStoredConfigInvalidError failure. HTTP 500. | The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/errors/TinybirdOrgTokenConfigError failure. HTTP 500. | The @maple/http/errors/TinybirdOrgTokenMintError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertDestinationDecryptionError"},{"$ref":"#/components/schemas/AlertDestinationStoredConfigInvalidError"},{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/TinybirdOrgTokenConfigError"},{"$ref":"#/components/schemas/TinybirdOrgTokenMintError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/AlertDeliveryError failure. HTTP 502. | The @maple/http/errors/AlertDeliveryAuthError failure. HTTP 502. | The @maple/http/errors/AlertDeliveryTargetMissingError failure. HTTP 502. | The @maple/http/errors/AlertDeliveryRejectedError failure. HTTP 502. | The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertDeliveryError"},{"$ref":"#/components/schemas/AlertDeliveryAuthError"},{"$ref":"#/components/schemas/AlertDeliveryTargetMissingError"},{"$ref":"#/components/schemas/AlertDeliveryRejectedError"},{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504. | The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineTimeoutError"},{"$ref":"#/components/schemas/WorkerUnavailableError"}]}}}}},"description":"Evaluates a rule definition once against live data without saving it, optionally delivering a test notification. Requires an org-admin role and the `alerts:write` scope.","summary":"Test an alert rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleTestParams"}}},"required":true}}},"/v2/alerts/rules/preview":{"post":{"tags":["Alert Rules"],"operationId":"previewAlertRule","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Evaluator-faithful preview of a rule over a historical range: the per-window observations the scheduler would have computed, and when incidents would have fired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRulePreviewResult"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/errors/AlertValidationError failure. HTTP 400. | The @maple/http/errors/QueryEngineValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/AlertValidationError"},{"$ref":"#/components/schemas/QueryEngineValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/errors/TinybirdOrgTokenConfigError failure. HTTP 500. | The @maple/http/errors/TinybirdOrgTokenMintError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/TinybirdOrgTokenConfigError"},{"$ref":"#/components/schemas/TinybirdOrgTokenMintError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504. | The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineTimeoutError"},{"$ref":"#/components/schemas/WorkerUnavailableError"}]}}}}},"description":"Replays a rule definition over a historical range and returns the per-window observations and would-have-fired spans. Read-only (sends nothing). Requires the `alerts:read` scope.","summary":"Preview an alert rule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRulePreviewParams"}}},"required":true}}},"/v2/alerts/rules/{id}/checks":{"get":{"tags":["Alert Rules"],"operationId":"listAlertRuleChecks","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"required":true},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"group_key","in":"query","schema":{"type":"string","description":"Only return checks for this group key.","examples":["__total__"]},"required":false},{"name":"since","in":"query","schema":{"type":"string"},"required":false},{"name":"until","in":"query","schema":{"type":"string"},"required":false},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/_maple_AlertCheckStatus"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of alert checks, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertCheckList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertRuleNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the rule's recorded evaluations (its audit trail), newest first, optionally filtered by group key and time range. Requires the `alerts:read` scope.","summary":"List a rule's checks"}},"/v2/alerts/rules/{id}/checks/summary":{"get":{"tags":["Alert Rules"],"operationId":"summarizeAlertRuleChecks","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"required":true},{"name":"since","in":"query","schema":{"type":"string"},"required":true},{"name":"until","in":"query","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Adaptive time buckets for up to one year of checks. The busiest 20 groups are preserved and the remainder is returned as `__other__`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertCheckSummary"}}}},"400":{"description":"The @maple/http/errors/AlertValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertRuleNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertRuleNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns adaptive check-history buckets for a range of up to 365 days. Requires the `alerts:read` scope.","summary":"Summarize a rule's checks"}},"/v2/alerts/deliveries":{"get":{"tags":["Alert Deliveries"],"operationId":"listAlertDeliveries","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"incident_id","in":"query","schema":{"$ref":"#/components/schemas/_maple_AlertIncidentId"},"required":false},{"name":"rule_id","in":"query","schema":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDeliveryList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the organization's most recent alert notification attempts, newest first, optionally filtered by `incident_id` or `rule_id`. Requires the `alerts:read` scope.","summary":"List alert deliveries"}},"/v2/alerts/destinations":{"get":{"tags":["Alert Destinations"],"operationId":"listAlertDestinations","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of alert destinations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertDestinationStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertDestinationStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns your organization's alert destinations, most recently created first. Cursor-paginated. Requires the `alerts:read` scope.","summary":"List alert destinations"},"post":{"tags":["Alert Destinations"],"operationId":"createAlertDestination","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"An alert destination returned by a create or update mutation, with optional sync metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationMutationResponse"}}}},"400":{"description":"The @maple/http/errors/AlertValidationError failure. HTTP 400. | The @maple/http/errors/IntegrationsValidationError failure. HTTP 400. | The @maple/http/errors/AlertRecipientSelectionError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertValidationError"},{"$ref":"#/components/schemas/IntegrationsValidationError"},{"$ref":"#/components/schemas/AlertRecipientSelectionError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/errors/IntegrationsRevokedError failure. HTTP 401. | The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsRevokedError"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"409":{"description":"The @maple/http/errors/IntegrationsNotConnectedError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsNotConnectedError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertDestinationEncryptionError failure. HTTP 500. | The @maple/http/errors/AlertMemberDirectoryNotConfiguredError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertDestinationEncryptionError"},{"$ref":"#/components/schemas/AlertMemberDirectoryNotConfiguredError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/IntegrationsUpstreamError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsUpstreamError"}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/AlertMemberDirectoryUnavailableError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/AlertMemberDirectoryUnavailableError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Creates a notification channel that alert rules can deliver to. The request body is discriminated on `type`; channel secrets are write-only. Requires an org-admin role and the `alerts:write` scope.","summary":"Create an alert destination","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationCreateParams"}}},"required":true}}},"/v2/alerts/destinations/telegram/chats":{"post":{"tags":["Alert Destinations"],"operationId":"listTelegramChats","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Chats discovered from the bot's pending updates. Not the standard list envelope: there is no cursor, because Telegram exposes a short retention window rather than a paginated inventory.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramChatList"}}}},"400":{"description":"The @maple/http/errors/AlertValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Reads a bot's pending updates and returns the chats it can currently post to, so a destination can be created by picking a chat instead of transcribing its numeric ID. The token is used for one read and never stored. Telegram retains updates for about 24 hours; a bot with a webhook registered cannot be inspected this way. Requires an org-admin role and the `alerts:write` scope.","summary":"List the chats a Telegram bot can see","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelegramChatsParams"}}},"required":true}}},"/v2/alerts/destinations/{id}":{"get":{"tags":["Alert Destinations"],"operationId":"getAlertDestination","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A notification channel that alert rules deliver to (Slack bot, PagerDuty, generic webhook, Hazel OAuth, Discord, Telegram, or workspace-member email). Channel secrets are write-only: responses carry a redacted `summary` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestination"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertDestinationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertDestinationStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertDestinationStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a single alert destination by its `dest_…` ID. Requires the `alerts:read` scope.","summary":"Retrieve an alert destination"},"patch":{"tags":["Alert Destinations"],"operationId":"updateAlertDestination","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"An alert destination returned by a create or update mutation, with optional sync metadata.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationMutationResponse"}}}},"400":{"description":"The @maple/http/errors/AlertValidationError failure. HTTP 400. | The @maple/http/errors/IntegrationsValidationError failure. HTTP 400. | The @maple/http/errors/AlertRecipientSelectionError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertValidationError"},{"$ref":"#/components/schemas/IntegrationsValidationError"},{"$ref":"#/components/schemas/AlertRecipientSelectionError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/errors/IntegrationsRevokedError failure. HTTP 401. | The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsRevokedError"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertDestinationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationNotFoundError"}}}},"409":{"description":"The @maple/http/errors/IntegrationsNotConnectedError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsNotConnectedError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertDestinationEncryptionError failure. HTTP 500. | The @maple/http/errors/AlertDestinationDecryptionError failure. HTTP 500. | The @maple/http/errors/AlertDestinationStoredConfigInvalidError failure. HTTP 500. | The @maple/http/errors/AlertMemberDirectoryNotConfiguredError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertDestinationEncryptionError"},{"$ref":"#/components/schemas/AlertDestinationDecryptionError"},{"$ref":"#/components/schemas/AlertDestinationStoredConfigInvalidError"},{"$ref":"#/components/schemas/AlertMemberDirectoryNotConfiguredError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/IntegrationsUpstreamError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsUpstreamError"}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/AlertMemberDirectoryUnavailableError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/AlertMemberDirectoryUnavailableError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Updates a destination's configuration. `type` must match the destination's existing type; omitted fields are unchanged. Requires an org-admin role and the `alerts:write` scope.","summary":"Update an alert destination","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationUpdateParams"}}},"required":true}},"delete":{"tags":["Alert Destinations"],"operationId":"deleteAlertDestination","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Confirmation that an alert destination was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationDeleteResponse"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertDestinationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationNotFoundError"}}}},"409":{"description":"The @maple/http/errors/AlertDestinationInUseError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationInUseError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertRuleStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertRuleStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Permanently deletes a destination. Fails with a `conflict_error` if any alert rule still references it — detach it from those rules first. Requires an org-admin role and the `alerts:write` scope.","summary":"Delete an alert destination"}},"/v2/alerts/destinations/{id}/test":{"post":{"tags":["Alert Destinations"],"operationId":"testAlertDestination","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The outcome of sending a test notification to a destination.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationTestResult"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertDestinationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertDestinationNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/AlertDestinationDecryptionError failure. HTTP 500. | The @maple/http/errors/AlertDestinationStoredConfigInvalidError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertDestinationDecryptionError"},{"$ref":"#/components/schemas/AlertDestinationStoredConfigInvalidError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/AlertDeliveryError failure. HTTP 502. | The @maple/http/errors/AlertDeliveryAuthError failure. HTTP 502. | The @maple/http/errors/AlertDeliveryTargetMissingError failure. HTTP 502. | The @maple/http/errors/AlertDeliveryRejectedError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertDeliveryError"},{"$ref":"#/components/schemas/AlertDeliveryAuthError"},{"$ref":"#/components/schemas/AlertDeliveryTargetMissingError"},{"$ref":"#/components/schemas/AlertDeliveryRejectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Sends a test notification through the destination and reports the delivery outcome. Requires an org-admin role and the `alerts:write` scope.","summary":"Test an alert destination"}},"/v2/alerts/incidents":{"get":{"tags":["Alert Incidents"],"operationId":"listAlertIncidents","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/_maple_AlertIncidentStatus"},"required":false},{"name":"rule_id","in":"query","schema":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of alert incidents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertIncidentList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns your organization's alert incidents, most recently triggered first, optionally filtered by `status` or `rule_id`. Cursor-paginated. Requires the `alerts:read` scope.","summary":"List alert incidents"}},"/v2/alerts/incidents/{id}":{"get":{"tags":["Alert Incidents"],"operationId":"getAlertIncident","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertIncidentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A period during which an alert rule's condition held: opened after enough consecutive breaches, resolved by the scheduler after enough consecutive healthy checks. Read-only via the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertIncident"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/AlertIncidentNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertIncidentNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AlertPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a single alert incident by its `inc_…` ID. Requires the `alerts:read` scope.","summary":"Retrieve an alert incident"}},"/v2/ingest_keys":{"get":{"tags":["Ingest Keys"],"operationId":"getIngestKeys","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Your organization's telemetry ingest credentials — a public key for client-side senders and a private key for server-side senders. A per-organization singleton: rolling a key immediately invalidates its predecessor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestKeys"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/IngestKeyEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestKeyEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IngestKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns your organization's ingest keys, creating them on first access. Requires an org-admin role and the `ingest_keys:read` scope.","summary":"Retrieve ingest keys"}},"/v2/ingest_keys/public/roll":{"post":{"tags":["Ingest Keys"],"operationId":"rollPublicIngestKey","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Your organization's telemetry ingest credentials — a public key for client-side senders and a private key for server-side senders. A per-organization singleton: rolling a key immediately invalidates its predecessor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestKeys"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/IngestKeyEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestKeyEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IngestKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Replaces the public ingest key with a new one, **immediately invalidating the previous key** — telemetry senders still using it will be rejected. Requires an org-admin role and the `ingest_keys:write` scope.","summary":"Roll the public ingest key"}},"/v2/ingest_keys/private/roll":{"post":{"tags":["Ingest Keys"],"operationId":"rollPrivateIngestKey","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Your organization's telemetry ingest credentials — a public key for client-side senders and a private key for server-side senders. A per-organization singleton: rolling a key immediately invalidates its predecessor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestKeys"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/IngestKeyEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestKeyEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IngestKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Replaces the private ingest key with a new one, **immediately invalidating the previous key** — telemetry senders still using it will be rejected. Requires an org-admin role and the `ingest_keys:write` scope.","summary":"Roll the private ingest key"}},"/v2/integrations/slack":{"get":{"tags":["Slack Integration"],"operationId":"getSlackIntegration","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The Slack app installation state for the authenticated organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackIntegration"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns whether the Maple Slack app is installed for your organization. Requires the `integrations:read` scope.","summary":"Retrieve Slack integration status"},"delete":{"tags":["Slack Integration"],"operationId":"uninstallSlackIntegration","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Confirmation that the Slack app was uninstalled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackUninstall"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Revokes the Slack installation and the API key minted for the bot. Requires an org-admin role and the `integrations:write` scope.","summary":"Uninstall the Slack app"}},"/v2/integrations/slack/install":{"post":{"tags":["Slack Integration"],"operationId":"installSlackIntegration","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The Slack OAuth authorize URL to begin an installation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackInstall"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/v2/CallbackHostUnavailableError failure. HTTP 503. | The @maple/http/errors/IntegrationsConfigurationError failure. HTTP 503. | The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CallbackHostUnavailableError"},{"$ref":"#/components/schemas/IntegrationsConfigurationError"},{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a Slack OAuth authorize URL to redirect the user to. Also the way to reconnect an existing installation (e.g. to grant newly required scopes): re-approving updates the installation in place without removing the bot from its channels. Requires an org-admin role and the `integrations:write` scope.","summary":"Begin a Slack installation"}},"/v2/integrations/slack/channels":{"get":{"tags":["Slack Integration"],"operationId":"listSlackChannels","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The channels visible to the installed Slack bot. Note: unlike every other v2 collection this response is **not** the standard `{ object: \"list\", data, has_more, next_cursor }` envelope — Maple walks Slack's `conversations.list` cursors server-side and returns the set in one response, so there is no cursor for a client to follow. The walk is page-capped; `truncated` reports whether it hit that cap.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackChannelList"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"409":{"description":"The @maple/http/errors/IntegrationsNotConnectedError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsNotConnectedError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/IntegrationsUpstreamError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsUpstreamError"}}}},"503":{"description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Lists the channels the installed Maple bot can see — including private channels the bot has been invited to. Requires an org-admin role and the `integrations:read` scope.","summary":"List Slack channels"}},"/v2/integrations/planetscale":{"get":{"tags":["PlanetScale Integration"],"operationId":"getPlanetScaleIntegration","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The PlanetScale connection state for the authenticated organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleIntegration"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/ScrapeTargetStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetStoredConfigInvalidError"}}}},"503":{"description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the PlanetScale connection state for your organization, including which branch-metrics authentication is in effect and the managed scrape target's health. Requires the `integrations:read` scope.","summary":"Retrieve PlanetScale integration status"},"delete":{"tags":["PlanetScale Integration"],"operationId":"disconnectPlanetScaleIntegration","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Confirmation that the PlanetScale connection was removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleDisconnect"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Removes the OAuth grant, the managed scrape target, and the stored metrics token. Polled inventory and recorded events are kept. Requires an org-admin role and the `integrations:write` scope.","summary":"Disconnect PlanetScale"}},"/v2/integrations/planetscale/connect":{"post":{"tags":["PlanetScale Integration"],"operationId":"connectPlanetScaleIntegration","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The PlanetScale OAuth authorize URL to begin a connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleConnect"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/v2/CallbackHostUnavailableError failure. HTTP 503. | The @maple/http/errors/IntegrationsConfigurationError failure. HTTP 503. | The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CallbackHostUnavailableError"},{"$ref":"#/components/schemas/IntegrationsConfigurationError"},{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a PlanetScale OAuth authorize URL to redirect the user to. Browser-oriented: a headless caller cannot complete the redirect, so scripted setups should connect once from the dashboard and then drive `select_organization` and `metrics_token` over the API. Requires an org-admin role and the `integrations:write` scope.","summary":"Begin a PlanetScale connection","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleConnectRequest"}}},"required":true}}},"/v2/integrations/planetscale/organizations":{"get":{"tags":["PlanetScale Integration"],"operationId":"listPlanetScaleOrganizations","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Organizations the OAuth grant can access. Note: unlike most v2 collections this is **not** the standard `{ object: \"list\", data, has_more, next_cursor }` envelope — a grant reaches a handful of organizations and PlanetScale returns them in one unpaginated response, so there is no cursor for a client to follow.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleOrganizationList"}}}},"400":{"description":"The @maple/http/errors/IntegrationsValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/errors/IntegrationsRevokedError failure. HTTP 401. | The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsRevokedError"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"409":{"description":"The @maple/http/errors/IntegrationsNotConnectedError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsNotConnectedError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/IntegrationsUpstreamError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsUpstreamError"}}}},"503":{"description":"The @maple/http/errors/IntegrationsConfigurationError failure. HTTP 503. | The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsConfigurationError"},{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Lists the PlanetScale organizations the stored OAuth grant can access — the candidates for `select_organization`. Requires an org-admin role and the `integrations:read` scope.","summary":"List reachable PlanetScale organizations"}},"/v2/integrations/planetscale/select_organization":{"post":{"tags":["PlanetScale Integration"],"operationId":"selectPlanetScaleOrganization","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The PlanetScale connection state for the authenticated organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleIntegration"}}}},"400":{"description":"The @maple/http/errors/IntegrationsValidationError failure. HTTP 400. | The @maple/http/errors/ScrapeTargetValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsValidationError"},{"$ref":"#/components/schemas/ScrapeTargetValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/errors/IntegrationsRevokedError failure. HTTP 401. | The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsRevokedError"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ScrapeTargetNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetNotFoundError"}}}},"409":{"description":"The @maple/http/errors/IntegrationsNotConnectedError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsNotConnectedError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/ScrapeTargetEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/IntegrationsUpstreamError failure. HTTP 502. | The @maple/http/errors/ScrapeTargetStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsUpstreamError"},{"$ref":"#/components/schemas/ScrapeTargetStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/IntegrationsConfigurationError failure. HTTP 503. | The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsConfigurationError"},{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Binds the stored OAuth grant to one PlanetScale organization, probes API permissions, and provisions (or adopts) the managed scrape target. Re-submitting is an upsert — use it to change organization or edit the scrape target's branch filters. Returns the refreshed integration status. Requires an org-admin role and the `integrations:write` scope.","summary":"Bind the connection to a PlanetScale organization","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleSelectOrganizationRequest"}}},"required":true}}},"/v2/integrations/planetscale/metrics_token":{"post":{"tags":["PlanetScale Integration"],"operationId":"setPlanetScaleMetricsToken","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The PlanetScale connection state for the authenticated organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleIntegration"}}}},"400":{"description":"The @maple/http/errors/IntegrationsValidationError failure. HTTP 400. | The @maple/http/errors/ScrapeTargetValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsValidationError"},{"$ref":"#/components/schemas/ScrapeTargetValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ScrapeTargetNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetNotFoundError"}}}},"409":{"description":"The @maple/http/errors/IntegrationsNotConnectedError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsNotConnectedError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/ScrapeTargetEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/IntegrationsUpstreamError failure. HTTP 502. | The @maple/http/errors/ScrapeTargetStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsUpstreamError"},{"$ref":"#/components/schemas/ScrapeTargetStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Attaches a service token carrying the single `read_metrics_endpoints` permission to the managed scrape target, enabling branch-metrics scraping. Maple validates the token against PlanetScale's metrics discovery endpoint before storing it: an invalid or under-permissioned token is rejected with `invalid_request_error` and nothing is written. Re-submitting rotates the token in place. Returns the refreshed integration status, whose `metrics_auth` becomes `service_token` on success. Requires an org-admin role and the `integrations:write` scope.","summary":"Attach a PlanetScale metrics service token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleMetricsTokenRequest"}}},"required":true}}},"/v2/integrations/planetscale/databases":{"get":{"tags":["PlanetScale Integration"],"operationId":"listPlanetScaleDatabases","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The polled database inventory. Note: unlike most v2 collections this is **not** the standard `{ object: \"list\", data, has_more, next_cursor }` envelope — the inventory is a bounded snapshot returned whole, and the envelope has no place for `last_inventory_at`, which callers need to judge staleness.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleDatabaseList"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the polled database and branch inventory for the bound organization, plus how fresh it is. Served from Maple's copy rather than live from PlanetScale. Requires the `integrations:read` scope.","summary":"List PlanetScale databases"}},"/v2/integrations/planetscale/webhook_config":{"get":{"tags":["PlanetScale Integration"],"operationId":"getPlanetScaleWebhookConfig","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The material needed to register Maple as a webhook receiver in PlanetScale. Admin-only: the response carries the signing secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleWebhookConfig"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientPermissionsError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the URL and HMAC signing secret to register in PlanetScale's per-database webhook settings, so deploy-request and branch events reach Maple live instead of waiting for the REST backfill. Admin-only because the response carries the secret. Requires an org-admin role and the `integrations:read` scope.","summary":"Retrieve the PlanetScale webhook configuration"}},"/v2/integrations/planetscale/query_insights":{"post":{"tags":["PlanetScale Integration"],"operationId":"queryPlanetScaleQueryInsights","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Top queries for one branch. Note: **not** the standard list envelope — the response is a fixed top-N with no cursor, and it carries `branch` and `unavailable_reason` alongside the rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleQueryInsightList"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/errors/IntegrationsValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/IntegrationsValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/errors/IntegrationsRevokedError failure. HTTP 401. | The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsRevokedError"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"409":{"description":"The @maple/http/errors/IntegrationsNotConnectedError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsNotConnectedError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/IntegrationsUpstreamError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsUpstreamError"}}}},"503":{"description":"The @maple/http/errors/IntegrationsConfigurationError failure. HTTP 503. | The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsConfigurationError"},{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the top queries by total time for one database branch, proxied live to PlanetScale's Query Insights API and cached briefly. Per-fingerprint cardinality is far too high to store as metrics, so this is computed on demand. A read-only operation despite being a POST — the window and filters belong in a body — so the `integrations:read` scope is sufficient.","summary":"Query PlanetScale query insights","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleQueryInsightsRequest"}}},"required":true}}},"/v2/integrations/planetscale/events":{"post":{"tags":["PlanetScale Integration"],"operationId":"listPlanetScaleEvents","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"A page of the PlanetScale lifecycle timeline. Keyset-paginated with `next_cursor`; it omits `has_more` (a null cursor says the same thing) and so is not the standard list envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleEventList"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns deploy-request transitions and branch state changes for a window, newest first — the timeline behind deployment markers on infrastructure charts. A read-only operation despite being a POST, so the `integrations:read` scope is sufficient.","summary":"List PlanetScale lifecycle events","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanetScaleEventsRequest"}}},"required":true}}},"/v2/error_issues":{"get":{"tags":["Error Issues"],"operationId":"listErrorIssues","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"workflow_state","in":"query","schema":{"$ref":"#/components/schemas/_maple_WorkflowState"},"required":false},{"name":"severity","in":"query","schema":{"anyOf":[{"$ref":"#/components/schemas/_maple_IssueSeverity"},{"type":"string","enum":["unset"]}]},"required":false},{"name":"kind","in":"query","schema":{"$ref":"#/components/schemas/_maple_IssueKind"},"required":false},{"name":"service_name","in":"query","schema":{"type":"string"},"required":false},{"name":"fingerprint_hash","in":"query","schema":{"type":"string"},"required":false},{"name":"deployment_environment","in":"query","schema":{"type":"string"},"required":false},{"name":"start_time","in":"query","schema":{"type":"string"},"required":false},{"name":"end_time","in":"query","schema":{"type":"string"},"required":false},{"name":"actionable","in":"query","schema":{"type":"string","enum":["true"]},"required":false},{"name":"sort","in":"query","schema":{"type":"string","enum":["last_seen","severity"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorIssueList"}}}},"400":{"description":"The @maple/http/v2/CursorInvalidError failure. HTTP 400. | The @maple/http/v2/CursorSortMismatchError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CursorInvalidError"},{"$ref":"#/components/schemas/CursorSortMismatchError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/ErrorPersistenceError failure. HTTP 503. | The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorPersistenceError"},{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a bounded, cursor-paginated page of your organization's issues. Requires `error_issues:read`.","summary":"List error issues"}},"/v2/error_issues/service_counts":{"get":{"tags":["Error Issues"],"operationId":"listErrorIssueServiceCounts","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorIssueServiceCountList"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ErrorPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the number of open (actionable-state) error issues per service, in one call. Alert-kind issues are excluded. Requires `error_issues:read`.","summary":"List open issue counts by service"}},"/v2/error_issues/{id}":{"get":{"tags":["Error Issues"],"operationId":"getErrorIssue","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"required":true},{"name":"start_time","in":"query","schema":{"type":"string"},"required":false},{"name":"end_time","in":"query","schema":{"type":"string"},"required":false},{"name":"bucket_seconds","in":"query","schema":{"type":"string"},"required":false},{"name":"sample_limit","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The issue resource with its requested timeseries window, sample traces, and incidents.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorIssueDetail"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ErrorIssueNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorIssueNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/ErrorPersistenceError failure. HTTP 503. | The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorPersistenceError"},{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns an issue with its timeseries, representative traces, and incident history. Requires `error_issues:read`.","summary":"Retrieve an error issue"}},"/v2/attribute_mappings":{"get":{"tags":["Attribute Mappings"],"operationId":"listAttributeMappings","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of attribute mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeMappingList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IngestAttributeMappingPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestAttributeMappingPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns your organization's attribute mappings, most recently created first. Cursor-paginated. Requires the `attribute_mappings:read` scope.","summary":"List attribute mappings"},"post":{"tags":["Attribute Mappings"],"operationId":"createAttributeMapping","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"An ingest-time attribute rewrite rule: when telemetry arrives, the value at `source_key` (in the span or resource context) is moved or copied to `target_key`. Useful for normalizing attribute names across services without redeploying them.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeMapping"}}}},"400":{"description":"The @maple/http/errors/IngestAttributeMappingValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestAttributeMappingValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IngestAttributeMappingPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestAttributeMappingPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Creates an ingest-time attribute rewrite rule. Requires the `attribute_mappings:write` scope.","summary":"Create an attribute mapping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeMappingCreateParams"}}},"required":true}}},"/v2/attribute_mappings/{id}":{"get":{"tags":["Attribute Mappings"],"operationId":"getAttributeMapping","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_IngestAttributeMappingId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"An ingest-time attribute rewrite rule: when telemetry arrives, the value at `source_key` (in the span or resource context) is moved or copied to `target_key`. Useful for normalizing attribute names across services without redeploying them.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeMapping"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/IngestAttributeMappingNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestAttributeMappingNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IngestAttributeMappingPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestAttributeMappingPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a single attribute mapping by its `amap_…` ID. Requires the `attribute_mappings:read` scope.","summary":"Retrieve an attribute mapping"},"patch":{"tags":["Attribute Mappings"],"operationId":"updateAttributeMapping","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_IngestAttributeMappingId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"An ingest-time attribute rewrite rule: when telemetry arrives, the value at `source_key` (in the span or resource context) is moved or copied to `target_key`. Useful for normalizing attribute names across services without redeploying them.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeMapping"}}}},"400":{"description":"The @maple/http/errors/IngestAttributeMappingValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestAttributeMappingValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/IngestAttributeMappingNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestAttributeMappingNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IngestAttributeMappingPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestAttributeMappingPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Updates a mapping's configuration; omitted fields are unchanged. Requires the `attribute_mappings:write` scope.","summary":"Update an attribute mapping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeMappingUpdateParams"}}},"required":true}},"delete":{"tags":["Attribute Mappings"],"operationId":"deleteAttributeMapping","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_IngestAttributeMappingId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Confirmation that an attribute mapping was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttributeMappingDeleteResponse"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/IngestAttributeMappingNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestAttributeMappingNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/IngestAttributeMappingPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IngestAttributeMappingPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Permanently deletes an attribute mapping. Already-ingested telemetry is unaffected. Requires the `attribute_mappings:write` scope.","summary":"Delete an attribute mapping"}},"/v2/scrape_targets":{"get":{"tags":["Scrape Targets"],"operationId":"listScrapeTargets","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of scrape targets.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/ScrapeTargetStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetStoredConfigInvalidError"}}}},"503":{"description":"The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns your organization's scrape targets, most recently created first. Cursor-paginated. Requires the `scrape_targets:read` scope.","summary":"List scrape targets"},"post":{"tags":["Scrape Targets"],"operationId":"createScrapeTarget","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"A metrics endpoint Maple scrapes on a schedule — a Prometheus endpoint you host, or PlanetScale branch metrics discovered from an organization. Scraped samples flow into your metrics like any other telemetry. Credentials are write-only: responses carry `has_credentials` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTarget"}}}},"400":{"description":"The @maple/http/errors/ScrapeTargetValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/ScrapeTargetEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Creates a scrape target. `prometheus` targets need a `url`; `planetscale` targets need an `organization` (the URL is derived). Requires the `scrape_targets:write` scope.","summary":"Create a scrape target","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetCreateParams"}}},"required":true}}},"/v2/scrape_targets/{id}":{"get":{"tags":["Scrape Targets"],"operationId":"getScrapeTarget","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_ScrapeTargetId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A metrics endpoint Maple scrapes on a schedule — a Prometheus endpoint you host, or PlanetScale branch metrics discovered from an organization. Scraped samples flow into your metrics like any other telemetry. Credentials are write-only: responses carry `has_credentials` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTarget"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ScrapeTargetNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/ScrapeTargetStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetStoredConfigInvalidError"}}}},"503":{"description":"The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a single scrape target by its `scrp_…` ID. Requires the `scrape_targets:read` scope.","summary":"Retrieve a scrape target"},"patch":{"tags":["Scrape Targets"],"operationId":"updateScrapeTarget","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_ScrapeTargetId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A metrics endpoint Maple scrapes on a schedule — a Prometheus endpoint you host, or PlanetScale branch metrics discovered from an organization. Scraped samples flow into your metrics like any other telemetry. Credentials are write-only: responses carry `has_credentials` instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTarget"}}}},"400":{"description":"The @maple/http/errors/ScrapeTargetValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ScrapeTargetNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/ScrapeTargetEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/ScrapeTargetStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetStoredConfigInvalidError"}}}},"503":{"description":"The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Updates a target's configuration; omitted fields are unchanged. Requires the `scrape_targets:write` scope.","summary":"Update a scrape target","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetUpdateParams"}}},"required":true}},"delete":{"tags":["Scrape Targets"],"operationId":"deleteScrapeTarget","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_ScrapeTargetId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Confirmation that a scrape target was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetDeleteResponse"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ScrapeTargetNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Permanently deletes a scrape target and stops scraping it. Already-ingested metrics are unaffected. Requires the `scrape_targets:write` scope.","summary":"Delete a scrape target"}},"/v2/scrape_targets/{id}/probe":{"post":{"tags":["Scrape Targets"],"operationId":"probeScrapeTarget","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_ScrapeTargetId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The outcome of an on-demand probe scrape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetProbeResult"}}}},"400":{"description":"The @maple/http/errors/IntegrationsValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/errors/IntegrationsRevokedError failure. HTTP 401. | The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsRevokedError"},{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ScrapeTargetNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetNotFoundError"}}}},"409":{"description":"The @maple/http/errors/IntegrationsNotConnectedError failure. HTTP 409.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsNotConnectedError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/ScrapeTargetEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/IntegrationsUpstreamError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsUpstreamError"}}}},"503":{"description":"The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503. | The @maple/http/errors/IntegrationsConfigurationError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/IntegrationsPersistenceError"},{"$ref":"#/components/schemas/IntegrationsConfigurationError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Runs an on-demand scrape against the target and reports the outcome without waiting for the schedule. Requires the `scrape_targets:write` scope.","summary":"Probe a scrape target"}},"/v2/scrape_targets/{id}/checks":{"get":{"tags":["Scrape Targets"],"operationId":"listScrapeTargetChecks","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_ScrapeTargetId"},"required":true},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"since","in":"query","schema":{"type":"string"},"required":false},{"name":"until","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of scrape checks, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetCheckList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/ScrapeTargetNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapeTargetNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ScrapeTargetPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns recent scheduled-scrape attempts for the target, newest first, optionally bounded by `since`/`until`. Cursor-paginated over the most recent 200 checks. Requires the `scrape_targets:read` scope.","summary":"List scrape checks"}},"/v2/instrumentation/recommendations":{"get":{"tags":["Instrumentation Recommendations"],"operationId":"listInstrumentationRecommendations","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of recommendations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/RecommendationIssuePersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RecommendationIssuePersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Reconciles instrumentation recommendations against your live telemetry and returns the full numbered list. Cursor-paginated. Requires the `instrumentation:read` scope.","summary":"List instrumentation recommendations"}},"/v2/instrumentation/recommendations/{id}/dismiss":{"post":{"tags":["Instrumentation Recommendations"],"operationId":"dismissInstrumentationRecommendation","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_RecommendationIssueId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"An instrumentation improvement detected from your live telemetry — for example a non-canonical attribute name that should be renamed. Recommendations are reconciled automatically against incoming data; dismiss ones you don't plan to act on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recommendation"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/RecommendationIssueNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationIssueNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/RecommendationIssuePersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RecommendationIssuePersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Marks an instrumentation recommendation as dismissed so it stops appearing as actionable. Requires the `instrumentation:write` scope.","summary":"Dismiss an instrumentation recommendation"}},"/v2/instrumentation/recommendations/{id}/reopen":{"post":{"tags":["Instrumentation Recommendations"],"operationId":"reopenInstrumentationRecommendation","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_RecommendationIssueId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"An instrumentation improvement detected from your live telemetry — for example a non-canonical attribute name that should be renamed. Recommendations are reconciled automatically against incoming data; dismiss ones you don't plan to act on.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recommendation"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/RecommendationIssueNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecommendationIssueNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/RecommendationIssuePersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RecommendationIssuePersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a dismissed instrumentation recommendation to the `open` state. Requires the `instrumentation:write` scope.","summary":"Reopen an instrumentation recommendation"}},"/v2/instrumentation/audit":{"get":{"tags":["Setup Audit"],"operationId":"getSetupAudit","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"A point-in-time audit of the organization's Maple setup: whether alerts can actually deliver, whether every service is sending the signals you expect, whether attribute conventions hold, and whether traces arrive intact. Recomputed on every request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupAudit"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/SetupAuditUnavailableError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SetupAuditUnavailableError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Audits the organization's Maple setup and returns every check with its outcome. Covers alert routing and delivery health, error-notification wiring, ingest coverage per service, attribute conventions, trace completeness, and integration health. Configuration checks always run; telemetry-backed checks report `skip` when the warehouse is unavailable, so this endpoint returns `503` only if configuration itself cannot be read. Requires the `instrumentation:read` scope.","summary":"Retrieve the setup audit"}},"/v2/investigations":{"get":{"tags":["Investigations"],"operationId":"listInvestigations","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/_maple_InvestigationStatus"},"required":false},{"name":"issue_id","in":"query","schema":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"required":false},{"name":"incident_kind","in":"query","schema":{"$ref":"#/components/schemas/_maple_AiTriageIncidentKind"},"required":false},{"name":"incident_id","in":"query","schema":{"anyOf":[{"$ref":"#/components/schemas/_maple_ErrorIncidentId"},{"$ref":"#/components/schemas/_maple_AnomalyIncidentId"},{"$ref":"#/components/schemas/_maple_AlertIncidentId"}],"description":"Only return investigations for this prefixed incident ID."},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of investigations, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/investigations/InvestigationDataCorruptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationDataCorruptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/investigations/InvestigationPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns your organization's investigations, newest first, optionally filtered by status, error issue, or incident. Cursor-paginated. Requires the `investigations:read` scope.","summary":"List investigations"},"post":{"tags":["Investigations"],"operationId":"createInvestigation","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"A durable investigation 'war-room' — an autonomous or human-opened diagnostic session over an incident or an ad-hoc question. Carries the structured AI diagnosis once it lands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Investigation"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/investigations/InvestigationDataCorruptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationDataCorruptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/investigations/InvestigationPersistenceError failure. HTTP 503. | The @maple/http/investigations/InvestigationAgentUnavailableError failure. HTTP 503. | The @maple/http/investigations/InvestigationStartFailedError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationPersistenceError"},{"$ref":"#/components/schemas/InvestigationAgentUnavailableError"},{"$ref":"#/components/schemas/InvestigationStartFailedError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Opens an investigation over an incident or an ad-hoc question. Incident-anchored investigations return the existing war-room if one is already open. Requires the `investigations:write` scope.","summary":"Open an investigation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationCreateParams"}}},"required":true}}},"/v2/investigations/{id}":{"get":{"tags":["Investigations"],"operationId":"getInvestigation","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_InvestigationId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A durable investigation 'war-room' — an autonomous or human-opened diagnostic session over an incident or an ad-hoc question. Carries the structured AI diagnosis once it lands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Investigation"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/investigations/InvestigationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/investigations/InvestigationDataCorruptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationDataCorruptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/investigations/InvestigationPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a single investigation by its `inv_…` ID, including its diagnosis when one exists. Requires the `investigations:read` scope.","summary":"Retrieve an investigation"}},"/v2/investigations/{id}/restart":{"post":{"tags":["Investigations"],"operationId":"restartInvestigation","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_InvestigationId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A durable investigation 'war-room' — an autonomous or human-opened diagnostic session over an incident or an ad-hoc question. Carries the structured AI diagnosis once it lands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Investigation"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/investigations/InvestigationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/investigations/InvestigationDataCorruptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationDataCorruptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/investigations/InvestigationPersistenceError failure. HTTP 503. | The @maple/http/investigations/InvestigationAgentUnavailableError failure. HTTP 503. | The @maple/http/investigations/InvestigationStartFailedError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationPersistenceError"},{"$ref":"#/components/schemas/InvestigationAgentUnavailableError"},{"$ref":"#/components/schemas/InvestigationStartFailedError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Starts a replacement autonomous pass while retaining the previous report until a new diagnosis lands. Requires the `investigations:write` scope.","summary":"Restart an investigation"}},"/v2/investigations/{id}/status":{"post":{"tags":["Investigations"],"operationId":"updateInvestigationStatus","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_InvestigationId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A durable investigation 'war-room' — an autonomous or human-opened diagnostic session over an incident or an ad-hoc question. Carries the structured AI diagnosis once it lands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Investigation"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/investigations/InvestigationNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/investigations/InvestigationDataCorruptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationDataCorruptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/investigations/InvestigationPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvestigationPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Changes an investigation's lifecycle status (e.g. resolve it). Requires the `investigations:write` scope.","summary":"Update investigation status","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestigationStatusUpdateParams"}}},"required":true}}},"/v2/anomalies/incidents":{"get":{"tags":["Anomalies"],"operationId":"listAnomalyIncidents","parameters":[{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/_maple_AnomalyIncidentStatus"},"required":false},{"name":"signal_type","in":"query","schema":{"$ref":"#/components/schemas/_maple_AnomalySignalType"},"required":false},{"name":"service_name","in":"query","schema":{"type":"string","description":"Filter by service name."},"required":false},{"name":"deployment_env","in":"query","schema":{"type":"string","description":"Filter by deployment environment."},"required":false},{"name":"error_issue_id","in":"query","schema":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"required":false},{"name":"start_time","in":"query","schema":{"type":"string"},"required":false},{"name":"end_time","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of anomaly incidents, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyIncidentList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/anomalies/AnomalyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnomalyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns your organization's anomaly incidents, newest first, with optional filters. Cursor-paginated. Requires the `anomalies:read` scope.","summary":"List anomaly incidents"}},"/v2/anomalies/incidents/service_counts":{"get":{"tags":["Anomalies"],"operationId":"listAnomalyServiceCounts","parameters":[{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/_maple_AnomalyIncidentStatus_2"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Every group for the org in one page — the aggregate is not paginated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyServiceCountList"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/anomalies/AnomalyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnomalyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns open anomaly incidents collapsed to one row per (service, environment, signal), with the worst severity and most recent trigger — the whole fleet in one call, without paging the incident list. Requires the `anomalies:read` scope.","summary":"List anomaly counts by service"}},"/v2/anomalies/incidents/{id}":{"get":{"tags":["Anomalies"],"operationId":"getAnomalyIncident","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AnomalyIncidentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A detected anomaly on a monitored signal (error rate, latency, throughput, error spike, or log volume) for a service and environment, opened by Maple's baseline detector.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyIncident"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/anomalies/AnomalyIncidentNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyIncidentNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/anomalies/AnomalyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnomalyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a single anomaly incident by its `anom_…` ID. Requires the `anomalies:read` scope.","summary":"Retrieve an anomaly incident"}},"/v2/anomalies/incidents/{id}/timeseries":{"get":{"tags":["Anomalies"],"operationId":"getAnomalyIncidentTimeseries","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AnomalyIncidentId"},"required":true},{"name":"start_time","in":"query","schema":{"type":"string"},"required":false},{"name":"end_time","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The monitored signal's timeseries around an incident, with the baseline and threshold.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyIncidentTimeseries"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/anomalies/AnomalyIncidentNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyIncidentNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/anomalies/AnomalyPersistenceError failure. HTTP 503. | The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnomalyPersistenceError"},{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the monitored signal's timeseries around the incident, with baseline and threshold overlays. Requires the `anomalies:read` scope.","summary":"Retrieve incident timeseries"}},"/v2/anomalies/incidents/{id}/resolve":{"post":{"tags":["Anomalies"],"operationId":"resolveAnomalyIncident","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AnomalyIncidentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A detected anomaly on a monitored signal (error rate, latency, throughput, error spike, or log volume) for a service and environment, opened by Maple's baseline detector.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyIncident"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/anomalies/AnomalyIncidentNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyIncidentNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/anomalies/AnomalyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnomalyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Manually resolves an open anomaly incident and returns it. Requires the `anomalies:write` scope.","summary":"Resolve an anomaly incident"}},"/v2/anomalies/incidents/{id}/issue":{"put":{"tags":["Anomalies"],"operationId":"setAnomalyIncidentIssue","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AnomalyIncidentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A detected anomaly on a monitored signal (error rate, latency, throughput, error spike, or log volume) for a service and environment, opened by Maple's baseline detector.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyIncident"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/anomalies/AnomalyIncidentNotFoundError failure. HTTP 404. | The @maple/http/anomalies/AnomalyLinkedIssueNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnomalyIncidentNotFoundError"},{"$ref":"#/components/schemas/AnomalyLinkedIssueNotFoundError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ErrorPersistenceError failure. HTTP 503. | The @maple/http/anomalies/AnomalyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorPersistenceError"},{"$ref":"#/components/schemas/AnomalyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Links (or unlinks, with `issue_id: null`) an error issue to an anomaly incident. Requires the `anomalies:write` scope.","summary":"Link an error issue to an incident","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalyLinkIssueParams"}}},"required":true}}},"/v2/anomalies/settings":{"get":{"tags":["Anomalies"],"operationId":"getAnomalySettings","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Org-wide anomaly detector configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalySettings"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/anomalies/AnomalyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnomalyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the org-wide anomaly detector settings. Requires the `anomalies:read` scope.","summary":"Retrieve anomaly settings"},"patch":{"tags":["Anomalies"],"operationId":"updateAnomalySettings","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Org-wide anomaly detector configuration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalySettings"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/anomalies/AnomalyForbiddenError failure. HTTP 403. | The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnomalyForbiddenError"},{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/anomalies/AnomalyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnomalyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Updates the org-wide detector settings; omitted fields are unchanged. Org-admin only. Requires the `anomalies:write` scope.","summary":"Update anomaly settings","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnomalySettingsUpdateParams"}}},"required":true}}},"/v2/organization":{"get":{"tags":["Organization"],"operationId":"getOrganization","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"The authenticated organization. Identity is sourced from the auth provider; in self-hosted mode only the `id` is populated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/OrganizationProviderError failure. HTTP 502.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationProviderError"}}}},"503":{"description":"The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the organization the credentials belong to. Requires the `organization:read` scope.","summary":"Retrieve the organization"}},"/v2/mobile_devices":{"get":{"tags":["Mobile Devices"],"operationId":"listMobileDevices","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDeviceList"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/MobileDevicePersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MobileDevicePersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the devices the current user has registered in the current organization. Requires the `mobile_devices:read` scope.","summary":"List my devices"}},"/v2/mobile_devices/{token}":{"put":{"tags":["Mobile Devices"],"operationId":"registerMobileDevice","parameters":[{"name":"token","in":"path","schema":{"type":"string","allOf":[{"minLength":16},{"maxLength":512,"title":"Device token","description":"The platform push token — the hex APNs device token on iOS. Opaque to Maple.","examples":["a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90"]}]},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A phone registered for push notifications by the current user in the current organization. Alert incidents fan out to every enabled device whose preferences include the event.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDevice"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/MobileDevicePersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MobileDevicePersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Upserts the device identified by its push token for the current user and organization, re-enabling it if the platform had marked it dead. Requires the `mobile_devices:write` scope.","summary":"Register or refresh a device","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDeviceRegisterParams"}}},"required":true}},"delete":{"tags":["Mobile Devices"],"operationId":"unregisterMobileDevice","parameters":[{"name":"token","in":"path","schema":{"type":"string","allOf":[{"minLength":16},{"maxLength":512,"title":"Device token","description":"The platform push token — the hex APNs device token on iOS. Opaque to Maple.","examples":["a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90"]}]},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"MobileDeviceDeleteResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDeviceDeleteResponse"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/MobileDeviceNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDeviceNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/MobileDevicePersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MobileDevicePersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Removes the device from the current organization; the app calls this on sign-out. Requires the `mobile_devices:write` scope.","summary":"Unregister a device"}},"/v2/mobile_devices/{token}/live_activities/{incident_id}":{"put":{"tags":["Mobile Devices"],"operationId":"registerLiveActivity","parameters":[{"name":"token","in":"path","schema":{"type":"string","allOf":[{"minLength":16},{"maxLength":512,"title":"Device token","description":"The platform push token — the hex APNs device token on iOS. Opaque to Maple.","examples":["a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90"]}]},"required":true},{"name":"incident_id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertIncidentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A Lock Screen Live Activity running on one device for one alert incident. Maple pushes updates to it as the incident renotifies, and ends it when the incident resolves.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveActivity"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/MobileDeviceNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDeviceNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/MobileDevicePersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MobileDevicePersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Records the APNs update token for a Live Activity the device started for this incident, so Maple can update and end it. Requires the `mobile_devices:write` scope.","summary":"Register a Live Activity update token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveActivityRegisterParams"}}},"required":true}},"delete":{"tags":["Mobile Devices"],"operationId":"endLiveActivity","parameters":[{"name":"token","in":"path","schema":{"type":"string","allOf":[{"minLength":16},{"maxLength":512,"title":"Device token","description":"The platform push token — the hex APNs device token on iOS. Opaque to Maple.","examples":["a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90"]}]},"required":true},{"name":"incident_id","in":"path","schema":{"$ref":"#/components/schemas/_maple_AlertIncidentId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"LiveActivityDeleteResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveActivityDeleteResponse"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/errors/MobileDeviceNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileDeviceNotFoundError"}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/MobileDevicePersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MobileDevicePersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Called when the activity ended on the device — dismissed by the user or ended by the app — so Maple stops pushing to a dead token. Requires the `mobile_devices:write` scope.","summary":"Forget a Live Activity"}},"/v2/session_replays/search":{"post":{"tags":["Session Replays"],"operationId":"searchSessionReplays","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of session replays, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplayList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Searches recorded browser sessions within a time window, with optional filters. Cursor-paginated. Requires the `session_replays:read` scope. (For reverse correlation from a trace, use `POST /v2/session_replays/for_trace`.)","summary":"Search session replays","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplaySearchParams"}}},"required":true}}},"/v2/session_replays/{id}":{"get":{"tags":["Session Replays"],"operationId":"getSessionReplay","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_SessionId"},"required":true},{"name":"window_start","in":"query","schema":{"type":"string"},"required":false},{"name":"window_end","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A recorded browser session with full detail, returned by retrieve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplay"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/v2/SessionReplayNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplayNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a single session replay by its `srep_…` ID with full detail. Requires the `session_replays:read` scope.","summary":"Retrieve a session replay"}},"/v2/session_replays/{id}/manifest":{"get":{"tags":["Session Replays"],"operationId":"getSessionReplayManifest","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_SessionId"},"required":true},{"name":"window_start","in":"query","schema":{"type":"string"},"required":false},{"name":"window_end","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"The session's chunk timeline without payloads — fetch this first, then request payload ranges against it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplayManifest"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/v2/SessionReplayNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplayNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns every chunk's position and size without payloads — the session's timeline in one cheap read. Fetch this before `/events`: a session's payload can run to hundreds of megabytes, so it must be pulled a range at a time, and the manifest is what tells you which ranges exist and where the seekable checkpoints are. Requires the `session_replays:read` scope.","summary":"Retrieve a session replay manifest"}},"/v2/session_replays/{id}/events":{"get":{"tags":["Session Replays"],"operationId":"getSessionReplayEvents","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_SessionId"},"required":true},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"window_start","in":"query","schema":{"type":"string"},"required":false},{"name":"window_end","in":"query","schema":{"type":"string"},"required":false},{"name":"from_chunk_seq","in":"query","schema":{"type":"string","allOf":[{"pattern":"^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$"}]},"required":false},{"name":"to_chunk_seq","in":"query","schema":{"type":"string","allOf":[{"pattern":"^[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?$"}]},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of rrweb event chunks, in order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplayChunkList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/v2/SessionReplayNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplayNotFoundError"}}}},"413":{"description":"The @maple/http/v2/SessionReplayRangeTooLargeError failure. HTTP 413.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplayRangeTooLargeError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the session's rrweb event chunks (player payload) in order. Scope the read with `from_chunk_seq`/`to_chunk_seq` from the manifest; the response is capped, and a range whose payload exceeds the cap is refused with `range_too_large` rather than truncated silently. Cursor-paginated within the range. Requires the `session_replays:read` scope.","summary":"List session replay events"}},"/v2/session_replays/{id}/transcript":{"get":{"tags":["Session Replays"],"operationId":"getSessionReplayTranscript","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/_maple_SessionId"},"required":true},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"window_start","in":"query","schema":{"type":"string"},"required":false},{"name":"window_end","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of distilled transcript events, in order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTranscriptList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/v2/SessionReplayNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplayNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the session's distilled transcript (navigation, clicks, network, console, errors) in order. Cursor-paginated. Requires the `session_replays:read` scope.","summary":"List session transcript events"}},"/v2/session_replays/for_trace":{"post":{"tags":["Session Replays"],"operationId":"listSessionReplaysForTrace","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"A cursor-paginated page of session references correlated to a trace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplayRefList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns lightweight references to the sessions that contain a given trace. Cursor-paginated. Requires the `session_replays:read` scope.","summary":"Find sessions for a trace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionReplaysForTraceParams"}}},"required":true}}},"/v2/traces/search":{"post":{"tags":["Traces"],"operationId":"searchTraces","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceList"}}}},"400":{"description":"The @maple/http/v2/CursorInvalidError failure. HTTP 400. | The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CursorInvalidError"},{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Searches root traces in an explicit time window. Requires `traces:read`.","summary":"Search traces","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceSearchParams"}}},"required":true}}},"/v2/traces/timeseries":{"post":{"tags":["Traces"],"operationId":"queryTraceTimeseries","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"TraceTimeseriesResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTimeseriesResult"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/TelemetryBucketCountTooLargeError failure. HTTP 400. | The @maple/http/v2/TraceQueryInvalidError failure. HTTP 400. | The @maple/http/errors/QueryEngineValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/TelemetryBucketCountTooLargeError"},{"$ref":"#/components/schemas/TraceQueryInvalidError"},{"$ref":"#/components/schemas/QueryEngineValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/errors/QueryEngineResultMismatchError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/QueryEngineResultMismatchError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504. | The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineTimeoutError"},{"$ref":"#/components/schemas/WorkerUnavailableError"}]}}}}},"description":"Aggregates traces into chronological series. Requires `traces:read`.","summary":"Query trace timeseries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceTimeseriesParams"}}},"required":true}}},"/v2/traces/breakdown":{"post":{"tags":["Traces"],"operationId":"queryTraceBreakdown","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"TraceBreakdownResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceBreakdownResult"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/TelemetryBreakdownFilterRequiredError failure. HTTP 400. | The @maple/http/v2/TraceQueryInvalidError failure. HTTP 400. | The @maple/http/errors/QueryEngineValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/TelemetryBreakdownFilterRequiredError"},{"$ref":"#/components/schemas/TraceQueryInvalidError"},{"$ref":"#/components/schemas/QueryEngineValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/errors/QueryEngineResultMismatchError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/QueryEngineResultMismatchError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504. | The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineTimeoutError"},{"$ref":"#/components/schemas/WorkerUnavailableError"}]}}}}},"description":"Aggregates traces by one dimension. Requires `traces:read`.","summary":"Query trace breakdown","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceBreakdownParams"}}},"required":true}}},"/v2/traces/{trace_id}":{"get":{"tags":["Traces"],"operationId":"getTrace","parameters":[{"name":"trace_id","in":"path","schema":{"$ref":"#/components/schemas/_maple_TraceId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A trace and its spans.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Trace"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/v2/TraceNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a trace and its flat parent-linked span collection. Requires `traces:read`.","summary":"Retrieve a trace"}},"/v2/traces/{trace_id}/spans/{span_id}":{"get":{"tags":["Traces"],"operationId":"getSpan","parameters":[{"name":"trace_id","in":"path","schema":{"$ref":"#/components/schemas/_maple_TraceId"},"required":true},{"name":"span_id","in":"path","schema":{"$ref":"#/components/schemas/_maple_SpanId"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"An OpenTelemetry span.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Span"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/v2/SpanNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpanNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns one span with complete attribute maps. Requires `traces:read`.","summary":"Retrieve a span"}},"/v2/logs/search":{"post":{"tags":["Logs"],"operationId":"searchLogs","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogList"}}}},"400":{"description":"The @maple/http/v2/CursorInvalidError failure. HTTP 400. | The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CursorInvalidError"},{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Searches logs in an explicit time window. Requires `logs:read`.","summary":"Search logs","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogSearchParams"}}},"required":true}}},"/v2/logs/timeseries":{"post":{"tags":["Logs"],"operationId":"queryLogTimeseries","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"LogTimeseriesResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogTimeseriesResult"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/TelemetryBucketCountTooLargeError failure. HTTP 400. | The @maple/http/v2/LogQueryInvalidError failure. HTTP 400. | The @maple/http/errors/QueryEngineValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/TelemetryBucketCountTooLargeError"},{"$ref":"#/components/schemas/LogQueryInvalidError"},{"$ref":"#/components/schemas/QueryEngineValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/errors/QueryEngineResultMismatchError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/QueryEngineResultMismatchError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504. | The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineTimeoutError"},{"$ref":"#/components/schemas/WorkerUnavailableError"}]}}}}},"description":"Counts logs in chronological buckets. Requires `logs:read`.","summary":"Query log timeseries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogTimeseriesParams"}}},"required":true}}},"/v2/logs/breakdown":{"post":{"tags":["Logs"],"operationId":"queryLogBreakdown","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"LogBreakdownResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogBreakdownResult"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/TelemetryBreakdownFilterRequiredError failure. HTTP 400. | The @maple/http/v2/LogQueryInvalidError failure. HTTP 400. | The @maple/http/errors/QueryEngineValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/TelemetryBreakdownFilterRequiredError"},{"$ref":"#/components/schemas/LogQueryInvalidError"},{"$ref":"#/components/schemas/QueryEngineValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/errors/QueryEngineResultMismatchError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/QueryEngineResultMismatchError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504. | The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineTimeoutError"},{"$ref":"#/components/schemas/WorkerUnavailableError"}]}}}}},"description":"Counts logs by service or severity. Requires `logs:read`.","summary":"Query log breakdown","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogBreakdownParams"}}},"required":true}}},"/v2/logs/{id}":{"get":{"tags":["Logs"],"operationId":"getLog","parameters":[{"name":"id","in":"path","schema":{"$ref":"#/components/schemas/LogIdEncoded"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"An OpenTelemetry log record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Log"}}}},"400":{"description":"The @maple/http/v2/LogIdInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LogIdInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/v2/LogNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns a log by its opaque `log_…` ID. Requires `logs:read`.","summary":"Retrieve a log"}},"/v2/metrics":{"get":{"tags":["Metrics"],"operationId":"listMetrics","parameters":[{"name":"start_time","in":"query","schema":{"type":"string"},"required":true},{"name":"end_time","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"service_name","in":"query","schema":{"$ref":"#/components/schemas/_maple_ServiceName"},"required":false},{"name":"metric_type","in":"query","schema":{"type":"string"},"required":false},{"name":"search","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Lists metric catalog entries in an explicit time window. Requires `metrics:read`.","summary":"List metrics"}},"/v2/metrics/timeseries":{"post":{"tags":["Metrics"],"operationId":"queryMetricsTimeseries","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"MetricTimeseriesResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricTimeseriesResult"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/TelemetryBucketCountTooLargeError failure. HTTP 400. | The @maple/http/v2/MetricQueryInvalidError failure. HTTP 400. | The @maple/http/errors/QueryEngineValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/TelemetryBucketCountTooLargeError"},{"$ref":"#/components/schemas/MetricQueryInvalidError"},{"$ref":"#/components/schemas/QueryEngineValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/errors/QueryEngineResultMismatchError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/QueryEngineResultMismatchError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504. | The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineTimeoutError"},{"$ref":"#/components/schemas/WorkerUnavailableError"}]}}}}},"description":"Executes one typed metric timeseries query. Requires `metrics:read`.","summary":"Query metric timeseries","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsTimeseriesParams"}}},"required":true}}},"/v2/metrics/breakdown":{"post":{"tags":["Metrics"],"operationId":"queryMetricBreakdown","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"MetricBreakdownResult","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricBreakdownResult"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/TelemetryBreakdownFilterRequiredError failure. HTTP 400. | The @maple/http/v2/MetricQueryInvalidError failure. HTTP 400. | The @maple/http/errors/QueryEngineValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/TelemetryBreakdownFilterRequiredError"},{"$ref":"#/components/schemas/MetricQueryInvalidError"},{"$ref":"#/components/schemas/QueryEngineValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/errors/QueryEngineResultMismatchError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/QueryEngineResultMismatchError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504. | The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineTimeoutError"},{"$ref":"#/components/schemas/WorkerUnavailableError"}]}}}}},"description":"Aggregates one metric by a single dimension. Requires `metrics:read`.","summary":"Query metric breakdown","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsBreakdownParams"}}},"required":true}}},"/v2/services":{"get":{"tags":["Services"],"operationId":"listServices","parameters":[{"name":"start_time","in":"query","schema":{"type":"string"},"required":true},{"name":"end_time","in":"query","schema":{"type":"string"},"required":true},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"cursor","in":"query","schema":{"type":"string","title":"Cursor","description":"Opaque pagination cursor. Pass the `next_cursor` from a previous response to fetch the following page. Omit for the first page.","examples":["off_1k"]},"required":false},{"name":"deployment_environment","in":"query","schema":{"type":"string"},"required":false},{"name":"service_namespace","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Cursor-paginated list envelope wrapping a page of objects.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceList"}}}},"400":{"description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400. | The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ParameterInvalidError"},{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Lists services aggregated by name in an explicit time window. Requires `services:read`.","summary":"List services"}},"/v2/services/{name}":{"get":{"tags":["Services"],"operationId":"getService","parameters":[{"name":"name","in":"path","schema":{"$ref":"#/components/schemas/_maple_ServiceName"},"required":true},{"name":"start_time","in":"query","schema":{"type":"string"},"required":true},{"name":"end_time","in":"query","schema":{"type":"string"},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"An observed service aggregated by service name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Service"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"404":{"description":"The @maple/http/v2/ServiceNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceNotFoundError"}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns one service aggregated across environments and namespaces. Requires `services:read`.","summary":"Retrieve a service"}},"/v2/service_map":{"get":{"tags":["Service Map"],"operationId":"getServiceMap","parameters":[{"name":"start_time","in":"query","schema":{"type":"string"},"required":true},{"name":"end_time","in":"query","schema":{"type":"string"},"required":true},{"name":"service_name","in":"query","schema":{"$ref":"#/components/schemas/_maple_ServiceName"},"required":false},{"name":"deployment_environment","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"ServiceMap","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceMap"}}}},"400":{"description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400. | The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TimeRangeInvalidError"},{"$ref":"#/components/schemas/TelemetryRangeTooLargeError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns service-to-service dependencies in an explicit time window. Requires `service_map:read`.","summary":"Retrieve the service map"}},"/v2/share/resolve":{"post":{"tags":["Shares"],"operationId":"resolveShare","parameters":[],"security":[],"responses":{"200":{"description":"SharedDashboardResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedDashboardResponseEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"403":{"description":"The @maple/http/errors/ShareSignInRequiredError failure. HTTP 403. | The @maple/http/errors/ShareWrongOrgError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareSignInRequiredError"},{"$ref":"#/components/schemas/ShareWrongOrgError"}]}}}},"404":{"description":"The @maple/http/errors/ShareNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareNotFoundError"}}}},"429":{"description":"The @maple/http/errors/ShareRateLimitedError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRateLimitedError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503. | The @maple/http/errors/SharePersistenceError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareNotConfiguredError"},{"$ref":"#/components/schemas/SharePersistenceError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Exchanges a share token for the dashboard it points at, as a redacted projection carrying no stored queries. Unknown, revoked, and deleted links are deliberately indistinguishable.","summary":"Open a shared dashboard","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareResolveRequest"}}},"required":true}}},"/v2/share/widget-data":{"post":{"tags":["Shares"],"operationId":"resolveShareWidgetData","parameters":[],"security":[],"responses":{"200":{"description":"ShareWidgetDataResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareWidgetDataResponseEncoded"}}}},"400":{"description":"The @maple/http/errors/ShareRangeInvalidError failure. HTTP 400. | The @maple/http/errors/ShareVariableInvalidError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareRangeInvalidError"},{"$ref":"#/components/schemas/ShareVariableInvalidError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"403":{"description":"The @maple/http/errors/ShareSignInRequiredError failure. HTTP 403. | The @maple/http/errors/ShareWrongOrgError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareSignInRequiredError"},{"$ref":"#/components/schemas/ShareWrongOrgError"}]}}}},"404":{"description":"The @maple/http/errors/ShareNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareNotFoundError"}}}},"429":{"description":"The @maple/http/errors/ShareRateLimitedError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRateLimitedError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503. | The @maple/http/errors/SharePersistenceError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareNotConfiguredError"},{"$ref":"#/components/schemas/SharePersistenceError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns rows for up to four widgets on a shared dashboard. The caller names widgets only — every query is built server-side from the stored document, never from the request.","summary":"Read data for shared widgets","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareWidgetDataPayload"}}},"required":true}}},"/v2/share/og-meta":{"post":{"tags":["Shares"],"operationId":"resolveShareOgMeta","parameters":[],"security":[],"responses":{"200":{"description":"ShareOgMetaResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareOgMetaResponseEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The @maple/http/errors/ShareNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareNotFoundError"}}}},"429":{"description":"The @maple/http/errors/ShareRateLimitedError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRateLimitedError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503. | The @maple/http/errors/SharePersistenceError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareNotConfiguredError"},{"$ref":"#/components/schemas/SharePersistenceError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Returns the title, description and preview-image path for a public share link, for the worker that serves the page to inline into its HTML. Org-only links resolve as not found: their board's name must not travel to whatever renders the link preview.","summary":"Read a share link's social preview tags","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareOgMetaRequest"}}},"required":true}}},"/v2/share/og-card":{"post":{"tags":["Shares"],"operationId":"resolveShareOgCard","parameters":[],"security":[],"responses":{"200":{"description":"ShareOgCardResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareOgCardResponseEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The @maple/http/errors/ShareNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareNotFoundError"}}}},"429":{"description":"The @maple/http/errors/ShareRateLimitedError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRateLimitedError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503. | The @maple/http/errors/SharePersistenceError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareNotConfiguredError"},{"$ref":"#/components/schemas/SharePersistenceError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Takes the signed image id from `og-meta`, never a share token, and returns the layout facts the preview image is drawn from. Revoked and org-only links resolve as not found, so an image URL stops working the moment its link does.","summary":"Read what a share link's preview image draws","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareOgCardRequest"}}},"required":true}}},"/v2/share/alert-chart":{"post":{"tags":["Shares"],"operationId":"resolveAlertChart","parameters":[],"security":[],"responses":{"200":{"description":"AlertChartResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertChartResponseEncoded"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"404":{"description":"The @maple/http/errors/ShareNotFoundError failure. HTTP 404.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareNotFoundError"}}}},"429":{"description":"The @maple/http/errors/ShareRateLimitedError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareRateLimitedError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503. | The @maple/http/errors/SharePersistenceError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShareNotConfiguredError"},{"$ref":"#/components/schemas/SharePersistenceError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Takes the signed chart id embedded in a Slack, Discord or email alert and returns the observed values over the window that id pins. Unauthenticated for the same reason as the rest of this group: the image is fetched by Slack and Discord themselves, which carry no Maple credential.","summary":"Read the series an alert notification's chart draws","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertChartRequest"}}},"required":true}}},"/v2/widget_summary":{"get":{"tags":["Widget Summary"],"operationId":"getWidgetSummary","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Everything the Maple iOS Home Screen widgets draw, in one response: ongoing error issues over the last day, and per-service traffic over the last hour.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetSummary"}}}},"400":{"description":"The @maple/http/errors/QueryEngineValidationError failure. HTTP 400. | The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineValidationError"},{"$ref":"#/components/schemas/InvalidRequestError"}]}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429. | The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQuotaExceededError"},{"$ref":"#/components/schemas/RateLimitError"}]}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500. | The @maple/http/errors/WarehouseScopeError failure. HTTP 500. | The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500. | The @maple/http/errors/QueryEngineResultMismatchError failure. HTTP 500. | The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseMalformedQueryError"},{"$ref":"#/components/schemas/WarehouseScopeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsEncryptionError"},{"$ref":"#/components/schemas/QueryEngineResultMismatchError"},{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"502":{"description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502. | The @maple/http/errors/WarehouseAuthError failure. HTTP 502. | The @maple/http/errors/WarehouseConfigError failure. HTTP 502. | The @maple/http/errors/WarehouseClientError failure. HTTP 502. | The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502. | The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502. | The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WarehouseQueryError"},{"$ref":"#/components/schemas/WarehouseAuthError"},{"$ref":"#/components/schemas/WarehouseConfigError"},{"$ref":"#/components/schemas/WarehouseClientError"},{"$ref":"#/components/schemas/WarehouseSchemaDriftError"},{"$ref":"#/components/schemas/WarehouseResultDecodeError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsStoredConfigInvalidError"}]}}}},"503":{"description":"The @maple/http/errors/ErrorPersistenceError failure. HTTP 503. | The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503. | The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ErrorPersistenceError"},{"$ref":"#/components/schemas/WarehouseUpstreamError"},{"$ref":"#/components/schemas/OrgClickHouseSettingsPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504. | The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QueryEngineTimeoutError"},{"$ref":"#/components/schemas/WorkerUnavailableError"}]}}}}},"description":"Returns ongoing error issues and per-service traffic in a single small payload sized for a Home Screen widget. The windows are fixed by the server. Requires the `widget_summary:read` scope.","summary":"Retrieve the mobile widget summary"}},"/v2/widget_credentials/{installation_id}":{"put":{"tags":["Widget Credentials"],"operationId":"mintWidgetCredential","parameters":[{"name":"installation_id","in":"path","schema":{"type":"string","allOf":[{"minLength":8},{"maxLength":128},{"pattern":"^[A-Za-z0-9_-]+$","title":"Installation ID","description":"A stable, client-generated identifier for one app installation — on iOS, `identifierForVendor`. Opaque to Maple, and only ever compared against itself: it decides which credential a re-mint replaces.","examples":["F9E1B4C0-8F2A-4C6D-9E1B-4C08F2A4C6D9"]}]},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"A read-only, expiring credential for one app installation's Home Screen widgets. Minting is idempotent per installation: the previous credential is revoked in the same transaction.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetCredential"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Issues a read-only, expiring credential for this installation's Home Screen widgets, revoking whatever it had. Idempotent, so the app calls it again to roll. Requires the `widget_credentials:write` scope — which a widget credential does not have, so renewal always goes through a signed-in session.","summary":"Mint this installation's widget credential"},"delete":{"tags":["Widget Credentials"],"operationId":"revokeWidgetCredential","parameters":[{"name":"installation_id","in":"path","schema":{"type":"string","allOf":[{"minLength":8},{"maxLength":128},{"pattern":"^[A-Za-z0-9_-]+$","title":"Installation ID","description":"A stable, client-generated identifier for one app installation — on iOS, `identifierForVendor`. Opaque to Maple, and only ever compared against itself: it decides which credential a re-mint replaces.","examples":["F9E1B4C0-8F2A-4C6D-9E1B-4C08F2A4C6D9"]}]},"required":true}],"security":[{"bearer":[]}],"responses":{"200":{"description":"WidgetCredentialDeleteResponse","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetCredentialDeleteResponse"}}}},"400":{"description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestError"}}}},"401":{"description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401. | The @maple/http/errors/UnauthorizedError failure. HTTP 401.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InvalidCredentialsError"},{"$ref":"#/components/schemas/UnauthorizedError"}]}}}},"403":{"description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403. | The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientScopeError"},{"$ref":"#/components/schemas/OrganizationAccessDeniedError"}]}}}},"429":{"description":"The @maple/http/v2/RateLimitError failure. HTTP 429.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"headers":{"Retry-After":{"description":"Seconds to wait or an HTTP-date indicating when the request may be retried.","schema":{"oneOf":[{"type":"integer","minimum":1},{"type":"string"}]},"example":60}}},"500":{"description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500. | The @maple/http/v2/UnexpectedError failure. HTTP 500.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ResponseSchemaError"},{"$ref":"#/components/schemas/UnexpectedError"}]}}}},"503":{"description":"The @maple/http/errors/ApiKeyPersistenceError failure. HTTP 503. | The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503. | The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ApiKeyPersistenceError"},{"$ref":"#/components/schemas/ApiKeyLookupPersistenceError"},{"$ref":"#/components/schemas/AuthorizationUnavailableError"}]}}}},"504":{"description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerUnavailableError"}}}}},"description":"Retires the installation's credential for this organization; the app calls this on sign-out and when the user leaves the organization. Idempotent — an installation with nothing to revoke is already in the requested state. Requires the `widget_credentials:write` scope.","summary":"Revoke this installation's widget credential"}}},"components":{"schemas":{"_maple_ApiKeyId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `key_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["key_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"Union_2":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional longer description of what the key is for, or `null`.","examples":["Publishes deploys from the CI pipeline"]},"Union_3":{"type":"string","enum":["standard","mcp","device"],"description":"Key type: `standard` for HTTP API access, `mcp` for the Model Context Protocol server.","examples":["standard"]},"Scope":{"type":"string","allOf":[{"pattern":"^([a-z][a-z0-9_]*:(read|write)|\\*)$","title":"Scope","description":"Permission grant on a restricted API key. Grammar: `<family>:read`, `<family>:write`, or `*` (all). The family is the first path segment under `/v2` (e.g. `api_keys`, `dashboards`, `alerts`). `write` implies `read`; a key with no scopes has full access.","examples":["api_keys:read","dashboards:write","*"]}]},"Union_4":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Scope"}},{"type":"null"}],"description":"The scopes granted to the key, or `null` for a legacy key with full access.","examples":[["dashboards:read","alerts:write"]]},"Union_5":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the key was revoked, or `null` if it is still active."},"Union_6":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the key was last used to authenticate a request, or `null` if never used."},"Union_7":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the key expires, or `null` if it never expires."},"_maple_UserId":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"User ID","description":"Maple user ID of the key's creator (e.g. `user_…`)."}]},"Union_8":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Email of the user who created the key, when known.","examples":["ci@acme.com"]},"ApiKey":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ApiKeyId"},"object":{"type":"string","enum":["api_key"],"description":"The object type — always `\"api_key\"`.","examples":["api_key"]},"name":{"type":"string","description":"Human-readable label for the key, shown in the dashboard.","examples":["ci-pipeline"]},"description":{"$ref":"#/components/schemas/Union_2"},"key_prefix":{"type":"string","description":"The non-secret leading portion of the key, safe to display. The full secret is returned only when the key is created or rolled.","examples":["maple_ak_9f2c"]},"kind":{"$ref":"#/components/schemas/Union_3"},"scopes":{"$ref":"#/components/schemas/Union_4"},"revoked":{"type":"boolean","description":"Whether the key has been revoked. Revoked keys can no longer authenticate.","examples":[false]},"revoked_at":{"$ref":"#/components/schemas/Union_5"},"last_used_at":{"$ref":"#/components/schemas/Union_6"},"expires_at":{"$ref":"#/components/schemas/Union_7"},"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/_maple_UserId"},"created_by_email":{"$ref":"#/components/schemas/Union_8"}},"required":["id","object","name","description","key_prefix","kind","scopes","revoked","revoked_at","last_used_at","expires_at","created_at","created_by","created_by_email"],"additionalProperties":false,"title":"API Key","description":"A credential for programmatic access to the Maple API, scoped to one organization. The secret is shown only once (at creation or roll); afterward only its `key_prefix` is stored and returned.","examples":[{"id":"key_aXwpxqBkqtYwtBtmsGbR41","object":"api_key","name":"ci-pipeline","description":"Publishes deploys from the CI pipeline","key_prefix":"maple_ak_9f2c","kind":"standard","scopes":["dashboards:read","alerts:write"],"revoked":false,"revoked_at":null,"last_used_at":"2026-07-15T09:12:00.000Z","expires_at":null,"created_at":"2026-07-01T12:00:00.000Z","created_by":"user_2Nk8mXqPfR3yZ1aB4cD5eF6g","created_by_email":"ci@acme.com"}]},"ApiKeyList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"API key list","description":"A cursor-paginated page of API keys."},"ParameterInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/ParameterInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["parameter_invalid"]},"title":{"type":"string","enum":["Invalid request"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid request","description":"The @maple/http/v2/ParameterInvalidError failure. HTTP 400."},"InvalidRequestError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/InvalidRequestError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["parameter_invalid"]},"title":{"type":"string","enum":["Invalid request"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid request","description":"The @maple/http/v2/InvalidRequestError failure. HTTP 400."},"ApiKeyPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ApiKeyPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["api_keys_unavailable"]},"title":{"type":"string","enum":["API keys are temporarily unavailable"]},"message":{"type":"string","enum":["API keys are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"API keys are temporarily unavailable","description":"The @maple/http/errors/ApiKeyPersistenceError failure. HTTP 503."},"ApiKeyLookupPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ApiKeyLookupPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["api_key_lookup_unavailable"]},"title":{"type":"string","enum":["Service temporarily unavailable"]},"message":{"type":"string","enum":["A service required for this operation is temporarily unavailable; retry with backoff."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Service temporarily unavailable","description":"The @maple/http/errors/ApiKeyLookupPersistenceError failure. HTTP 503."},"AuthorizationUnavailableError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AuthorizationUnavailableError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["authorization_unavailable"]},"title":{"type":"string","enum":["Authentication is temporarily unavailable"]},"message":{"type":"string","enum":["Authentication is temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Authentication is temporarily unavailable","description":"The @maple/http/errors/AuthorizationUnavailableError failure. HTTP 503."},"InvalidCredentialsError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/InvalidCredentialsError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["authentication_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["invalid_credentials"]},"title":{"type":"string","enum":["Sign in required"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reauthenticate"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Sign in required","description":"The @maple/http/v2/InvalidCredentialsError failure. HTTP 401."},"UnauthorizedError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/UnauthorizedError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["authentication_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["invalid_credentials"]},"title":{"type":"string","enum":["Sign in required"]},"message":{"type":"string","enum":["Invalid or missing credentials."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reauthenticate"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Sign in required","description":"The @maple/http/errors/UnauthorizedError failure. HTTP 401."},"InsufficientScopeError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/InsufficientScopeError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["permission_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["insufficient_scope"]},"title":{"type":"string","enum":["Permission required"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["request_access"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Permission required","description":"The @maple/http/v2/InsufficientScopeError failure. HTTP 403."},"OrganizationAccessDeniedError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/OrganizationAccessDeniedError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["permission_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["organization_access_denied"]},"title":{"type":"string","enum":["Organization not available"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["request_access"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Organization not available","description":"The @maple/http/v2/OrganizationAccessDeniedError failure. HTTP 403."},"RateLimitError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/RateLimitError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["rate_limit_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["rate_limited"]},"title":{"type":"string","enum":["Too many requests"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Too many requests","description":"The @maple/http/v2/RateLimitError failure. HTTP 429."},"ResponseSchemaError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/ResponseSchemaError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["internal_error"]},"title":{"type":"string","enum":["Something went wrong"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Something went wrong","description":"The @maple/http/v2/ResponseSchemaError failure. HTTP 500."},"UnexpectedError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/UnexpectedError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["internal_error"]},"title":{"type":"string","enum":["Something went wrong"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Something went wrong","description":"The @maple/http/v2/UnexpectedError failure. HTTP 500."},"WorkerUnavailableError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/WorkerUnavailableError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["worker_unavailable"]},"title":{"type":"string","enum":["Maple API is temporarily unavailable"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Maple API is temporarily unavailable","description":"The @maple/http/v2/WorkerUnavailableError failure. HTTP 504."},"ApiKeyCreateParams":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1,"description":"Human-readable label for the key. Required, non-empty.","examples":["ci-pipeline"]}]},"description":{"type":"string","description":"Optional longer description of what the key is for.","examples":["Publishes deploys from the CI pipeline"]},"expires_in_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Optional lifetime in seconds. Omit for a key that never expires.","examples":[7776000]}]},"kind":{"type":"string","enum":["standard","mcp","device"],"description":"Key type. Defaults to `standard`.","examples":["standard"]},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Scope"},"description":"Scopes to restrict the key to. Omit for a key with full access to the organization.","examples":[["dashboards:read","alerts:write"]]}},"required":["name"],"additionalProperties":false,"title":"API Key create parameters","description":"Request body for creating an API key.","examples":[{"name":"ci-pipeline","description":"Publishes deploys from the CI pipeline","expires_in_seconds":7776000,"kind":"standard","scopes":["dashboards:read","alerts:write"]}]},"_maple_PostgresTransactionId":{"type":"string","allOf":[{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"},{"pattern":"^\\d+$","title":"Postgres Transaction ID","description":"Optional ElectricSQL reconciliation metadata encoded as an unsigned decimal string. Public API consumers that do not use ElectricSQL can ignore it."}]},"ApiKeyWithSecret":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ApiKeyId"},"object":{"type":"string","enum":["api_key"],"description":"The object type — always `\"api_key\"`.","examples":["api_key"]},"name":{"type":"string","description":"Human-readable label for the key, shown in the dashboard.","examples":["ci-pipeline"]},"description":{"$ref":"#/components/schemas/Union_2"},"key_prefix":{"type":"string","description":"The non-secret leading portion of the key, safe to display. The full secret is returned only when the key is created or rolled.","examples":["maple_ak_9f2c"]},"kind":{"$ref":"#/components/schemas/Union_3"},"scopes":{"$ref":"#/components/schemas/Union_4"},"revoked":{"type":"boolean","description":"Whether the key has been revoked. Revoked keys can no longer authenticate.","examples":[false]},"revoked_at":{"$ref":"#/components/schemas/Union_5"},"last_used_at":{"$ref":"#/components/schemas/Union_6"},"expires_at":{"$ref":"#/components/schemas/Union_7"},"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/_maple_UserId"},"created_by_email":{"$ref":"#/components/schemas/Union_8"},"txid":{"$ref":"#/components/schemas/_maple_PostgresTransactionId"},"secret":{"type":"string","description":"The full API key secret. **Returned only once**, in the create and roll responses — it cannot be retrieved later. Store it securely.","examples":["maple_ak_9f2cB1x8Kt7pQ2wR5vN0sL3dJ6hM4gY9"]}},"required":["id","object","name","description","key_prefix","kind","scopes","revoked","revoked_at","last_used_at","expires_at","created_at","created_by","created_by_email","secret"],"additionalProperties":false,"title":"API Key (with secret)","description":"An API key including its one-time `secret`. Returned only by the create and roll endpoints; every other endpoint returns the `ApiKey` object without the secret.","examples":[{"id":"key_aXwpxqBkqtYwtBtmsGbR41","object":"api_key","name":"ci-pipeline","description":"Publishes deploys from the CI pipeline","key_prefix":"maple_ak_9f2c","kind":"standard","scopes":["dashboards:read","alerts:write"],"revoked":false,"revoked_at":null,"last_used_at":"2026-07-15T09:12:00.000Z","expires_at":null,"created_at":"2026-07-01T12:00:00.000Z","created_by":"user_2Nk8mXqPfR3yZ1aB4cD5eF6g","created_by_email":"ci@acme.com","txid":"81234","secret":"maple_ak_9f2cB1x8Kt7pQ2wR5vN0sL3dJ6hM4gY9"}]},"InsufficientPermissionsError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/InsufficientPermissionsError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["permission_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["insufficient_permissions"]},"title":{"type":"string","enum":["Permission required"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["request_access"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Permission required","description":"The @maple/http/v2/InsufficientPermissionsError failure. HTTP 403."},"ApiKeyNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ApiKeyNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["api_key_not_found"]},"title":{"type":"string","enum":["API key not found"]},"message":{"type":"string","enum":["No such API key."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"API key not found","description":"The @maple/http/errors/ApiKeyNotFoundError failure. HTTP 404."},"ApiKeyMutationResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ApiKeyId"},"object":{"type":"string","enum":["api_key"],"description":"The object type — always `\"api_key\"`.","examples":["api_key"]},"name":{"type":"string","description":"Human-readable label for the key, shown in the dashboard.","examples":["ci-pipeline"]},"description":{"$ref":"#/components/schemas/Union_2"},"key_prefix":{"type":"string","description":"The non-secret leading portion of the key, safe to display. The full secret is returned only when the key is created or rolled.","examples":["maple_ak_9f2c"]},"kind":{"$ref":"#/components/schemas/Union_3"},"scopes":{"$ref":"#/components/schemas/Union_4"},"revoked":{"type":"boolean","description":"Whether the key has been revoked. Revoked keys can no longer authenticate.","examples":[false]},"revoked_at":{"$ref":"#/components/schemas/Union_5"},"last_used_at":{"$ref":"#/components/schemas/Union_6"},"expires_at":{"$ref":"#/components/schemas/Union_7"},"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/_maple_UserId"},"created_by_email":{"$ref":"#/components/schemas/Union_8"},"txid":{"$ref":"#/components/schemas/_maple_PostgresTransactionId"}},"required":["id","object","name","description","key_prefix","kind","scopes","revoked","revoked_at","last_used_at","expires_at","created_at","created_by","created_by_email"],"additionalProperties":false,"title":"API Key mutation response","description":"The final API key state after a mutation. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients; other public API consumers do not need it.","examples":[{"id":"key_aXwpxqBkqtYwtBtmsGbR41","object":"api_key","name":"ci-pipeline","description":"Publishes deploys from the CI pipeline","key_prefix":"maple_ak_9f2c","kind":"standard","scopes":["dashboards:read","alerts:write"],"revoked":true,"revoked_at":"2026-07-16T12:00:00.000Z","last_used_at":"2026-07-15T09:12:00.000Z","expires_at":null,"created_at":"2026-07-01T12:00:00.000Z","created_by":"user_2Nk8mXqPfR3yZ1aB4cD5eF6g","created_by_email":"ci@acme.com","txid":"81234"}]},"_maple_DashboardId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `dash_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["dash_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"Union_9":{"anyOf":[{"type":"string"},{"type":"null"}]},"Arrays_":{"type":"array","items":{"type":"string"}},"Objects_":{"type":"object","properties":{"type":{"type":"string","enum":["relative"]},"value":{"type":"string"}},"required":["type","value"],"additionalProperties":false},"Objects_1":{"type":"object","properties":{"type":{"type":"string","enum":["absolute"]},"start_time":{"type":"string"},"end_time":{"type":"string"}},"required":["type","start_time","end_time"],"additionalProperties":false},"DashboardTimeRange":{"anyOf":[{"$ref":"#/components/schemas/Objects_"},{"$ref":"#/components/schemas/Objects_1"}],"title":"Dashboard time range"},"Union_11":{"type":"string","enum":["Infinity","-Infinity","NaN"]},"Union_10":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"Objects_5":{"type":"object","additionalProperties":{"type":"string"}},"Objects_4":{"type":"object","properties":{"field_map":{"$ref":"#/components/schemas/Objects_5"},"hide_series":{"type":"object","properties":{"base_names":{"type":"array","items":{"type":"string"}}},"required":["base_names"],"additionalProperties":false},"flatten_series":{"type":"object","properties":{"value_field":{"type":"string"}},"required":["value_field"],"additionalProperties":false},"reduce_to_value":{"type":"object","properties":{"field":{"type":"string"},"aggregate":{"type":"string","enum":["first","sum","count","avg","max","min"]}},"required":["field"],"additionalProperties":false},"compute_ratio":{"type":"object","properties":{"numerator_name":{"type":"string"},"denominator_names":{"type":"array","items":{"type":"string"}}},"required":["numerator_name","denominator_names"],"additionalProperties":false},"limit":{"$ref":"#/components/schemas/Union_10"},"sort_by":{"type":"object","properties":{"field":{"type":"string"},"direction":{"type":"string","enum":["asc","desc"]}},"required":["field","direction"],"additionalProperties":false}},"additionalProperties":false},"Objects_3":{"type":"object","properties":{"kind":{"type":"string","enum":["query"]},"result_shape":{"type":"string","enum":["timeseries","breakdown","list"]},"queries":{"type":"array","items":{"type":"object"}},"formulas":{"type":"array","items":{"type":"object"}},"comparison":{"type":"object"},"default_limit":{"$ref":"#/components/schemas/Union_10"},"limit":{"$ref":"#/components/schemas/Union_10"},"columns":{"type":"array","items":{"type":"string"}},"transform":{"$ref":"#/components/schemas/Objects_4"}},"required":["kind","result_shape","queries"],"additionalProperties":false},"Objects_6":{"type":"object","properties":{"kind":{"type":"string","enum":["raw_sql"]},"sql":{"type":"string"},"display_type":{"type":"string"},"granularity_seconds":{"$ref":"#/components/schemas/Union_10"},"transform":{"$ref":"#/components/schemas/Objects_4"}},"required":["kind","sql"],"additionalProperties":false},"Objects_7":{"type":"object","properties":{"kind":{"type":"string","enum":["route"]},"endpoint":{"type":"string"},"params":{"type":"object"},"transform":{"$ref":"#/components/schemas/Objects_4"}},"required":["kind","endpoint"],"additionalProperties":false},"Objects_8":{"type":"object","properties":{"kind":{"type":"string","enum":["static"]},"transform":{"$ref":"#/components/schemas/Objects_4"}},"required":["kind"],"additionalProperties":false},"DashboardWidgetDataSource":{"anyOf":[{"$ref":"#/components/schemas/Objects_3"},{"$ref":"#/components/schemas/Objects_6"},{"$ref":"#/components/schemas/Objects_7"},{"$ref":"#/components/schemas/Objects_8"}],"title":"Dashboard widget data source"},"Union_12":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"DashboardWidgetDataSource_1":{"anyOf":[{"$ref":"#/components/schemas/Objects_3"},{"$ref":"#/components/schemas/Objects_6"},{"$ref":"#/components/schemas/Objects_7"},{"$ref":"#/components/schemas/Objects_8"}],"title":"Dashboard widget data source"},"Union_13":{"type":"string","enum":["referrerHost","utmSource","utmMedium","utmCampaign","country","host"]},"DashboardTimeRange_1":{"anyOf":[{"$ref":"#/components/schemas/Objects_"},{"$ref":"#/components/schemas/Objects_1"}],"title":"Dashboard time range"},"Objects_2":{"type":"object","properties":{"id":{"type":"string"},"visualization":{"type":"string","enum":["chart","hbar","stat","gauge","table","list","pie","histogram","heatmap","funnel","markdown"]},"data_source":{"$ref":"#/components/schemas/DashboardWidgetDataSource"},"display":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"chart_id":{"type":"string"},"chart_presentation":{"type":"object","properties":{"legend":{"type":"string","enum":["visible","hidden","right"]},"series_stats":{"type":"boolean"},"tooltip":{"type":"string","enum":["visible","hidden"]},"show_points":{"type":"boolean"},"fill_nulls":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"boolean","enum":[false]}]},"compare_to_previous_period":{"type":"boolean"}},"additionalProperties":false},"x_axis":{"type":"object","properties":{"label":{"type":"string"},"unit":{"type":"string"},"visible":{"type":"boolean"}},"additionalProperties":false},"y_axis":{"type":"object","properties":{"label":{"type":"string"},"unit":{"type":"string"},"visible":{"type":"boolean"},"min":{"$ref":"#/components/schemas/Union_10"},"max":{"$ref":"#/components/schemas/Union_10"},"soft_min":{"$ref":"#/components/schemas/Union_10"},"soft_max":{"$ref":"#/components/schemas/Union_10"},"log_scale":{"type":"boolean"},"fit_y_axis_to_data":{"type":"boolean"}},"additionalProperties":false},"series_mapping":{"$ref":"#/components/schemas/Objects_5"},"color_overrides":{"$ref":"#/components/schemas/Objects_5"},"stacked":{"type":"boolean"},"curve_type":{"type":"string","enum":["linear","monotone"]},"unit":{"type":"string"},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"$ref":"#/components/schemas/Union_12"},"color":{"type":"string"},"label":{"type":"string"}},"required":["value","color"],"additionalProperties":false}},"prefix":{"type":"string"},"suffix":{"type":"string"},"sparkline":{"type":"object","properties":{"enabled":{"type":"boolean"},"data_source":{"$ref":"#/components/schemas/DashboardWidgetDataSource_1"}},"required":["enabled"],"additionalProperties":false},"columns":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"header":{"type":"string"},"unit":{"type":"string"},"width":{"$ref":"#/components/schemas/Union_10"},"align":{"type":"string","enum":["left","center","right"]},"hidden":{"type":"boolean"},"thresholds":{"type":"array","items":{"type":"object","properties":{"value":{"$ref":"#/components/schemas/Union_12"},"color":{"type":"string"}},"required":["value","color"],"additionalProperties":false}}},"required":["field","header"],"additionalProperties":false}},"list_data_source":{"type":"string"},"list_where_clause":{"type":"string"},"list_limit":{"$ref":"#/components/schemas/Union_10"},"list_root_only":{"type":"boolean"},"pie":{"type":"object","properties":{"donut":{"type":"boolean"},"inner_radius":{"$ref":"#/components/schemas/Union_10"},"show_labels":{"type":"boolean"},"show_percent":{"type":"boolean"}},"additionalProperties":false},"funnel":{"type":"object","properties":{"show_step_percent":{"type":"boolean"},"steps":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"eventName":{"type":"string"},"attributeEquals":{"type":"object","additionalProperties":{"type":"string"}}},"required":["kind","eventName"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"pagePath":{"type":"string"},"host":{"type":"string"}},"required":["kind","pagePath"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["session"]},"dimension":{"$ref":"#/components/schemas/Union_13"},"value":{"type":"string"}},"required":["kind","dimension","value"],"additionalProperties":false}]}},"key_by":{"type":"string","enum":["person","visitor","user","session"]},"window_seconds":{"$ref":"#/components/schemas/Union_10"},"breakdown_by":{"anyOf":[{"$ref":"#/components/schemas/Union_13"},{"type":"string","pattern":"^attribute:[\\s\\S]*?$"}]}},"additionalProperties":false},"histogram":{"type":"object","properties":{"bucket_count":{"$ref":"#/components/schemas/Union_10"},"bucket_width":{"$ref":"#/components/schemas/Union_10"},"log_scale_y":{"type":"boolean"}},"additionalProperties":false},"heatmap":{"type":"object","properties":{"color_scale":{"type":"string","enum":["amber","blues","reds","viridis","magma","cividis"]},"scale_type":{"type":"string","enum":["linear","log"]}},"additionalProperties":false},"gauge":{"type":"object","properties":{"min":{"$ref":"#/components/schemas/Union_10"},"max":{"$ref":"#/components/schemas/Union_10"},"style":{"type":"string","enum":["radial","bar"]}},"additionalProperties":false},"markdown":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"],"additionalProperties":false}},"additionalProperties":false},"layout":{"type":"object","properties":{"x":{"$ref":"#/components/schemas/Union_12"},"y":{"$ref":"#/components/schemas/Union_12"},"w":{"$ref":"#/components/schemas/Union_12"},"h":{"$ref":"#/components/schemas/Union_12"},"min_w":{"$ref":"#/components/schemas/Union_10"},"min_h":{"$ref":"#/components/schemas/Union_10"},"max_w":{"$ref":"#/components/schemas/Union_10"},"max_h":{"$ref":"#/components/schemas/Union_10"}},"required":["x","y","w","h"],"additionalProperties":false},"time_range":{"$ref":"#/components/schemas/DashboardTimeRange_1"},"section_id":{"type":"string"},"tab_id":{"type":"string"}},"required":["id","visualization","data_source","display","layout"],"additionalProperties":false},"Arrays_1":{"type":"array","items":{"$ref":"#/components/schemas/Objects_2"}},"DashboardSection":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"collapsed":{"type":"boolean"},"collapsible":{"type":"boolean"},"tabs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false}}},"required":["id","title","tabs"],"additionalProperties":false,"title":"Dashboard section","description":"A collapsible group of widgets. A section with one tab renders as a plain header; two or more render a tab bar. Widgets join a section by setting `section_id` and `tab_id`."},"Arrays_2":{"type":"array","items":{"$ref":"#/components/schemas/DashboardSection"}},"_maple_DashboardVariableName":{"type":"string","allOf":[{"pattern":"^[A-Za-z][A-Za-z0-9_]*$","title":"Dashboard Variable Name"}]},"Union_14":{"anyOf":[{"type":"object","properties":{"name":{"$ref":"#/components/schemas/_maple_DashboardVariableName"},"label":{"type":"string"},"include_all":{"type":"boolean"},"default_value":{"type":"string"},"type":{"type":"string","enum":["query"]},"source":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["facet"]},"facet":{"type":"string","enum":["service","environment","span_name","http_method","http_status_code","log_severity"]}},"required":["kind","facet"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["attribute"]},"scope":{"type":"string","enum":["span","resource"]},"attribute_key":{"type":"string"}},"required":["kind","scope","attribute_key"],"additionalProperties":false}]}},"required":["name","type","source"],"additionalProperties":false},{"type":"object","properties":{"name":{"$ref":"#/components/schemas/_maple_DashboardVariableName"},"label":{"type":"string"},"include_all":{"type":"boolean"},"default_value":{"type":"string"},"type":{"type":"string","enum":["custom"]},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"}},"required":["value"],"additionalProperties":false}}},"required":["name","type","options"],"additionalProperties":false},{"type":"object","properties":{"name":{"$ref":"#/components/schemas/_maple_DashboardVariableName"},"label":{"type":"string"},"include_all":{"type":"boolean"},"default_value":{"type":"string"},"type":{"type":"string","enum":["textbox"]}},"required":["name","type"],"additionalProperties":false}]},"Arrays_3":{"type":"array","items":{"$ref":"#/components/schemas/Union_14"}},"_maple_DashboardRefreshIntervalSeconds":{"type":"number","enum":[0,5,10,30,60,300,900],"title":"Dashboard Refresh Interval Seconds"},"Union_15":{"anyOf":[{"$ref":"#/components/schemas/_maple_DashboardRefreshIntervalSeconds"},{"type":"null"}]},"DashboardEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_DashboardId"},"object":{"type":"string","enum":["dashboard"]},"name":{"type":"string"},"description":{"$ref":"#/components/schemas/Union_9"},"tags":{"$ref":"#/components/schemas/Arrays_"},"time_range":{"$ref":"#/components/schemas/DashboardTimeRange"},"widgets":{"$ref":"#/components/schemas/Arrays_1"},"sections":{"$ref":"#/components/schemas/Arrays_2"},"variables":{"$ref":"#/components/schemas/Arrays_3"},"refresh_interval_seconds":{"$ref":"#/components/schemas/Union_15"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","name","description","tags","time_range","widgets","sections","variables","refresh_interval_seconds","created_at","updated_at"],"additionalProperties":false},"DashboardList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/DashboardEncoded"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"List","description":"Cursor-paginated list envelope wrapping a page of objects."},"DashboardPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/DashboardPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["dashboards_unavailable"]},"title":{"type":"string","enum":["Dashboards are temporarily unavailable"]},"message":{"type":"string","enum":["Dashboards are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Dashboards are temporarily unavailable","description":"The @maple/http/errors/DashboardPersistenceError failure. HTTP 503."},"DashboardStoredConfigInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/DashboardStoredConfigInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["dashboard_stored_config_invalid"]},"title":{"type":"string","enum":["Stored dashboard is invalid"]},"message":{"type":"string","enum":["The stored dashboard configuration could not be read."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Stored dashboard is invalid","description":"The @maple/http/errors/DashboardStoredConfigInvalidError failure. HTTP 500."},"DashboardCreateParamsEncoded":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"time_range":{"$ref":"#/components/schemas/DashboardTimeRange_1"},"widgets":{"type":"array","items":{"$ref":"#/components/schemas/Objects_2"}},"sections":{"type":"array","items":{"$ref":"#/components/schemas/DashboardSection"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Union_14"}},"refresh_interval_seconds":{"anyOf":[{"$ref":"#/components/schemas/_maple_DashboardRefreshIntervalSeconds"},{"type":"null"}]}},"required":["name"],"additionalProperties":false},"DashboardMutationResponseEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_DashboardId"},"object":{"type":"string","enum":["dashboard"]},"name":{"type":"string"},"description":{"$ref":"#/components/schemas/Union_9"},"tags":{"$ref":"#/components/schemas/Arrays_"},"time_range":{"$ref":"#/components/schemas/DashboardTimeRange"},"widgets":{"$ref":"#/components/schemas/Arrays_1"},"sections":{"$ref":"#/components/schemas/Arrays_2"},"variables":{"$ref":"#/components/schemas/Arrays_3"},"refresh_interval_seconds":{"$ref":"#/components/schemas/Union_15"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"txid":{"$ref":"#/components/schemas/_maple_PostgresTransactionId"}},"required":["id","object","name","description","tags","time_range","widgets","sections","variables","refresh_interval_seconds","created_at","updated_at"],"additionalProperties":false},"DashboardValidationError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/DashboardValidationError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["dashboard_invalid"]},"title":{"type":"string","enum":["Invalid dashboard"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid dashboard","description":"The @maple/http/errors/DashboardValidationError failure. HTTP 400."},"DashboardPersesImportParams":{"type":"object","properties":{"dashboard":{"type":"object"}},"required":["dashboard"],"additionalProperties":false,"title":"Perses import parameters"},"DashboardPersesImport":{"type":"object","properties":{"object":{"type":"string","enum":["dashboard_import"]},"dashboard":{"$ref":"#/components/schemas/DashboardMutationResponseEncoded"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["object","dashboard","warnings"],"additionalProperties":false,"title":"Perses dashboard import"},"_maple_DashboardTemplateId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `dtpl_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["dtpl_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_DashboardTemplateCategory":{"type":"string","enum":["application","database","infrastructure","messaging"],"title":"Dashboard Template Category"},"_maple_DashboardTemplateParameterKey":{"type":"string","allOf":[{"minLength":1},{"pattern":"^[a-z][a-z0-9_]*$","title":"Dashboard Template Parameter Key"}]},"DashboardTemplateEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_DashboardTemplateId"},"object":{"type":"string","enum":["dashboard_template"]},"name":{"type":"string"},"description":{"type":"string"},"category":{"$ref":"#/components/schemas/_maple_DashboardTemplateCategory"},"tags":{"type":"array","items":{"type":"string"}},"requirements":{"type":"array","items":{"type":"string"}},"requirement":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["metrics","integration","telemetry"],"description":"`metrics` is gated on `required_metric_prefixes`, `integration` on a connected integration, `telemetry` is never gated."},"label":{"type":"string","description":"Full prose — the same string the `requirements` array carries."},"missing":{"type":"string","description":"Short statement of what is missing, e.g. \"not connected\". Absent for `metrics`, where clients derive `no <prefix>*` from `required_metric_prefixes`."},"collector":{"type":"string","description":"Noun phrase naming what emits the data, read as \"Collected by {collector}.\""},"setup_label":{"type":"string","description":"Noun phrase read as \"Set up {setup_label}\". Absent for `telemetry`."},"hint":{"type":"string","description":"One extra sentence shown when the template is gated."}},"required":["kind","label","collector"],"additionalProperties":false},{"type":"null"}]},"required_metric_prefixes":{"type":"array","items":{"type":"string"}},"parameters":{"type":"array","items":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/_maple_DashboardTemplateParameterKey"},"label":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"},"placeholder":{"type":"string"}},"required":["key","label","description","required"],"additionalProperties":false}},"preview":{"type":"array","items":{"type":"object","properties":{"x":{"$ref":"#/components/schemas/Union_12"},"y":{"$ref":"#/components/schemas/Union_12"},"w":{"$ref":"#/components/schemas/Union_12"},"h":{"$ref":"#/components/schemas/Union_12"},"kind":{"type":"string","enum":["line","area","bar","stat","gauge","table","list","pie","histogram","heatmap","funnel","hbar","markdown"]},"title":{"type":"string"}},"required":["x","y","w","h","kind","title"],"additionalProperties":false}}},"required":["id","object","name","description","category","tags","requirements","requirement","required_metric_prefixes","parameters","preview"],"additionalProperties":false},"DashboardTemplateList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/DashboardTemplateEncoded"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"List","description":"Cursor-paginated list envelope wrapping a page of objects."},"DashboardTemplatePreviewParams":{"type":"object","properties":{"parameters":{"type":"object","patternProperties":{"^[a-z][a-z0-9_]*$":{"type":"string"}}}},"additionalProperties":false,"title":"Dashboard template preview parameters"},"_maple_DashboardTemplateId_1":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `dtpl_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["dtpl_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"DashboardTemplatePreviewEncoded":{"type":"object","properties":{"object":{"type":"string","enum":["dashboard_template_preview"]},"name":{"type":"string"},"time_range":{"$ref":"#/components/schemas/DashboardTimeRange"},"widgets":{"type":"array","items":{"$ref":"#/components/schemas/Objects_2"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Union_14"}}},"required":["object","name","time_range","widgets","variables"],"additionalProperties":false},"DashboardTemplateNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/DashboardTemplateNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["dashboard_template_not_found"]},"title":{"type":"string","enum":["Dashboard template not found"]},"message":{"type":"string","enum":["No such dashboard template."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Dashboard template not found","description":"The @maple/http/errors/DashboardTemplateNotFoundError failure. HTTP 404."},"DashboardTemplateInstantiateParams":{"type":"object","properties":{"parameters":{"type":"object","patternProperties":{"^[a-z][a-z0-9_]*$":{"type":"string"}}},"name":{"type":"string"}},"additionalProperties":false,"title":"Dashboard template instantiate parameters"},"ParameterMissingError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/ParameterMissingError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["parameter_missing"]},"title":{"type":"string","enum":["Missing request parameter"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Missing request parameter","description":"The @maple/http/v2/ParameterMissingError failure. HTTP 400."},"_maple_DashboardId_1":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `dash_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["dash_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"DashboardNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/DashboardNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["dashboard_not_found"]},"title":{"type":"string","enum":["Dashboard not found"]},"message":{"type":"string","enum":["No such dashboard."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Dashboard not found","description":"The @maple/http/errors/DashboardNotFoundError failure. HTTP 404."},"DashboardUpdateParamsEncoded":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"type":"array","items":{"type":"string"}},"time_range":{"$ref":"#/components/schemas/DashboardTimeRange_1"},"widgets":{"type":"array","items":{"$ref":"#/components/schemas/Objects_2"}},"sections":{"type":"array","items":{"$ref":"#/components/schemas/DashboardSection"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Union_14"}},"refresh_interval_seconds":{"anyOf":[{"$ref":"#/components/schemas/_maple_DashboardRefreshIntervalSeconds"},{"type":"null"}]}},"additionalProperties":false},"DashboardConcurrencyError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/DashboardConcurrencyError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["conflict_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["dashboard_concurrent_update"]},"title":{"type":"string","enum":["Dashboard changed while saving"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["refresh"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Dashboard changed while saving","description":"The @maple/http/errors/DashboardConcurrencyError failure. HTTP 409."},"DashboardDeleted":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_DashboardId_1"},"object":{"type":"string","enum":["dashboard"]},"deleted":{"type":"boolean","enum":[true]},"txid":{"$ref":"#/components/schemas/_maple_PostgresTransactionId"}},"required":["id","object","deleted"],"additionalProperties":false,"title":"Deleted dashboard","description":"A dashboard deletion tombstone. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients."},"_maple_DashboardVersionId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `dbv_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["dbv_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_DashboardVersionChangeKind":{"type":"string","enum":["created","renamed","description_changed","tags_changed","time_range_changed","variables_changed","refresh_interval_changed","widget_added","widget_removed","widget_updated","layout_changed","section_added","section_removed","section_updated","restored","multiple"],"title":"Dashboard Version Change Kind"},"_maple_UserId_1":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"User ID"}]},"DashboardVersionEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_DashboardVersionId"},"object":{"type":"string","enum":["dashboard_version"]},"dashboard_id":{"$ref":"#/components/schemas/_maple_DashboardId"},"version_number":{"$ref":"#/components/schemas/Union_12"},"change_kind":{"$ref":"#/components/schemas/_maple_DashboardVersionChangeKind"},"change_summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_version_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_DashboardVersionId"},{"type":"null"}]},"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/_maple_UserId_1"}},"required":["id","object","dashboard_id","version_number","change_kind","change_summary","source_version_id","created_at","created_by"],"additionalProperties":false},"DashboardVersionList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/DashboardVersionEncoded"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"List","description":"Cursor-paginated list envelope wrapping a page of objects."},"_maple_DashboardVersionId_1":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `dbv_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["dbv_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"DashboardVersionDetailEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_DashboardVersionId"},"object":{"type":"string","enum":["dashboard_version"]},"dashboard_id":{"$ref":"#/components/schemas/_maple_DashboardId"},"version_number":{"$ref":"#/components/schemas/Union_12"},"change_kind":{"$ref":"#/components/schemas/_maple_DashboardVersionChangeKind"},"change_summary":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_version_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_DashboardVersionId"},{"type":"null"}]},"created_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/_maple_UserId_1"},"snapshot":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_DashboardId"},"object":{"type":"string","enum":["dashboard"]},"name":{"type":"string"},"description":{"$ref":"#/components/schemas/Union_9"},"tags":{"$ref":"#/components/schemas/Arrays_"},"time_range":{"$ref":"#/components/schemas/DashboardTimeRange"},"widgets":{"$ref":"#/components/schemas/Arrays_1"},"sections":{"$ref":"#/components/schemas/Arrays_2"},"variables":{"$ref":"#/components/schemas/Arrays_3"},"refresh_interval_seconds":{"$ref":"#/components/schemas/Union_15"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","name","description","tags","time_range","widgets","sections","variables","refresh_interval_seconds","created_at","updated_at"],"additionalProperties":false}},"required":["id","object","dashboard_id","version_number","change_kind","change_summary","source_version_id","created_at","created_by","snapshot"],"additionalProperties":false},"DashboardVersionNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/DashboardVersionNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["dashboard_version_not_found"]},"title":{"type":"string","enum":["Dashboard version not found"]},"message":{"type":"string","enum":["No such dashboard version."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Dashboard version not found","description":"The @maple/http/errors/DashboardVersionNotFoundError failure. HTTP 404."},"_maple_DashboardShareId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `dshr_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["dshr_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"Union_16":{"type":"string","enum":["public","org"]},"DashboardShareEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_DashboardShareId"},"object":{"type":"string","enum":["dashboard_share"]},"dashboard_id":{"$ref":"#/components/schemas/_maple_DashboardId"},"widget_id":{"type":"string"},"mode":{"$ref":"#/components/schemas/Union_16"},"token":{"type":"string"},"token_suffix":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","dashboard_id","mode","token","token_suffix","created_at","updated_at"],"additionalProperties":false},"SharePersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/SharePersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["share_persistence_failed"]},"title":{"type":"string","enum":["Could not save the share link"]},"message":{"type":"string","enum":["Something went wrong updating this dashboard's share link."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Could not save the share link","description":"The @maple/http/errors/SharePersistenceError failure. HTTP 503."},"DashboardShareParams":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/Union_16"}},"required":["mode"],"additionalProperties":false,"title":"Dashboard share parameters"},"ShareNotConfiguredError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ShareNotConfiguredError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["share_not_configured"]},"title":{"type":"string","enum":["Sharing is unavailable"]},"message":{"type":"string","enum":["Dashboard sharing is not configured on this deployment."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Sharing is unavailable","description":"The @maple/http/errors/ShareNotConfiguredError failure. HTTP 503."},"ShareWidgetNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ShareWidgetNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["share_widget_not_found"]},"title":{"type":"string","enum":["Widget not found"]},"message":{"type":"string","enum":["That widget is not on this dashboard."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Widget not found","description":"The @maple/http/errors/ShareWidgetNotFoundError failure. HTTP 404."},"ShareNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ShareNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["share_not_found"]},"title":{"type":"string","enum":["Share link not found"]},"message":{"type":"string","enum":["This link is no longer available."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Share link not found","description":"The @maple/http/errors/ShareNotFoundError failure. HTTP 404."},"DashboardShareDeletedEncoded":{"type":"object","properties":{"dashboard_id":{"$ref":"#/components/schemas/_maple_DashboardId"},"object":{"type":"string","enum":["dashboard_share"]},"deleted":{"type":"boolean","enum":[true]}},"required":["dashboard_id","object","deleted"],"additionalProperties":false},"_maple_AlertRuleId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `alrt_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["alrt_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_AlertNotificationTemplateOverride":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","allOf":[{"maxLength":4000}]},{"type":"null"}]},"body":{"anyOf":[{"type":"string","allOf":[{"maxLength":4000}]},{"type":"null"}]}},"additionalProperties":false},"_maple_AlertNotificationTemplate":{"type":"object","properties":{"title":{"anyOf":[{"type":"string","allOf":[{"maxLength":4000}]},{"type":"null"}]},"body":{"anyOf":[{"type":"string","allOf":[{"maxLength":4000}]},{"type":"null"}]},"overrides":{"anyOf":[{"type":"object","additionalProperties":{"$ref":"#/components/schemas/_maple_AlertNotificationTemplateOverride"}},{"type":"null"}]}},"additionalProperties":false},"Union_17":{"anyOf":[{"$ref":"#/components/schemas/_maple_AlertNotificationTemplate"},{"type":"null"}],"description":"Custom notification message (`title` + Markdown `body` with `{{ variable }}` substitution, plus per-channel `overrides`), or `null` for Maple's built-in format."},"_maple_AlertSeverity":{"type":"string","enum":["warning","critical"],"title":"Alert Severity","description":"Severity attached to incidents this rule opens: `warning` or `critical`.","examples":["critical"]},"Arrays_4":{"type":"array","items":{"type":"string"},"description":"Services the rule is scoped to. Empty for all services.","examples":[["checkout"]]},"Arrays_5":{"type":"array","items":{"type":"string"},"description":"Services excluded from evaluation."},"Arrays_6":{"type":"array","items":{"type":"string"},"description":"Deployment environments the rule is scoped to. Empty for all environments. Always empty for `builder_query` / `raw_query`, whose queries carry their own filters.","examples":[["production"]]},"Arrays_7":{"type":"array","items":{"type":"string"},"description":"Free-form tags used to group and filter rules.","examples":[["payments"]]},"Arrays_8":{"type":"array","items":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"allOf":[{"minItems":1}]},"Union_18":{"anyOf":[{"$ref":"#/components/schemas/Arrays_8"},{"type":"null"}],"description":"Attribute dimensions to evaluate per-group (each group gets its own incident lifecycle), or `null` for a single aggregate evaluation."},"_maple_AlertSignalType":{"type":"string","enum":["error_rate","p95_latency","p99_latency","apdex","throughput","builder_query","raw_query"],"title":"Alert Signal Type","description":"What the rule measures: `error_rate`, `p95_latency`, `p99_latency`, `apdex`, `throughput`, `builder_query`, or `raw_query`. Metrics use `builder_query` with a metrics draft.","examples":["error_rate"]},"_maple_AlertComparator":{"type":"string","enum":["gt","gte","lt","lte","eq","neq","between","not_between"],"title":"Alert Comparator","description":"Comparison operator: `gt`, `gte`, `lt`, `lte`, `eq`, `neq`, or the range forms `between` / `not_between` (which also require `threshold_upper`).","examples":["gt"]},"AlertQueryBuilderDraft":{"type":"object","title":"Query-builder draft","description":"The query-builder draft document for `builder_query` rules, exactly as produced by the Maple dashboard. Treat it as an opaque document: keys are passed through verbatim (no case conversion) and the server validates the structure on write."},"Union_19":{"anyOf":[{"$ref":"#/components/schemas/AlertQueryBuilderDraft"},{"type":"null"}]},"_maple_QueryEngineAlertReducer":{"type":"string","enum":["identity","sum","avg","max","min"]},"_maple_AlertDestinationId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `dest_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["dest_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"Arrays_9":{"type":"array","items":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"description":"The alert destinations (`dest_…`) this rule notifies."},"_maple_QueryEngineNoDataBehavior":{"type":"string","enum":["skip","zero"],"description":"What the evaluator does when the window has no data: `skip` the check or treat the value as `zero`.","examples":["skip"]},"_maple_UserId_2":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"User ID","description":"Maple user ID of the rule's creator."}]},"_maple_UserId_3":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"User ID","description":"Maple user ID of the last editor."}]},"AlertRule":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"object":{"type":"string","enum":["alert_rule"],"description":"The object type — always `\"alert_rule\"`.","examples":["alert_rule"]},"name":{"type":"string","description":"Human-readable name of the rule.","examples":["Checkout error rate"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form operator notes shown alongside the rule, or `null`."},"notification_template":{"$ref":"#/components/schemas/Union_17"},"enabled":{"type":"boolean","description":"Whether the scheduler evaluates this rule.","examples":[true]},"severity":{"$ref":"#/components/schemas/_maple_AlertSeverity"},"service_names":{"$ref":"#/components/schemas/Arrays_4"},"exclude_service_names":{"$ref":"#/components/schemas/Arrays_5"},"environments":{"$ref":"#/components/schemas/Arrays_6"},"tags":{"$ref":"#/components/schemas/Arrays_7"},"group_by":{"$ref":"#/components/schemas/Union_18"},"signal_type":{"$ref":"#/components/schemas/_maple_AlertSignalType"},"comparator":{"$ref":"#/components/schemas/_maple_AlertComparator"},"threshold":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"threshold_upper":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Upper bound for range comparators (`between` / `not_between`), otherwise `null`."},"window_minutes":{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":1440,"description":"Length of the evaluation window in minutes.","examples":[5]}]},"minimum_sample_count":{"type":"integer","allOf":[{"minimum":0,"description":"Minimum samples required in the window before the rule can breach; below it the check is skipped.","examples":[50]}]},"consecutive_breaches_required":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Consecutive breached checks required before an incident opens.","examples":[2]}]},"consecutive_healthy_required":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Consecutive healthy checks required before an open incident resolves.","examples":[3]}]},"renotify_interval_minutes":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"How often an open incident re-notifies its destinations, in minutes.","examples":[60]}]},"apdex_threshold_ms":{"anyOf":[{"type":"number","allOf":[{"exclusiveMinimum":0}]},{"type":"null"}],"description":"For `apdex` rules: the satisfied-latency threshold in milliseconds."},"query_builder_draft":{"$ref":"#/components/schemas/Union_19"},"raw_query_sql":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"For `raw_query` rules: the SQL evaluated each window. `null` for other signal types."},"raw_query_reducer":{"anyOf":[{"$ref":"#/components/schemas/_maple_QueryEngineAlertReducer"},{"type":"null"}],"description":"For `raw_query` rules: how multi-row results reduce to one value (`identity`, `sum`, `avg`, `min`, `max`)."},"destination_ids":{"$ref":"#/components/schemas/Arrays_9"},"no_data_behavior":{"$ref":"#/components/schemas/_maple_QueryEngineNoDataBehavior"},"last_evaluation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The most recent evaluation error for this rule, or `null` if the last evaluation succeeded."},"last_evaluated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the rule was last evaluated, or `null` if never."},"last_scheduled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the scheduler last picked the rule up, or `null` if never."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/_maple_UserId_2"},"updated_by":{"$ref":"#/components/schemas/_maple_UserId_3"}},"required":["id","object","name","notes","notification_template","enabled","severity","service_names","exclude_service_names","environments","tags","group_by","signal_type","comparator","threshold","threshold_upper","window_minutes","minimum_sample_count","consecutive_breaches_required","consecutive_healthy_required","renotify_interval_minutes","apdex_threshold_ms","query_builder_draft","raw_query_sql","raw_query_reducer","destination_ids","no_data_behavior","last_evaluation_error","last_evaluated_at","last_scheduled_at","created_at","updated_at","created_by","updated_by"],"additionalProperties":false,"title":"Alert Rule","description":"A monitor that evaluates a built-in signal, query-builder query, or raw SQL over a rolling window and opens incidents when the threshold condition holds for enough consecutive checks. Metrics use the same query-builder path as metric charts. Notifications are delivered to the referenced alert destinations.","examples":[{"id":"alrt_gU26thvJECdQvu54Ad9jiz","object":"alert_rule","name":"Checkout error rate","notes":null,"notification_template":null,"enabled":true,"severity":"critical","service_names":["checkout"],"exclude_service_names":[],"environments":["production"],"tags":["payments"],"group_by":null,"signal_type":"error_rate","comparator":"gt","threshold":0.05,"threshold_upper":null,"window_minutes":5,"minimum_sample_count":50,"consecutive_breaches_required":2,"consecutive_healthy_required":3,"renotify_interval_minutes":60,"apdex_threshold_ms":null,"query_builder_draft":null,"raw_query_sql":null,"raw_query_reducer":null,"destination_ids":["dest_oybbpTBhtSFGShMjjLiCrh"],"no_data_behavior":"skip","last_evaluation_error":null,"last_evaluated_at":"2026-07-15T09:10:00.000Z","last_scheduled_at":"2026-07-15T09:10:00.000Z","created_at":"2026-07-01T12:00:00.000Z","updated_at":"2026-07-14T08:30:00.000Z","created_by":"user_2Nk8mXqPfR3yZ1aB4cD5eF6g","updated_by":"user_2Nk8mXqPfR3yZ1aB4cD5eF6g"}]},"AlertRuleList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertRule"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Alert rule list","description":"A cursor-paginated page of alert rules."},"AlertPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alerts_unavailable"]},"title":{"type":"string","enum":["Alerts are temporarily unavailable"]},"message":{"type":"string","enum":["Alerts are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alerts are temporarily unavailable","description":"The @maple/http/errors/AlertPersistenceError failure. HTTP 503."},"AlertRuleStoredConfigInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertRuleStoredConfigInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_rule_stored_config_invalid"]},"title":{"type":"string","enum":["Stored alert rule is invalid"]},"message":{"type":"string","enum":["The stored alert rule configuration could not be read."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Stored alert rule is invalid","description":"The @maple/http/errors/AlertRuleStoredConfigInvalidError failure. HTTP 500."},"Union_20":{"anyOf":[{"$ref":"#/components/schemas/_maple_AlertNotificationTemplate"},{"type":"null"}]},"_maple_AlertSeverity_1":{"type":"string","enum":["warning","critical"],"title":"Alert Severity","description":"Severity attached to incidents this rule opens.","examples":["critical"]},"Arrays_10":{"type":"array","items":{"type":"string"}},"Arrays_11":{"type":"array","items":{"type":"string"}},"Arrays_12":{"type":"array","items":{"type":"string"},"description":"Deployment environments to scope the rule to. Omit or pass `[]` for all environments.","examples":[["production"]]},"Arrays_13":{"type":"array","items":{"type":"string","allOf":[{"maxLength":32}]},"allOf":[{"maxItems":20}]},"Union_21":{"anyOf":[{"$ref":"#/components/schemas/Arrays_8"},{"type":"null"}]},"_maple_AlertSignalType_1":{"type":"string","enum":["error_rate","p95_latency","p99_latency","apdex","throughput","builder_query","raw_query"],"title":"Alert Signal Type","description":"What the rule measures.","examples":["error_rate"]},"_maple_AlertComparator_1":{"type":"string","enum":["gt","gte","lt","lte","eq","neq","between","not_between"],"title":"Alert Comparator","description":"Comparison operator. Range forms (`between` / `not_between`) also require `threshold_upper`.","examples":["gt"]},"Union_22":{"anyOf":[{"$ref":"#/components/schemas/AlertQueryBuilderDraft"},{"type":"null"}]},"Arrays_14":{"type":"array","items":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"description":"The alert destinations (`dest_…`) to notify. May be empty."},"AlertRuleCreateParams":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable name of the rule. Required, non-empty.","examples":["Checkout error rate"]}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"notification_template":{"$ref":"#/components/schemas/Union_20"},"enabled":{"type":"boolean","description":"Whether the rule starts enabled. Defaults to `true`."},"severity":{"$ref":"#/components/schemas/_maple_AlertSeverity_1"},"service_names":{"$ref":"#/components/schemas/Arrays_10"},"exclude_service_names":{"$ref":"#/components/schemas/Arrays_11"},"environments":{"$ref":"#/components/schemas/Arrays_12"},"tags":{"$ref":"#/components/schemas/Arrays_13"},"group_by":{"$ref":"#/components/schemas/Union_21"},"signal_type":{"$ref":"#/components/schemas/_maple_AlertSignalType_1"},"comparator":{"$ref":"#/components/schemas/_maple_AlertComparator_1"},"threshold":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"threshold_upper":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"window_minutes":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Length of the evaluation window in minutes.","examples":[5]}]},"minimum_sample_count":{"type":"integer","allOf":[{"minimum":0}]},"consecutive_breaches_required":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"consecutive_healthy_required":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"renotify_interval_minutes":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"apdex_threshold_ms":{"anyOf":[{"type":"number","allOf":[{"exclusiveMinimum":0}]},{"type":"null"}]},"query_builder_draft":{"$ref":"#/components/schemas/Union_22"},"raw_query_sql":{"anyOf":[{"type":"string"},{"type":"null"}]},"raw_query_reducer":{"anyOf":[{"$ref":"#/components/schemas/_maple_QueryEngineAlertReducer"},{"type":"null"}]},"destination_ids":{"$ref":"#/components/schemas/Arrays_14"}},"required":["name","severity","signal_type","comparator","threshold","window_minutes","destination_ids"],"additionalProperties":false,"title":"Alert rule create parameters","description":"Request body for creating an alert rule. Signal-specific fields (`apdex_threshold_ms`, `query_builder_draft`, `raw_query_*`) are required by their respective `signal_type` and validated server-side.","examples":[{"name":"Checkout error rate","severity":"critical","service_names":["checkout"],"signal_type":"error_rate","comparator":"gt","threshold":0.05,"window_minutes":5,"destination_ids":["dest_oybbpTBhtSFGShMjjLiCrh"]}]},"AlertRuleMutationResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"object":{"type":"string","enum":["alert_rule"],"description":"The object type — always `\"alert_rule\"`.","examples":["alert_rule"]},"name":{"type":"string","description":"Human-readable name of the rule.","examples":["Checkout error rate"]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Free-form operator notes shown alongside the rule, or `null`."},"notification_template":{"$ref":"#/components/schemas/Union_17"},"enabled":{"type":"boolean","description":"Whether the scheduler evaluates this rule.","examples":[true]},"severity":{"$ref":"#/components/schemas/_maple_AlertSeverity"},"service_names":{"$ref":"#/components/schemas/Arrays_4"},"exclude_service_names":{"$ref":"#/components/schemas/Arrays_5"},"environments":{"$ref":"#/components/schemas/Arrays_6"},"tags":{"$ref":"#/components/schemas/Arrays_7"},"group_by":{"$ref":"#/components/schemas/Union_18"},"signal_type":{"$ref":"#/components/schemas/_maple_AlertSignalType"},"comparator":{"$ref":"#/components/schemas/_maple_AlertComparator"},"threshold":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"threshold_upper":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Upper bound for range comparators (`between` / `not_between`), otherwise `null`."},"window_minutes":{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":1440,"description":"Length of the evaluation window in minutes.","examples":[5]}]},"minimum_sample_count":{"type":"integer","allOf":[{"minimum":0,"description":"Minimum samples required in the window before the rule can breach; below it the check is skipped.","examples":[50]}]},"consecutive_breaches_required":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Consecutive breached checks required before an incident opens.","examples":[2]}]},"consecutive_healthy_required":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Consecutive healthy checks required before an open incident resolves.","examples":[3]}]},"renotify_interval_minutes":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"How often an open incident re-notifies its destinations, in minutes.","examples":[60]}]},"apdex_threshold_ms":{"anyOf":[{"type":"number","allOf":[{"exclusiveMinimum":0}]},{"type":"null"}],"description":"For `apdex` rules: the satisfied-latency threshold in milliseconds."},"query_builder_draft":{"$ref":"#/components/schemas/Union_19"},"raw_query_sql":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"For `raw_query` rules: the SQL evaluated each window. `null` for other signal types."},"raw_query_reducer":{"anyOf":[{"$ref":"#/components/schemas/_maple_QueryEngineAlertReducer"},{"type":"null"}],"description":"For `raw_query` rules: how multi-row results reduce to one value (`identity`, `sum`, `avg`, `min`, `max`)."},"destination_ids":{"$ref":"#/components/schemas/Arrays_9"},"no_data_behavior":{"$ref":"#/components/schemas/_maple_QueryEngineNoDataBehavior"},"last_evaluation_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The most recent evaluation error for this rule, or `null` if the last evaluation succeeded."},"last_evaluated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the rule was last evaluated, or `null` if never."},"last_scheduled_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the scheduler last picked the rule up, or `null` if never."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"created_by":{"$ref":"#/components/schemas/_maple_UserId_2"},"updated_by":{"$ref":"#/components/schemas/_maple_UserId_3"},"txid":{"$ref":"#/components/schemas/_maple_PostgresTransactionId"}},"required":["id","object","name","notes","notification_template","enabled","severity","service_names","exclude_service_names","environments","tags","group_by","signal_type","comparator","threshold","threshold_upper","window_minutes","minimum_sample_count","consecutive_breaches_required","consecutive_healthy_required","renotify_interval_minutes","apdex_threshold_ms","query_builder_draft","raw_query_sql","raw_query_reducer","destination_ids","no_data_behavior","last_evaluation_error","last_evaluated_at","last_scheduled_at","created_at","updated_at","created_by","updated_by"],"additionalProperties":false,"title":"Alert rule mutation response","description":"The alert rule state after a create or update. `txid` is optional reconciliation metadata for ElectricSQL-integrated clients; other public API consumers do not need it.","examples":[{"id":"alrt_gU26thvJECdQvu54Ad9jiz","object":"alert_rule","name":"Checkout error rate","notes":null,"notification_template":null,"enabled":true,"severity":"critical","service_names":["checkout"],"exclude_service_names":[],"environments":["production"],"tags":["payments"],"group_by":null,"signal_type":"error_rate","comparator":"gt","threshold":0.05,"threshold_upper":null,"window_minutes":5,"minimum_sample_count":50,"consecutive_breaches_required":2,"consecutive_healthy_required":3,"renotify_interval_minutes":60,"apdex_threshold_ms":null,"query_builder_draft":null,"raw_query_sql":null,"raw_query_reducer":null,"destination_ids":["dest_oybbpTBhtSFGShMjjLiCrh"],"no_data_behavior":"skip","last_evaluation_error":null,"last_evaluated_at":"2026-07-15T09:10:00.000Z","last_scheduled_at":"2026-07-15T09:10:00.000Z","created_at":"2026-07-01T12:00:00.000Z","updated_at":"2026-07-14T08:30:00.000Z","created_by":"user_2Nk8mXqPfR3yZ1aB4cD5eF6g","updated_by":"user_2Nk8mXqPfR3yZ1aB4cD5eF6g","txid":"81234"}]},"AlertValidationError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertValidationError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_invalid"]},"title":{"type":"string","enum":["Invalid alert request"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid alert request","description":"The @maple/http/errors/AlertValidationError failure. HTTP 400."},"AlertForbiddenError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertForbiddenError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["permission_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_forbidden"]},"title":{"type":"string","enum":["Permission required"]},"message":{"type":"string","enum":["You do not have permission to perform this alert operation."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["request_access"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Permission required","description":"The @maple/http/errors/AlertForbiddenError failure. HTTP 403."},"AlertRuleDestinationNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertRuleDestinationNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_rule_destination_not_found"]},"title":{"type":"string","enum":["Alert rule destination not found"]},"message":{"type":"string","enum":["An alert destination referenced by this rule does not exist."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert rule destination not found","description":"The @maple/http/errors/AlertRuleDestinationNotFoundError failure. HTTP 404."},"AlertRuleNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertRuleNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_rule_not_found"]},"title":{"type":"string","enum":["Alert rule not found"]},"message":{"type":"string","enum":["No such alert rule."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert rule not found","description":"The @maple/http/errors/AlertRuleNotFoundError failure. HTTP 404."},"AlertRuleUpdateParams":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable name of the rule. Required, non-empty.","examples":["Checkout error rate"]}]},"severity":{"$ref":"#/components/schemas/_maple_AlertSeverity_1"},"signal_type":{"$ref":"#/components/schemas/_maple_AlertSignalType_1"},"comparator":{"$ref":"#/components/schemas/_maple_AlertComparator_1"},"threshold":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"window_minutes":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Length of the evaluation window in minutes.","examples":[5]}]},"destination_ids":{"$ref":"#/components/schemas/Arrays_14"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"notification_template":{"$ref":"#/components/schemas/Union_20"},"enabled":{"type":"boolean","description":"Whether the rule starts enabled. Defaults to `true`."},"service_names":{"$ref":"#/components/schemas/Arrays_10"},"exclude_service_names":{"$ref":"#/components/schemas/Arrays_11"},"environments":{"$ref":"#/components/schemas/Arrays_12"},"tags":{"$ref":"#/components/schemas/Arrays_13"},"group_by":{"$ref":"#/components/schemas/Union_21"},"threshold_upper":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"minimum_sample_count":{"type":"integer","allOf":[{"minimum":0}]},"consecutive_breaches_required":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"consecutive_healthy_required":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"renotify_interval_minutes":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"apdex_threshold_ms":{"anyOf":[{"type":"number","allOf":[{"exclusiveMinimum":0}]},{"type":"null"}]},"query_builder_draft":{"$ref":"#/components/schemas/Union_22"},"raw_query_sql":{"anyOf":[{"type":"string"},{"type":"null"}]},"raw_query_reducer":{"anyOf":[{"$ref":"#/components/schemas/_maple_QueryEngineAlertReducer"},{"type":"null"}]}},"additionalProperties":false,"title":"Alert rule update parameters","description":"Request body for updating an alert rule. Omitted fields are left unchanged.","examples":[{"enabled":false}]},"AlertRuleDeleteResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"object":{"type":"string","enum":["alert_rule"],"description":"The object type — always `\"alert_rule\"`."},"deleted":{"type":"boolean","enum":[true],"description":"Always `true` — the rule no longer exists."},"txid":{"$ref":"#/components/schemas/_maple_PostgresTransactionId"}},"required":["id","object","deleted"],"additionalProperties":false,"title":"Alert rule delete response","description":"Confirmation that an alert rule was deleted.","examples":[{"id":"alrt_gU26thvJECdQvu54Ad9jiz","object":"alert_rule","deleted":true,"txid":"81234"}]},"AlertRuleTestParams":{"type":"object","properties":{"rule":{"$ref":"#/components/schemas/AlertRuleCreateParams"},"send_notification":{"type":"boolean","description":"Also deliver a test notification to the rule's destinations. Defaults to `false`."}},"required":["rule"],"additionalProperties":false,"title":"Alert rule test parameters","description":"Request body for a one-off evaluation of a rule definition against live data."},"_maple_AlertEvaluationStatus":{"type":"string","enum":["breached","healthy","skipped"],"title":"Alert Evaluation Status","description":"The evaluation verdict: `breached`, `healthy`, or `skipped` (not enough samples / no data).","examples":["breached"]},"_maple_AlertComparator_2":{"type":"string","enum":["gt","gte","lt","lte","eq","neq","between","not_between"],"title":"Alert Comparator"},"AlertRuleTestResult":{"type":"object","properties":{"object":{"type":"string","enum":["alert_rule.test_result"],"description":"The object type — always `\"alert_rule.test_result\"`."},"status":{"$ref":"#/components/schemas/_maple_AlertEvaluationStatus"},"value":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"The observed value, or `null` when the check was skipped.","examples":[0.09]},"sample_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"threshold":{"$ref":"#/components/schemas/Union_12"},"threshold_upper":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"comparator":{"$ref":"#/components/schemas/_maple_AlertComparator_2"},"reason":{"type":"string","description":"Human-readable explanation of the verdict.","examples":["error rate 9.0% > threshold 5.0%"]}},"required":["object","status","value","sample_count","threshold","threshold_upper","comparator","reason"],"additionalProperties":false,"title":"Alert rule test result","description":"The outcome of a one-off rule evaluation against live data.","examples":[{"object":"alert_rule.test_result","status":"breached","value":0.09,"sample_count":132,"threshold":0.05,"threshold_upper":null,"comparator":"gt","reason":"error rate 9.0% > threshold 5.0%"}]},"QueryEngineValidationError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/QueryEngineValidationError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["query_engine_invalid"]},"title":{"type":"string","enum":["Invalid query"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid query","description":"The @maple/http/errors/QueryEngineValidationError failure. HTTP 400."},"WarehouseUpstreamError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseUpstreamError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_unavailable"]},"title":{"type":"string","enum":["Database is temporarily unavailable"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Database is temporarily unavailable","description":"The @maple/http/errors/WarehouseUpstreamError failure. HTTP 503."},"OrgClickHouseSettingsPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/OrgClickHouseSettingsPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["clickhouse_settings_unavailable"]},"title":{"type":"string","enum":["ClickHouse settings are temporarily unavailable"]},"message":{"type":"string","enum":["ClickHouse settings are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"ClickHouse settings are temporarily unavailable","description":"The @maple/http/errors/OrgClickHouseSettingsPersistenceError failure. HTTP 503."},"AlertDeliveryError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertDeliveryError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_delivery_failed"]},"title":{"type":"string","enum":["Alert provider request failed"]},"message":{"type":"string","enum":["The alert provider request failed."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert provider request failed","description":"The @maple/http/errors/AlertDeliveryError failure. HTTP 502."},"AlertDeliveryAuthError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertDeliveryAuthError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_delivery_auth_failed"]},"title":{"type":"string","enum":["Alert destination rejected our credentials"]},"message":{"type":"string","enum":["The destination rejected Maple's credentials. Reconnect it in settings."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reconnect"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert destination rejected our credentials","description":"The @maple/http/errors/AlertDeliveryAuthError failure. HTTP 502."},"AlertDeliveryTargetMissingError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertDeliveryTargetMissingError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_delivery_target_missing"]},"title":{"type":"string","enum":["Alert destination no longer exists"]},"message":{"type":"string","enum":["The destination no longer exists or is not reachable. Update it in settings."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert destination no longer exists","description":"The @maple/http/errors/AlertDeliveryTargetMissingError failure. HTTP 502."},"AlertDeliveryRejectedError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertDeliveryRejectedError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_delivery_rejected"]},"title":{"type":"string","enum":["Alert provider rejected the request"]},"message":{"type":"string","enum":["The alert provider rejected the request."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert provider rejected the request","description":"The @maple/http/errors/AlertDeliveryRejectedError failure. HTTP 502."},"WarehouseQueryError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseQueryError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_query_failed"]},"title":{"type":"string","enum":["Database query failed"]},"message":{"type":"string","enum":["The database query could not be completed."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Database query failed","description":"The @maple/http/errors/WarehouseQueryError failure. HTTP 502."},"WarehouseAuthError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseAuthError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_auth_failed"]},"title":{"type":"string","enum":["Database rejected our credentials"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reconnect"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Database rejected our credentials","description":"The @maple/http/errors/WarehouseAuthError failure. HTTP 502."},"WarehouseConfigError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseConfigError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_config_invalid"]},"title":{"type":"string","enum":["Database is not configured correctly"]},"message":{"type":"string","enum":["Database is not configured correctly."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reconnect"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Database is not configured correctly","description":"The @maple/http/errors/WarehouseConfigError failure. HTTP 502."},"WarehouseClientError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseClientError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_client_error"]},"title":{"type":"string","enum":["Database response could not be decoded"]},"message":{"type":"string","enum":["Database response could not be decoded."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Database response could not be decoded","description":"The @maple/http/errors/WarehouseClientError failure. HTTP 502."},"WarehouseSchemaDriftError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseSchemaDriftError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_schema_drift"]},"title":{"type":"string","enum":["Database schema is out of date"]},"message":{"type":"string","enum":["A column Maple expects is missing from the cluster. Run schema apply from your ClickHouse settings."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reconnect"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Database schema is out of date","description":"The @maple/http/errors/WarehouseSchemaDriftError failure. HTTP 502."},"WarehouseResultDecodeError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseResultDecodeError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_result_decode_failed"]},"title":{"type":"string","enum":["Database response did not match the expected schema"]},"message":{"type":"string","enum":["The database returned a response Maple could not decode. This is likely a Maple bug, not a problem with your cluster."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Database response did not match the expected schema","description":"The @maple/http/errors/WarehouseResultDecodeError failure. HTTP 502."},"OrgClickHouseSettingsStoredConfigInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["clickhouse_stored_settings_invalid"]},"title":{"type":"string","enum":["Saved ClickHouse settings are invalid"]},"message":{"type":"string","enum":["The saved ClickHouse settings are invalid. Reconnect the database in settings."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reconnect"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Saved ClickHouse settings are invalid","description":"The @maple/http/errors/OrgClickHouseSettingsStoredConfigInvalidError failure. HTTP 502."},"AlertDestinationDecryptionError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertDestinationDecryptionError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_destination_decryption_failed"]},"title":{"type":"string","enum":["Alert destination credentials could not be read"]},"message":{"type":"string","enum":["Maple could not read the stored alert destination credentials."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert destination credentials could not be read","description":"The @maple/http/errors/AlertDestinationDecryptionError failure. HTTP 500."},"AlertDestinationStoredConfigInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertDestinationStoredConfigInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_destination_stored_config_invalid"]},"title":{"type":"string","enum":["Stored alert destination is invalid"]},"message":{"type":"string","enum":["The stored alert destination configuration could not be read."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Stored alert destination is invalid","description":"The @maple/http/errors/AlertDestinationStoredConfigInvalidError failure. HTTP 500."},"WarehouseMalformedQueryError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseMalformedQueryError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_malformed_query"]},"title":{"type":"string","enum":["This chart hit a bug in Maple"]},"message":{"type":"string","enum":["Maple built a query its own database rejected. This is our fault, not a problem with your data or your cluster."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"This chart hit a bug in Maple","description":"The @maple/http/errors/WarehouseMalformedQueryError failure. HTTP 500."},"WarehouseScopeError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseScopeError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_scope_invariant_failed"]},"title":{"type":"string","enum":["Maple could not safely run this query"]},"message":{"type":"string","enum":["Maple rejected a query that did not satisfy its tenant-scope invariant."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Maple could not safely run this query","description":"The @maple/http/errors/WarehouseScopeError failure. HTTP 500."},"OrgClickHouseSettingsEncryptionError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/OrgClickHouseSettingsEncryptionError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["clickhouse_settings_encryption_failed"]},"title":{"type":"string","enum":["Maple could not read these settings"]},"message":{"type":"string","enum":["Maple could not securely read the saved ClickHouse settings."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Maple could not read these settings","description":"The @maple/http/errors/OrgClickHouseSettingsEncryptionError failure. HTTP 500."},"TinybirdOrgTokenConfigError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/TinybirdOrgTokenConfigError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["tinybird_org_token_config_invalid"]},"title":{"type":"string","enum":["Maple warehouse access is not configured"]},"message":{"type":"string","enum":["Maple could not configure secure access to the database."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Maple warehouse access is not configured","description":"The @maple/http/errors/TinybirdOrgTokenConfigError failure. HTTP 500."},"TinybirdOrgTokenMintError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/TinybirdOrgTokenMintError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["tinybird_org_token_mint_failed"]},"title":{"type":"string","enum":["Maple could not authorize database access"]},"message":{"type":"string","enum":["Maple could not authorize secure access to the database."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Maple could not authorize database access","description":"The @maple/http/errors/TinybirdOrgTokenMintError failure. HTTP 500."},"WarehouseQuotaExceededError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/WarehouseQuotaExceededError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["rate_limit_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["warehouse_quota_exceeded"]},"title":{"type":"string","enum":["Query was too expensive"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Query was too expensive","description":"The @maple/http/errors/WarehouseQuotaExceededError failure. HTTP 429."},"QueryEngineTimeoutError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/QueryEngineTimeoutError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["query_engine_timeout"]},"title":{"type":"string","enum":["Query timed out"]},"message":{"type":"string","enum":["The aggregation query timed out. Retry with a narrower time range."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Query timed out","description":"The @maple/http/errors/QueryEngineTimeoutError failure. HTTP 504."},"AlertRulePreviewParams":{"type":"object","properties":{"rule":{"$ref":"#/components/schemas/AlertRuleCreateParams"},"start_time":{"type":"string"},"end_time":{"type":"string"}},"required":["rule","start_time","end_time"],"additionalProperties":false,"title":"Alert rule preview parameters","description":"Request body for previewing what a rule definition would have observed over a historical range."},"_maple_AlertEvaluationStatus_1":{"type":"string","enum":["breached","healthy","skipped"],"title":"Alert Evaluation Status"},"AlertRulePreviewPoint":{"type":"object","properties":{"bucket":{"type":"string"},"value":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"sample_count":{"$ref":"#/components/schemas/Union_12"},"status":{"$ref":"#/components/schemas/_maple_AlertEvaluationStatus_1"},"provisional":{"type":"boolean","description":"Set on the trailing in-progress window: evaluated over less than a full window, so its value may still move."}},"required":["bucket","value","sample_count","status"],"additionalProperties":false,"title":"Alert rule preview point"},"AlertRulePreviewSeries":{"type":"object","properties":{"group_key":{"type":"string","description":"The group this series describes, or `\"__total__\"` for ungrouped rules."},"points":{"type":"array","items":{"$ref":"#/components/schemas/AlertRulePreviewPoint"}}},"required":["group_key","points"],"additionalProperties":false,"title":"Alert rule preview series"},"AlertRulePreviewFiringSpan":{"type":"object","properties":{"group_key":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"}},"required":["group_key","start","end"],"additionalProperties":false,"title":"Alert rule preview firing span","description":"A span during which the rule's state machine would have held an open incident."},"AlertRulePreviewResult":{"type":"object","properties":{"object":{"type":"string","enum":["alert_rule.preview"],"description":"The object type — always `\"alert_rule.preview\"`."},"bucket_seconds":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"window_minutes":{"$ref":"#/components/schemas/Union_12"},"threshold":{"$ref":"#/components/schemas/Union_12"},"threshold_upper":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"comparator":{"$ref":"#/components/schemas/_maple_AlertComparator_2"},"truncated_to_start":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set when the requested range was clamped to the preview bucket cap."},"series":{"type":"array","items":{"$ref":"#/components/schemas/AlertRulePreviewSeries"}},"would_fire":{"type":"array","items":{"$ref":"#/components/schemas/AlertRulePreviewFiringSpan"},"description":"Spans during which the rule would have held an open incident."}},"required":["object","bucket_seconds","window_minutes","threshold","threshold_upper","comparator","truncated_to_start","series","would_fire"],"additionalProperties":false,"title":"Alert rule preview result","description":"Evaluator-faithful preview of a rule over a historical range: the per-window observations the scheduler would have computed, and when incidents would have fired.","examples":[{"object":"alert_rule.preview","bucket_seconds":300,"window_minutes":5,"threshold":0.05,"threshold_upper":null,"comparator":"gt","truncated_to_start":null,"series":[{"group_key":"__total__","points":[{"bucket":"2026-07-15T09:10:00.000Z","value":0.09,"sample_count":132,"status":"breached"}]}],"would_fire":[{"group_key":"__total__","start":"2026-07-15T09:10:00.000Z","end":"2026-07-15T09:40:00.000Z"}]}]},"_maple_AlertCheckStatus":{"type":"string","enum":["breached","healthy","skipped","error"],"title":"Alert Check Status","description":"Only return checks with this evaluation status."},"_maple_AlertCheckStatus_1":{"type":"string","enum":["breached","healthy","skipped","error"],"title":"Alert Check Status","description":"`breached`, `healthy`, `skipped`, or `error` (the evaluation query failed).","examples":["breached"]},"_maple_AlertSignalType_2":{"type":"string","enum":["error_rate","p95_latency","p99_latency","apdex","throughput","builder_query","raw_query"],"title":"Alert Signal Type"},"_maple_AlertIncidentId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `inc_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["inc_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_AlertIncidentTransition":{"type":"string","enum":["none","opened","continued","resolved"],"title":"Alert Incident Transition","description":"How this check moved the incident state machine: `none`, `opened`, `continued`, or `resolved`.","examples":["opened"]},"AlertCheck":{"type":"object","properties":{"object":{"type":"string","enum":["alert_check"],"description":"The object type — always `\"alert_check\"`."},"timestamp":{"type":"string"},"group_key":{"type":"string","description":"The evaluated group, or `\"__total__\"` for ungrouped rules.","examples":["__total__"]},"status":{"$ref":"#/components/schemas/_maple_AlertCheckStatus_1"},"signal_type":{"$ref":"#/components/schemas/_maple_AlertSignalType_2"},"comparator":{"$ref":"#/components/schemas/_maple_AlertComparator_2"},"threshold":{"$ref":"#/components/schemas/Union_12"},"threshold_upper":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"observed_value":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"sample_count":{"$ref":"#/components/schemas/Union_12"},"window_minutes":{"$ref":"#/components/schemas/Union_12"},"window_start":{"type":"string"},"window_end":{"type":"string"},"consecutive_breaches":{"$ref":"#/components/schemas/Union_12"},"consecutive_healthy":{"$ref":"#/components/schemas/Union_12"},"incident_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_AlertIncidentId"},{"type":"null"}],"description":"The incident (`inc_…`) this check opened or continued, or `null`."},"incident_transition":{"$ref":"#/components/schemas/_maple_AlertIncidentTransition"},"evaluation_duration_ms":{"$ref":"#/components/schemas/Union_12"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why the evaluation failed — populated only on `error` checks."},"error_category":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Failure category (e.g. `\"validation\"`) — populated only on `error` checks."}},"required":["object","timestamp","group_key","status","signal_type","comparator","threshold","threshold_upper","observed_value","sample_count","window_minutes","window_start","window_end","consecutive_breaches","consecutive_healthy","incident_id","incident_transition","evaluation_duration_ms","error_message","error_category"],"additionalProperties":false,"title":"Alert Check","description":"One recorded evaluation of an alert rule: the observed value, the verdict, and how it moved the incident state machine. Checks form the rule's audit trail.","examples":[{"object":"alert_check","timestamp":"2026-07-15T09:10:00.000Z","group_key":"__total__","status":"breached","signal_type":"error_rate","comparator":"gt","threshold":0.05,"threshold_upper":null,"observed_value":0.09,"sample_count":132,"window_minutes":5,"window_start":"2026-07-15T09:05:00.000Z","window_end":"2026-07-15T09:10:00.000Z","consecutive_breaches":2,"consecutive_healthy":0,"incident_id":"inc_tC4d9V79DCDzgbGKhAnff9","incident_transition":"opened","evaluation_duration_ms":412,"error_message":null,"error_category":null}]},"AlertCheckList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertCheck"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Alert check list","description":"A cursor-paginated page of alert checks, newest first."},"AlertCheckSummary":{"type":"object","properties":{"object":{"type":"string","enum":["alert_check.summary"]},"bucket_seconds":{"$ref":"#/components/schemas/Union_12"},"top_group_keys":{"type":"array","items":{"type":"string"}},"totals":{"type":"object","properties":{"total":{"$ref":"#/components/schemas/Union_12"},"breached":{"$ref":"#/components/schemas/Union_12"},"healthy":{"$ref":"#/components/schemas/Union_12"},"skipped":{"$ref":"#/components/schemas/Union_12"},"error":{"$ref":"#/components/schemas/Union_12"},"transitions":{"$ref":"#/components/schemas/Union_12"}},"required":["total","breached","healthy","skipped","error","transitions"],"additionalProperties":false},"points":{"type":"array","items":{"type":"object","properties":{"bucket":{"type":"string"},"group_key":{"type":"string"},"total_count":{"$ref":"#/components/schemas/Union_12"},"breached_count":{"$ref":"#/components/schemas/Union_12"},"healthy_count":{"$ref":"#/components/schemas/Union_12"},"skipped_count":{"$ref":"#/components/schemas/Union_12"},"error_count":{"$ref":"#/components/schemas/Union_12"},"transition_count":{"$ref":"#/components/schemas/Union_12"},"observed_value":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"threshold":{"$ref":"#/components/schemas/Union_12"}},"required":["bucket","group_key","total_count","breached_count","healthy_count","skipped_count","error_count","transition_count","observed_value","threshold"],"additionalProperties":false}}},"required":["object","bucket_seconds","top_group_keys","totals","points"],"additionalProperties":false,"title":"Alert check summary","description":"Adaptive time buckets for up to one year of checks. The busiest 20 groups are preserved and the remainder is returned as `__other__`."},"_maple_AlertDeliveryEventId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `evt_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["evt_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_AlertDestinationType":{"type":"string","enum":["slack-bot","pagerduty","webhook","hazel-oauth","discord","telegram","email"],"title":"Alert Destination Type"},"_maple_AlertEventType":{"type":"string","enum":["trigger","resolve","renotify","test"],"title":"Alert Event Type"},"_maple_AlertDeliveryStatus":{"type":"string","enum":["queued","processing","success","failed"],"title":"Alert Delivery Status"},"AlertDelivery":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_AlertDeliveryEventId"},"object":{"type":"string","enum":["alert_delivery"]},"incident_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_AlertIncidentId"},{"type":"null"}]},"rule_id":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"destination_id":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"destination_name":{"type":"string"},"destination_type":{"$ref":"#/components/schemas/_maple_AlertDestinationType"},"delivery_key":{"type":"string"},"event_type":{"$ref":"#/components/schemas/_maple_AlertEventType"},"attempt_number":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"status":{"$ref":"#/components/schemas/_maple_AlertDeliveryStatus"},"scheduled_at":{"type":"string"},"attempted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"provider_reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_code":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","object","incident_id","rule_id","destination_id","destination_name","destination_type","delivery_key","event_type","attempt_number","status","scheduled_at","attempted_at","provider_message","provider_reference","response_code","error_message"],"additionalProperties":false,"title":"Alert Delivery","description":"One notification delivery attempt produced by an alert rule. This is the canonical delivery-history resource used by both the dashboard and API clients."},"AlertDeliveryList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertDelivery"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Alert delivery list","description":"Cursor-paginated list envelope wrapping a page of objects."},"_maple_AlertDestinationType_1":{"type":"string","enum":["slack-bot","pagerduty","webhook","hazel-oauth","discord","telegram","email"],"title":"Alert Destination Type","description":"The delivery channel: `slack-bot`, `pagerduty`, `webhook`, `hazel-oauth`, `discord`, `telegram`, or `email`. Immutable after creation.","examples":["slack-bot"]},"Union_23":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Workspace-member recipients (`user_…` IDs) for `email` destinations; `null` for every other type."},"AlertDestination":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"object":{"type":"string","enum":["alert_destination"],"description":"The object type — always `\"alert_destination\"`.","examples":["alert_destination"]},"name":{"type":"string","description":"Human-readable label for the destination, shown in the dashboard and in rule editors.","examples":["On-call Slack"]},"type":{"$ref":"#/components/schemas/_maple_AlertDestinationType_1"},"enabled":{"type":"boolean","description":"Whether the destination receives notifications. Disabled destinations are skipped at delivery time.","examples":[true]},"summary":{"type":"string","description":"Redacted, human-readable summary of the destination's configuration. Secrets (webhook URLs, integration keys, signing secrets) are write-only — they are never returned by the API.","examples":["Slack bot → #incidents"]},"channel_label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional display label for the target channel — the channel name for Slack, the chat ID for Telegram — or `null`.","examples":["#incidents"]},"member_user_ids":{"$ref":"#/components/schemas/Union_23"},"last_tested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When a test notification was last sent to this destination, or `null` if never tested."},"last_test_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The failure message from the most recent test delivery, or `null` if it succeeded (or was never run)."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","name","type","enabled","summary","channel_label","member_user_ids","last_tested_at","last_test_error","created_at","updated_at"],"additionalProperties":false,"title":"Alert Destination","description":"A notification channel that alert rules deliver to (Slack bot, PagerDuty, generic webhook, Hazel OAuth, Discord, Telegram, or workspace-member email). Channel secrets are write-only: responses carry a redacted `summary` instead.","examples":[{"id":"dest_oybbpTBhtSFGShMjjLiCrh","object":"alert_destination","name":"On-call Slack","type":"slack-bot","enabled":true,"summary":"Slack bot → #incidents","channel_label":"#incidents","member_user_ids":null,"last_tested_at":"2026-07-15T09:12:00.000Z","last_test_error":null,"created_at":"2026-07-01T12:00:00.000Z","updated_at":"2026-07-15T09:12:00.000Z"}]},"AlertDestinationList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertDestination"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Alert destination list","description":"A cursor-paginated page of alert destinations."},"AlertDestinationCreateSlackBot":{"type":"object","properties":{"type":{"type":"string","enum":["slack-bot"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable label for the destination. Required, non-empty.","examples":["On-call Slack"]}]},"channel_id":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The Slack channel id the bot posts to (e.g. `C0789CHAN`).","examples":["C0789CHAN"]}]},"channel_name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Optional display name for the channel, e.g. `incidents`.","examples":["incidents"]}]},"enabled":{"type":"boolean","description":"Whether the destination starts enabled. Defaults to `true`.","examples":[true]}},"required":["type","name","channel_id"],"additionalProperties":false,"title":"Slack (bot) destination"},"AlertDestinationCreatePagerduty":{"type":"object","properties":{"type":{"type":"string","enum":["pagerduty"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable label for the destination. Required, non-empty.","examples":["On-call Slack"]}]},"integration_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The PagerDuty Events API v2 integration (routing) key. Write-only — never returned."}]},"enabled":{"type":"boolean","description":"Whether the destination starts enabled. Defaults to `true`.","examples":[true]}},"required":["type","name","integration_key"],"additionalProperties":false,"title":"PagerDuty destination"},"AlertDestinationCreateWebhook":{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable label for the destination. Required, non-empty.","examples":["On-call Slack"]}]},"url":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The HTTPS endpoint that receives alert payloads as JSON POSTs.","examples":["https://example.com/hooks/maple"]}]},"signing_secret":{"type":"string","description":"Optional secret used to HMAC-sign webhook payloads. Write-only — never returned."},"enabled":{"type":"boolean","description":"Whether the destination starts enabled. Defaults to `true`.","examples":[true]}},"required":["type","name","url"],"additionalProperties":false,"title":"Webhook destination"},"_maple_HazelOrganizationId":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"Hazel Organization ID","description":"The connected Hazel organization ID."}]},"_maple_HazelChannelId":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"Hazel Channel ID","description":"The Hazel channel that receives notifications."}]},"AlertDestinationCreateHazelOauth":{"type":"object","properties":{"type":{"type":"string","enum":["hazel-oauth"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable label for the destination. Required, non-empty.","examples":["On-call Slack"]}]},"hazel_organization_id":{"$ref":"#/components/schemas/_maple_HazelOrganizationId"},"hazel_organization_name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Display name of the connected Hazel organization."}]},"hazel_organization_logo_url":{"anyOf":[{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},{"type":"null"}],"description":"Optional logo URL for the connected Hazel organization."},"hazel_channel_id":{"$ref":"#/components/schemas/_maple_HazelChannelId"},"hazel_channel_name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Display name of the Hazel channel."}]},"enabled":{"type":"boolean","description":"Whether the destination starts enabled. Defaults to `true`.","examples":[true]}},"required":["type","name","hazel_organization_id","hazel_organization_name","hazel_channel_id","hazel_channel_name"],"additionalProperties":false,"title":"Hazel (OAuth) destination"},"AlertDestinationCreateDiscord":{"type":"object","properties":{"type":{"type":"string","enum":["discord"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable label for the destination. Required, non-empty.","examples":["On-call Slack"]}]},"webhook_url":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The Discord webhook URL. Write-only — never returned."}]},"enabled":{"type":"boolean","description":"Whether the destination starts enabled. Defaults to `true`.","examples":[true]}},"required":["type","name","webhook_url"],"additionalProperties":false,"title":"Discord destination"},"AlertDestinationCreateTelegram":{"type":"object","properties":{"type":{"type":"string","enum":["telegram"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable label for the destination. Required, non-empty.","examples":["On-call Slack"]}]},"bot_token":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The bot token issued by @BotFather. Write-only — never returned."}]},"chat_id":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The target chat: a numeric id such as `-1001234567890`, or an `@channelusername`. The bot must be a member of the chat.","examples":["-1001234567890"]}]},"enabled":{"type":"boolean","description":"Whether the destination starts enabled. Defaults to `true`.","examples":[true]}},"required":["type","name","bot_token","chat_id"],"additionalProperties":false,"title":"Telegram destination"},"AlertDestinationCreateEmail":{"type":"object","properties":{"type":{"type":"string","enum":["email"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable label for the destination. Required, non-empty.","examples":["On-call Slack"]}]},"member_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/_maple_UserId_1"},"allOf":[{"minItems":1},{"maxItems":10,"description":"Workspace-member recipients (`user_…` IDs), between 1 and 10. The server resolves each to the member's email — arbitrary addresses cannot be targeted."}]},"enabled":{"type":"boolean","description":"Whether the destination starts enabled. Defaults to `true`.","examples":[true]}},"required":["type","name","member_user_ids"],"additionalProperties":false,"title":"Email destination"},"AlertDestinationCreateParams":{"anyOf":[{"$ref":"#/components/schemas/AlertDestinationCreateSlackBot"},{"$ref":"#/components/schemas/AlertDestinationCreatePagerduty"},{"$ref":"#/components/schemas/AlertDestinationCreateWebhook"},{"$ref":"#/components/schemas/AlertDestinationCreateHazelOauth"},{"$ref":"#/components/schemas/AlertDestinationCreateDiscord"},{"$ref":"#/components/schemas/AlertDestinationCreateTelegram"},{"$ref":"#/components/schemas/AlertDestinationCreateEmail"}],"title":"Alert destination create parameters","description":"Request body for creating an alert destination, discriminated on `type`. Channel secrets are accepted here but never returned by any read endpoint.","examples":[{"type":"slack-bot","name":"On-call Slack","channel_id":"C0789CHAN","channel_name":"incidents","enabled":true}]},"AlertDestinationMutationResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"object":{"type":"string","enum":["alert_destination"],"description":"The object type — always `\"alert_destination\"`.","examples":["alert_destination"]},"name":{"type":"string","description":"Human-readable label for the destination, shown in the dashboard and in rule editors.","examples":["On-call Slack"]},"type":{"$ref":"#/components/schemas/_maple_AlertDestinationType_1"},"enabled":{"type":"boolean","description":"Whether the destination receives notifications. Disabled destinations are skipped at delivery time.","examples":[true]},"summary":{"type":"string","description":"Redacted, human-readable summary of the destination's configuration. Secrets (webhook URLs, integration keys, signing secrets) are write-only — they are never returned by the API.","examples":["Slack bot → #incidents"]},"channel_label":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional display label for the target channel — the channel name for Slack, the chat ID for Telegram — or `null`.","examples":["#incidents"]},"member_user_ids":{"$ref":"#/components/schemas/Union_23"},"last_tested_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When a test notification was last sent to this destination, or `null` if never tested."},"last_test_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The failure message from the most recent test delivery, or `null` if it succeeded (or was never run)."},"created_at":{"type":"string"},"updated_at":{"type":"string"},"txid":{"$ref":"#/components/schemas/_maple_PostgresTransactionId"}},"required":["id","object","name","type","enabled","summary","channel_label","member_user_ids","last_tested_at","last_test_error","created_at","updated_at"],"additionalProperties":false,"title":"Alert destination mutation response","description":"An alert destination returned by a create or update mutation, with optional sync metadata.","examples":[{"id":"dest_oybbpTBhtSFGShMjjLiCrh","object":"alert_destination","name":"On-call Slack","type":"slack-bot","enabled":true,"summary":"Slack bot → #incidents","channel_label":"#incidents","member_user_ids":null,"last_tested_at":"2026-07-15T09:12:00.000Z","last_test_error":null,"created_at":"2026-07-01T12:00:00.000Z","updated_at":"2026-07-15T09:12:00.000Z","txid":"81234"}]},"IntegrationsValidationError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IntegrationsValidationError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["integration_request_invalid"]},"title":{"type":"string","enum":["Invalid integration request"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid integration request","description":"The @maple/http/errors/IntegrationsValidationError failure. HTTP 400."},"AlertRecipientSelectionError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertRecipientSelectionError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_recipient_invalid"]},"title":{"type":"string","enum":["Invalid alert recipient"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid alert recipient","description":"The @maple/http/errors/AlertRecipientSelectionError failure. HTTP 400."},"IntegrationsPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IntegrationsPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["integration_persistence_unavailable"]},"title":{"type":"string","enum":["Integrations are temporarily unavailable"]},"message":{"type":"string","enum":["Integrations are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Integrations are temporarily unavailable","description":"The @maple/http/errors/IntegrationsPersistenceError failure. HTTP 503."},"AlertMemberDirectoryUnavailableError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertMemberDirectoryUnavailableError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_member_directory_unavailable"]},"title":{"type":"string","enum":["Workspace members are temporarily unavailable"]},"message":{"type":"string","enum":["Workspace members could not be loaded. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Workspace members are temporarily unavailable","description":"The @maple/http/errors/AlertMemberDirectoryUnavailableError failure. HTTP 503."},"AlertDestinationEncryptionError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertDestinationEncryptionError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_destination_encryption_failed"]},"title":{"type":"string","enum":["Alert destination could not be secured"]},"message":{"type":"string","enum":["Maple could not securely store the alert destination."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert destination could not be secured","description":"The @maple/http/errors/AlertDestinationEncryptionError failure. HTTP 500."},"AlertMemberDirectoryNotConfiguredError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertMemberDirectoryNotConfiguredError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_member_directory_not_configured"]},"title":{"type":"string","enum":["Workspace member lookup is not configured"]},"message":{"type":"string","enum":["Workspace member lookup is not configured for this Maple deployment."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Workspace member lookup is not configured","description":"The @maple/http/errors/AlertMemberDirectoryNotConfiguredError failure. HTTP 500."},"IntegrationsNotConnectedError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IntegrationsNotConnectedError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["conflict_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["integration_not_connected"]},"title":{"type":"string","enum":["Integration not connected"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reconnect"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Integration not connected","description":"The @maple/http/errors/IntegrationsNotConnectedError failure. HTTP 409."},"IntegrationsRevokedError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IntegrationsRevokedError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["authentication_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["integration_authorization_revoked"]},"title":{"type":"string","enum":["Integration authorization revoked"]},"message":{"type":"string","enum":["The integration authorization was revoked. Reconnect and try again."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reconnect"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Integration authorization revoked","description":"The @maple/http/errors/IntegrationsRevokedError failure. HTTP 401."},"IntegrationsUpstreamError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IntegrationsUpstreamError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["integration_upstream_error"]},"title":{"type":"string","enum":["Integration provider is unavailable"]},"message":{"type":"string","enum":["The integration provider could not complete the request."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Integration provider is unavailable","description":"The @maple/http/errors/IntegrationsUpstreamError failure. HTTP 502."},"TelegramChatsParams":{"type":"object","properties":{"bot_token":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The bot token to inspect. Write-only, and not stored by this call — it is used for one `getUpdates` read and discarded."}]}},"required":["bot_token"],"additionalProperties":false,"title":"Telegram chat discovery parameters"},"TelegramChat":{"type":"object","properties":{"id":{"type":"string","description":"The chat ID, as a string. Negative for groups and channels — pass it verbatim as `chat_id` when creating the destination.","examples":["-1001234567890"]},"title":{"type":"string","description":"Display name of the chat: its title, or the username for a one-to-one chat.","examples":["Acme On-call"]},"type":{"type":"string","enum":["private","group","supergroup","channel"],"description":"Telegram's chat type.","examples":["supergroup"]}},"required":["id","title","type"],"additionalProperties":false,"title":"Telegram chat","description":"A chat the bot can currently see.","examples":[{"id":"-1001234567890","title":"Acme On-call","type":"supergroup"}]},"TelegramChatList":{"type":"object","properties":{"object":{"type":"string","enum":["alert_destination.telegram_chat_list"],"description":"The object type — always `\"alert_destination.telegram_chat_list\"`."},"chats":{"type":"array","items":{"$ref":"#/components/schemas/TelegramChat"},"description":"The chats the bot has seen recently, most recent first. Telegram retains updates for about 24 hours, so an empty array means \"nothing recent\" — add the bot to the chat, or send it a message, and try again."}},"required":["object","chats"],"additionalProperties":false,"title":"Telegram chat list","description":"Chats discovered from the bot's pending updates. Not the standard list envelope: there is no cursor, because Telegram exposes a short retention window rather than a paginated inventory.","examples":[{"object":"alert_destination.telegram_chat_list","chats":[{"id":"-1001234567890","title":"Acme On-call","type":"supergroup"}]}]},"AlertDestinationNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertDestinationNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_destination_not_found"]},"title":{"type":"string","enum":["Alert destination not found"]},"message":{"type":"string","enum":["No such alert destination."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert destination not found","description":"The @maple/http/errors/AlertDestinationNotFoundError failure. HTTP 404."},"AlertDestinationUpdateSlackBot":{"type":"object","properties":{"type":{"type":"string","enum":["slack-bot"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"New label for the destination."}]},"channel_id":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"channel_name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"enabled":{"type":"boolean"}},"required":["type"],"additionalProperties":false,"title":"Slack (bot) destination update"},"AlertDestinationUpdatePagerduty":{"type":"object","properties":{"type":{"type":"string","enum":["pagerduty"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"New label for the destination."}]},"integration_key":{"type":"string"},"enabled":{"type":"boolean"}},"required":["type"],"additionalProperties":false,"title":"PagerDuty destination update"},"AlertDestinationUpdateWebhook":{"type":"object","properties":{"type":{"type":"string","enum":["webhook"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"New label for the destination."}]},"url":{"type":"string"},"signing_secret":{"type":"string"},"enabled":{"type":"boolean"}},"required":["type"],"additionalProperties":false,"title":"Webhook destination update"},"_maple_HazelOrganizationId_1":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"Hazel Organization ID"}]},"_maple_HazelChannelId_1":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"Hazel Channel ID"}]},"AlertDestinationUpdateHazelOauth":{"type":"object","properties":{"type":{"type":"string","enum":["hazel-oauth"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"New label for the destination."}]},"hazel_organization_id":{"$ref":"#/components/schemas/_maple_HazelOrganizationId_1"},"hazel_organization_name":{"type":"string"},"hazel_organization_logo_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"hazel_channel_id":{"$ref":"#/components/schemas/_maple_HazelChannelId_1"},"hazel_channel_name":{"type":"string"},"enabled":{"type":"boolean"}},"required":["type"],"additionalProperties":false,"title":"Hazel (OAuth) destination update"},"AlertDestinationUpdateDiscord":{"type":"object","properties":{"type":{"type":"string","enum":["discord"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"New label for the destination."}]},"webhook_url":{"type":"string"},"enabled":{"type":"boolean"}},"required":["type"],"additionalProperties":false,"title":"Discord destination update"},"AlertDestinationUpdateTelegram":{"type":"object","properties":{"type":{"type":"string","enum":["telegram"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"New label for the destination."}]},"bot_token":{"type":"string"},"chat_id":{"type":"string"},"enabled":{"type":"boolean"}},"required":["type"],"additionalProperties":false,"title":"Telegram destination update"},"AlertDestinationUpdateEmail":{"type":"object","properties":{"type":{"type":"string","enum":["email"]},"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"New label for the destination."}]},"member_user_ids":{"type":"array","items":{"$ref":"#/components/schemas/_maple_UserId_1"},"allOf":[{"minItems":1},{"maxItems":10}]},"enabled":{"type":"boolean"}},"required":["type"],"additionalProperties":false,"title":"Email destination update"},"AlertDestinationUpdateParams":{"anyOf":[{"$ref":"#/components/schemas/AlertDestinationUpdateSlackBot"},{"$ref":"#/components/schemas/AlertDestinationUpdatePagerduty"},{"$ref":"#/components/schemas/AlertDestinationUpdateWebhook"},{"$ref":"#/components/schemas/AlertDestinationUpdateHazelOauth"},{"$ref":"#/components/schemas/AlertDestinationUpdateDiscord"},{"$ref":"#/components/schemas/AlertDestinationUpdateTelegram"},{"$ref":"#/components/schemas/AlertDestinationUpdateEmail"}],"title":"Alert destination update parameters","description":"Request body for updating an alert destination. `type` must match the destination's existing (immutable) type and selects which config fields apply; omitted fields are left unchanged.","examples":[{"type":"slack-bot","enabled":false}]},"AlertDestinationDeleteResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_AlertDestinationId"},"object":{"type":"string","enum":["alert_destination"],"description":"The object type — always `\"alert_destination\"`."},"deleted":{"type":"boolean","enum":[true],"description":"Always `true` — the destination no longer exists."},"txid":{"$ref":"#/components/schemas/_maple_PostgresTransactionId"}},"required":["id","object","deleted"],"additionalProperties":false,"title":"Alert destination delete response","description":"Confirmation that an alert destination was deleted.","examples":[{"id":"dest_oybbpTBhtSFGShMjjLiCrh","object":"alert_destination","deleted":true,"txid":"81234"}]},"AlertDestinationInUseError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertDestinationInUseError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["conflict_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_destination_in_use"]},"title":{"type":"string","enum":["Alert destination is in use"]},"message":{"type":"string","enum":["The alert destination is currently used by one or more alert rules."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert destination is in use","description":"The @maple/http/errors/AlertDestinationInUseError failure. HTTP 409."},"AlertDestinationTestResult":{"type":"object","properties":{"object":{"type":"string","enum":["alert_destination.test_result"],"description":"The object type — always `\"alert_destination.test_result\"`."},"success":{"type":"boolean","description":"Whether the test notification was delivered successfully.","examples":[true]},"message":{"type":"string","description":"Human-readable delivery outcome.","examples":["Test notification sent"]}},"required":["object","success","message"],"additionalProperties":false,"title":"Alert destination test result","description":"The outcome of sending a test notification to a destination.","examples":[{"object":"alert_destination.test_result","success":true,"message":"Test notification sent"}]},"_maple_AlertIncidentStatus":{"type":"string","enum":["open","resolved"],"title":"Alert Incident Status","description":"Only return incidents with this status (`open` or `resolved`).","examples":["open"]},"_maple_AlertSignalType_3":{"type":"string","enum":["error_rate","p95_latency","p99_latency","apdex","throughput","builder_query","raw_query"],"title":"Alert Signal Type","description":"The signal the rule measures.","examples":["error_rate"]},"_maple_AlertSeverity_2":{"type":"string","enum":["warning","critical"],"title":"Alert Severity","description":"Severity inherited from the rule: `warning` or `critical`.","examples":["critical"]},"_maple_AlertIncidentStatus_1":{"type":"string","enum":["open","resolved"],"title":"Alert Incident Status","description":"`open` while the breach persists; `resolved` once enough consecutive healthy checks are observed. Incident resolution is scheduler-driven — incidents cannot be closed via the API.","examples":["open"]},"_maple_ErrorIssueId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `iss_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["iss_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"AlertIncident":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_AlertIncidentId"},"object":{"type":"string","enum":["alert_incident"],"description":"The object type — always `\"alert_incident\"`.","examples":["alert_incident"]},"rule_id":{"$ref":"#/components/schemas/_maple_AlertRuleId"},"rule_name":{"type":"string","description":"Name of the rule at the time the incident was recorded.","examples":["Checkout error rate"]},"group_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The breaching group for grouped rules, or `null` for ungrouped rules."},"signal_type":{"$ref":"#/components/schemas/_maple_AlertSignalType_3"},"severity":{"$ref":"#/components/schemas/_maple_AlertSeverity_2"},"status":{"$ref":"#/components/schemas/_maple_AlertIncidentStatus_1"},"comparator":{"$ref":"#/components/schemas/_maple_AlertComparator_2"},"threshold":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"threshold_upper":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"first_triggered_at":{"type":"string"},"last_triggered_at":{"type":"string"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the incident resolved, or `null` while it is still open."},"last_observed_value":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"The most recently observed value, or `null`.","examples":[0.09]},"last_sample_count":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Sample count of the most recent observation, or `null`."},"dedupe_key":{"type":"string","description":"Stable identity of the (rule, group) incident stream, used to deduplicate notifications."},"last_delivered_event_type":{"anyOf":[{"$ref":"#/components/schemas/_maple_AlertEventType"},{"type":"null"}],"description":"The most recent notification event delivered for this incident (`trigger`, `resolve`, `renotify`, `test`), or `null`."},"last_notified_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When a notification was last delivered for this incident, or `null`."},"error_issue_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_ErrorIssueId"},{"type":"null"}],"description":"The linked error issue (`iss_…`) when the incident was correlated to one, or `null`."}},"required":["id","object","rule_id","rule_name","group_key","signal_type","severity","status","comparator","threshold","threshold_upper","first_triggered_at","last_triggered_at","resolved_at","last_observed_value","last_sample_count","dedupe_key","last_delivered_event_type","last_notified_at","error_issue_id"],"additionalProperties":false,"title":"Alert Incident","description":"A period during which an alert rule's condition held: opened after enough consecutive breaches, resolved by the scheduler after enough consecutive healthy checks. Read-only via the API.","examples":[{"id":"inc_tC4d9V79DCDzgbGKhAnff9","object":"alert_incident","rule_id":"alrt_gU26thvJECdQvu54Ad9jiz","rule_name":"Checkout error rate","group_key":null,"signal_type":"error_rate","severity":"critical","status":"open","comparator":"gt","threshold":0.05,"threshold_upper":null,"first_triggered_at":"2026-07-15T09:10:00.000Z","last_triggered_at":"2026-07-15T09:40:00.000Z","resolved_at":null,"last_observed_value":0.09,"last_sample_count":132,"dedupe_key":"alrt_gU26thvJECdQvu54Ad9jiz:__total__","last_delivered_event_type":"trigger","last_notified_at":"2026-07-15T09:10:05.000Z","error_issue_id":null}]},"AlertIncidentList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AlertIncident"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Alert incident list","description":"A cursor-paginated page of alert incidents."},"AlertIncidentNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/AlertIncidentNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["alert_incident_not_found"]},"title":{"type":"string","enum":["Alert incident not found"]},"message":{"type":"string","enum":["No such alert incident."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Alert incident not found","description":"The @maple/http/errors/AlertIncidentNotFoundError failure. HTTP 404."},"IngestKeys":{"type":"object","properties":{"object":{"type":"string","enum":["ingest_keys"],"description":"The object type — always `\"ingest_keys\"`.","examples":["ingest_keys"]},"public_key":{"type":"string","description":"The public ingest key. Safe to embed in browser and mobile telemetry senders; it can only write telemetry, never read data.","examples":["maple_pk_9f2cB1x8Kt7pQ2wR5vN0sL3d"]},"private_key":{"type":"string","description":"The private ingest key for server-side telemetry senders. Keep it secret — treat a leak as cause to roll.","examples":["maple_sk_J6hM4gY9dW1eF8aZ3cV7bN2m"]},"public_rotated_at":{"type":"string"},"private_rotated_at":{"type":"string"}},"required":["object","public_key","private_key","public_rotated_at","private_rotated_at"],"additionalProperties":false,"title":"Ingest Keys","description":"Your organization's telemetry ingest credentials — a public key for client-side senders and a private key for server-side senders. A per-organization singleton: rolling a key immediately invalidates its predecessor.","examples":[{"object":"ingest_keys","public_key":"maple_pk_9f2cB1x8Kt7pQ2wR5vN0sL3d","private_key":"maple_sk_J6hM4gY9dW1eF8aZ3cV7bN2m","public_rotated_at":"2026-07-01T12:00:00.000Z","private_rotated_at":"2026-07-01T12:00:00.000Z"}]},"IngestKeyPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IngestKeyPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["ingest_keys_unavailable"]},"title":{"type":"string","enum":["Ingest keys are temporarily unavailable"]},"message":{"type":"string","enum":["Ingest keys are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Ingest keys are temporarily unavailable","description":"The @maple/http/errors/IngestKeyPersistenceError failure. HTTP 503."},"IngestKeyEncryptionError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IngestKeyEncryptionError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["ingest_key_encryption_failed"]},"title":{"type":"string","enum":["Ingest key could not be secured"]},"message":{"type":"string","enum":["Maple could not securely process the ingest key."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Ingest key could not be secured","description":"The @maple/http/errors/IngestKeyEncryptionError failure. HTTP 500."},"SlackIntegration":{"type":"object","properties":{"object":{"type":"string","enum":["slack_integration"],"description":"The object type — always `\"slack_integration\"`.","examples":["slack_integration"]},"installed":{"type":"boolean","description":"Whether the Maple Slack app is currently installed for this organization.","examples":[true]},"team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The connected Slack workspace (team) id, or `null` when not installed.","examples":["T0123ABCD"]},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The connected Slack workspace name, or `null`.","examples":["Acme"]},"bot_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The Slack user id of the installed bot, or `null`.","examples":["U0456BOT"]},"installed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the app was installed, or `null` when not installed."},"disconnected_reason":{"anyOf":[{"type":"string","enum":["app_uninstalled","tokens_revoked","reconciliation"]},{"type":"null"}],"description":"Set only when `installed` is `false` and the most recent installation was disconnected from Slack's side rather than via Maple: `app_uninstalled` (the app was removed from the workspace), `tokens_revoked` (Slack revoked the bot's tokens), or `reconciliation` (Maple found the bot token dead). `null` when installed, never installed, or uninstalled via Maple.","examples":["app_uninstalled"]},"disconnected_team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The workspace name of the remotely disconnected installation, or `null` when `disconnected_reason` is `null`.","examples":["Acme"]},"disconnected_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the remote disconnect was recorded, or `null` when `disconnected_reason` is `null`."},"missing_scopes":{"type":"array","items":{"type":"string"},"description":"Bot scopes Maple now requires that the current installation has not granted. Non-empty means the app should be reconnected (a fresh OAuth install over the existing one) to pick up the new permissions — the bot keeps its channel memberships. Always empty when not installed.","examples":[["reactions:write"]]}},"required":["object","installed","team_id","team_name","bot_user_id","installed_at","disconnected_reason","disconnected_team_name","disconnected_at","missing_scopes"],"additionalProperties":false,"title":"Slack integration status","description":"The Slack app installation state for the authenticated organization.","examples":[{"object":"slack_integration","installed":true,"team_id":"T0123ABCD","team_name":"Acme","bot_user_id":"U0456BOT","installed_at":"2026-07-01T12:00:00.000Z","disconnected_reason":null,"disconnected_team_name":null,"disconnected_at":null,"missing_scopes":[]}]},"SlackInstall":{"type":"object","properties":{"object":{"type":"string","enum":["slack_integration.install"],"description":"The object type — always `\"slack_integration.install\"`."},"url":{"type":"string","description":"The Slack authorize URL to redirect the user to. Opens the Slack consent screen; on approval Slack redirects back to Maple's callback.","examples":["https://slack.com/oauth/v2/authorize?client_id=..."]}},"required":["object","url"],"additionalProperties":false,"title":"Slack install response","description":"The Slack OAuth authorize URL to begin an installation.","examples":[{"object":"slack_integration.install","url":"https://slack.com/oauth/v2/authorize?client_id=123&scope=chat:write&state=abc"}]},"CallbackHostUnavailableError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/CallbackHostUnavailableError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["callback_host_unavailable"]},"title":{"type":"string","enum":["Integration setup unavailable"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Integration setup unavailable","description":"The @maple/http/v2/CallbackHostUnavailableError failure. HTTP 503."},"IntegrationsConfigurationError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IntegrationsConfigurationError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["integration_not_configured"]},"title":{"type":"string","enum":["Integration is not configured"]},"message":{"type":"string","enum":["This integration is not configured in Maple. Contact support."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Integration is not configured","description":"The @maple/http/errors/IntegrationsConfigurationError failure. HTTP 503."},"SlackUninstall":{"type":"object","properties":{"object":{"type":"string","enum":["slack_integration"],"description":"The object type — always `\"slack_integration\"`."},"installed":{"type":"boolean","enum":[false],"description":"Always `false` — the app is no longer installed."}},"required":["object","installed"],"additionalProperties":false,"title":"Slack uninstall response","description":"Confirmation that the Slack app was uninstalled.","examples":[{"object":"slack_integration","installed":false}]},"SlackChannel":{"type":"object","properties":{"id":{"type":"string","description":"The Slack channel id.","examples":["C0789CHAN"]},"name":{"type":"string","description":"The channel name (without `#`).","examples":["incidents"]},"is_private":{"type":"boolean","description":"Whether the channel is private.","examples":[false]},"is_member":{"type":"boolean","description":"Whether the Maple bot is a member of the channel (required to post to private channels).","examples":[true]}},"required":["id","name","is_private","is_member"],"additionalProperties":false,"title":"Slack channel","description":"A channel the installed Maple Slack bot can see.","examples":[{"id":"C0789CHAN","name":"incidents","is_private":false,"is_member":true}]},"SlackChannelList":{"type":"object","properties":{"object":{"type":"string","enum":["slack_integration.channel_list"],"description":"The object type — always `\"slack_integration.channel_list\"`."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel"},"description":"The channels the installed bot can see, ordered with the channels the bot has joined (`is_member`) first, then alphabetically by name within each half."},"truncated":{"type":"boolean","description":"Whether the workspace has more channels than this response could reach. `true` means `channels` is a prefix of the inventory, not the whole of it — the bot must be invited to a missing channel for it to appear.","examples":[false]}},"required":["object","channels","truncated"],"additionalProperties":false,"title":"Slack channel list","description":"The channels visible to the installed Slack bot. Note: unlike every other v2 collection this response is **not** the standard `{ object: \"list\", data, has_more, next_cursor }` envelope — Maple walks Slack's `conversations.list` cursors server-side and returns the set in one response, so there is no cursor for a client to follow. The walk is page-capped; `truncated` reports whether it hit that cap.","examples":[{"object":"slack_integration.channel_list","channels":[{"id":"C0789CHAN","name":"incidents","is_private":false,"is_member":true}],"truncated":false}]},"PlanetScaleMetricsAuth":{"type":"string","enum":["oauth","service_token","missing"],"title":"PlanetScale metrics auth","description":"How branch-metrics scraping authenticates. `service_token` is the normal state: PlanetScale's metrics endpoints only document service-token auth. `oauth` applies only where the OAuth bearer probe succeeded. `missing` means scraping is paused until a service token with the `read_metrics_endpoints` permission is attached via `POST /v2/integrations/planetscale/metrics_token` — inventory, query insights, and webhooks keep working on the OAuth grant regardless.","examples":["service_token"]},"_maple_ScrapeTargetId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `scrp_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["scrp_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"PlanetScaleScrapeTarget":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ScrapeTargetId"},"object":{"type":"string","enum":["planetscale_integration.scrape_target"],"description":"The object type — always `\"planetscale_integration.scrape_target\"`.","examples":["planetscale_integration.scrape_target"]},"enabled":{"type":"boolean","description":"Whether the target is currently being scraped.","examples":[true]},"scrape_interval_seconds":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"include_branches":{"type":"array","items":{"type":"string"},"description":"Branch glob allowlist. Empty means every branch.","examples":[["main"]]},"exclude_branches":{"type":"array","items":{"type":"string"},"description":"Branch glob denylist, applied after `include_branches`.","examples":[["pr-*"]]},"last_scrape_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the last successful scrape completed, or `null` before the first one."},"last_scrape_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The error from the most recent failed scrape, or `null`.","examples":[null]}},"required":["id","object","enabled","scrape_interval_seconds","include_branches","exclude_branches","last_scrape_at","last_scrape_error"],"additionalProperties":false,"title":"PlanetScale scrape target","description":"The scrape target Maple provisioned for this connection. It is managed — it is hidden from the generic `/v2/scrape_targets` list and its branch filters are edited through `select_organization`.","examples":[{"id":"scrp_4CzLmR","object":"planetscale_integration.scrape_target","enabled":true,"scrape_interval_seconds":60,"include_branches":["main"],"exclude_branches":["pr-*"],"last_scrape_at":"2026-08-05T12:00:00.000Z","last_scrape_error":null}]},"PlanetScaleIntegration":{"type":"object","properties":{"object":{"type":"string","enum":["planetscale_integration"],"description":"The object type — always `\"planetscale_integration\"`.","examples":["planetscale_integration"]},"connected":{"type":"boolean","description":"Whether a PlanetScale organization is bound and the integration is live.","examples":[true]},"pending_org_selection":{"type":"boolean","description":"An OAuth grant is stored but no PlanetScale organization is bound yet — call `POST /v2/integrations/planetscale/select_organization`. Mutually exclusive with `connected`.","examples":[false]},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The PlanetScale organization slug the connection is bound to, or `null`.","examples":["acme"]},"connected_by_user_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_UserId_1"},{"type":"null"}],"description":"The Maple user who authorized the connection (a Clerk `user_…` ID), or `null`."},"detected_permissions":{"anyOf":[{"type":"object","additionalProperties":{"type":"boolean"}},{"type":"null"}],"description":"The PlanetScale API permissions probed when the organization was bound, keyed by permission name (e.g. `readMetricsEndpoints`). `null` before the first probe.","examples":[{"readMetricsEndpoints":true}]},"metrics_auth":{"$ref":"#/components/schemas/PlanetScaleMetricsAuth"},"scrape_target":{"anyOf":[{"$ref":"#/components/schemas/PlanetScaleScrapeTarget"},{"type":"null"}],"description":"The managed scrape target, or `null` before one is provisioned."},"last_inventory_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the database/branch inventory last refreshed, or `null` before the first refresh."},"last_inventory_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The error from the most recent failed inventory refresh, or `null`.","examples":[null]},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the OAuth grant was revoked on PlanetScale's side, or `null` while it is live. A non-null value means every OAuth-backed call will fail until the integration is reconnected."},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the current access token expires, or `null`. Maple refreshes well before this; it is informational."}},"required":["object","connected","pending_org_selection","organization","connected_by_user_id","detected_permissions","metrics_auth","scrape_target","last_inventory_at","last_inventory_error","revoked_at","expires_at"],"additionalProperties":false,"title":"PlanetScale integration status","description":"The PlanetScale connection state for the authenticated organization.","examples":[{"object":"planetscale_integration","connected":true,"pending_org_selection":false,"organization":"acme","connected_by_user_id":"user_2abcDEF","detected_permissions":{"readMetricsEndpoints":true},"metrics_auth":"service_token","scrape_target":{"id":"scrp_4CzLmR","object":"planetscale_integration.scrape_target","enabled":true,"scrape_interval_seconds":60,"include_branches":["main"],"exclude_branches":["pr-*"],"last_scrape_at":"2026-08-05T12:00:00.000Z","last_scrape_error":null},"last_inventory_at":"2026-08-05T12:00:00.000Z","last_inventory_error":null,"revoked_at":null,"expires_at":"2026-08-05T14:00:00.000Z"}]},"ScrapeTargetStoredConfigInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ScrapeTargetStoredConfigInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["scrape_target_stored_config_invalid"]},"title":{"type":"string","enum":["Saved scrape target is invalid"]},"message":{"type":"string","enum":["The saved scrape target configuration is invalid. Recreate the target."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reconnect"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Saved scrape target is invalid","description":"The @maple/http/errors/ScrapeTargetStoredConfigInvalidError failure. HTTP 502."},"PlanetScaleConnectRequest":{"type":"object","properties":{"return_to":{"type":"string","description":"Path in the Maple dashboard to send the user back to after the callback completes. Ignored for headless callers.","examples":["/integrations"]}},"additionalProperties":false,"title":"PlanetScale connect request","description":"Options for beginning a PlanetScale OAuth authorization.","examples":[{"return_to":"/integrations"}]},"PlanetScaleConnect":{"type":"object","properties":{"object":{"type":"string","enum":["planetscale_integration.connect"],"description":"The object type — always `\"planetscale_integration.connect\"`.","examples":["planetscale_integration.connect"]},"redirect_url":{"type":"string","description":"The PlanetScale authorize URL to send the user to. Opens PlanetScale's consent screen; on approval PlanetScale redirects back to Maple's callback.","examples":["https://app.planetscale.com/oauth/authorize?client_id=..."]},"state":{"type":"string","description":"The opaque OAuth state parameter embedded in `redirect_url`.","examples":["b4f1c0e2"]}},"required":["object","redirect_url","state"],"additionalProperties":false,"title":"PlanetScale connect response","description":"The PlanetScale OAuth authorize URL to begin a connection.","examples":[{"object":"planetscale_integration.connect","redirect_url":"https://app.planetscale.com/oauth/authorize?client_id=123&state=b4f1c0e2","state":"b4f1c0e2"}]},"PlanetScaleOrganization":{"type":"object","properties":{"id":{"type":"string","description":"PlanetScale's organization ID.","examples":["organization/abc123"]},"name":{"type":"string","description":"The organization slug, as used everywhere else in this API.","examples":["acme"]}},"required":["id","name"],"additionalProperties":false,"title":"PlanetScale organization","description":"One PlanetScale organization the stored OAuth grant can reach.","examples":[{"id":"organization/abc123","name":"acme"}]},"PlanetScaleOrganizationList":{"type":"object","properties":{"object":{"type":"string","enum":["planetscale_integration.organization_list"],"description":"The object type — always `\"planetscale_integration.organization_list\"`.","examples":["planetscale_integration.organization_list"]},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/PlanetScaleOrganization"},"description":"Every organization the grant can reach."}},"required":["object","organizations"],"additionalProperties":false,"title":"PlanetScale organization list","description":"Organizations the OAuth grant can access. Note: unlike most v2 collections this is **not** the standard `{ object: \"list\", data, has_more, next_cursor }` envelope — a grant reaches a handful of organizations and PlanetScale returns them in one unpaginated response, so there is no cursor for a client to follow.","examples":[{"object":"planetscale_integration.organization_list","organizations":[{"id":"organization/abc123","name":"acme"}]}]},"PlanetScaleSelectOrganizationRequest":{"type":"object","properties":{"organization":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The PlanetScale organization slug to bind the grant to.","examples":["acme"]}]},"include_branches":{"type":"array","items":{"type":"string"},"description":"Branch glob allowlist for the managed scrape target. Omit or pass an empty array to scrape every branch.","examples":[["main"]]},"exclude_branches":{"type":"array","items":{"type":"string"},"description":"Branch glob denylist for the managed scrape target, applied after the allowlist.","examples":[["pr-*"]]}},"required":["organization"],"additionalProperties":false,"title":"PlanetScale organization selection","description":"Binds the stored OAuth grant to one PlanetScale organization and provisions the managed scrape target. Re-submitting is an upsert — it is how you change organization or edit the branch filters.","examples":[{"organization":"acme","include_branches":["main"],"exclude_branches":["pr-*"]}]},"ScrapeTargetPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ScrapeTargetPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["scrape_targets_unavailable"]},"title":{"type":"string","enum":["Scrape targets are temporarily unavailable"]},"message":{"type":"string","enum":["Scrape targets are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Scrape targets are temporarily unavailable","description":"The @maple/http/errors/ScrapeTargetPersistenceError failure. HTTP 503."},"ScrapeTargetValidationError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ScrapeTargetValidationError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["scrape_target_invalid"]},"title":{"type":"string","enum":["Invalid scrape target"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid scrape target","description":"The @maple/http/errors/ScrapeTargetValidationError failure. HTTP 400."},"ScrapeTargetNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ScrapeTargetNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["scrape_target_not_found"]},"title":{"type":"string","enum":["Scrape target not found"]},"message":{"type":"string","enum":["No such scrape target."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Scrape target not found","description":"The @maple/http/errors/ScrapeTargetNotFoundError failure. HTTP 404."},"ScrapeTargetEncryptionError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ScrapeTargetEncryptionError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["scrape_target_encryption_failed"]},"title":{"type":"string","enum":["Scrape target credentials could not be saved"]},"message":{"type":"string","enum":["Maple could not securely save the scrape target credentials."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Scrape target credentials could not be saved","description":"The @maple/http/errors/ScrapeTargetEncryptionError failure. HTTP 500."},"PlanetScaleMetricsTokenRequest":{"type":"object","properties":{"token_id":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The PlanetScale service token ID.","examples":["abcdef123456"]}]},"token_secret":{"type":"string","allOf":[{"minLength":1,"description":"The service token secret. PlanetScale prints it once, prefixed `pscale_tkn_`.","examples":["pscale_tkn_example"]}]}},"required":["token_id","token_secret"],"additionalProperties":false,"title":"PlanetScale metrics token","description":"A PlanetScale service token carrying the single `read_metrics_endpoints` permission. Maple validates it against PlanetScale's metrics discovery endpoint before storing it, and uses it for nothing else.","examples":[{"token_id":"abcdef123456","token_secret":"pscale_tkn_example"}]},"PlanetScaleDisconnect":{"type":"object","properties":{"object":{"type":"string","enum":["planetscale_integration"],"description":"The object type — always `\"planetscale_integration\"`.","examples":["planetscale_integration"]},"connected":{"type":"boolean","enum":[false],"description":"Always `false` — the integration is no longer connected."}},"required":["object","connected"],"additionalProperties":false,"title":"PlanetScale disconnect response","description":"Confirmation that the PlanetScale connection was removed.","examples":[{"object":"planetscale_integration","connected":false}]},"PlanetScaleBranch":{"type":"object","properties":{"id":{"type":"string","description":"PlanetScale's branch ID.","examples":["branch/xyz789"]},"name":{"type":"string","description":"The branch name.","examples":["main"]},"production":{"type":"boolean","description":"Whether this is a production branch.","examples":[true]},"ready":{"type":"boolean","description":"Whether the branch has finished provisioning and can serve traffic.","examples":[true]}},"required":["id","name","production","ready"],"additionalProperties":false,"title":"PlanetScale branch","description":"One branch of a PlanetScale database.","examples":[{"id":"branch/xyz789","name":"main","production":true,"ready":true}]},"PlanetScaleDatabase":{"type":"object","properties":{"id":{"type":"string","description":"PlanetScale's database ID.","examples":["database/def456"]},"object":{"type":"string","enum":["planetscale_integration.database"],"description":"The object type — always `\"planetscale_integration.database\"`.","examples":["planetscale_integration.database"]},"name":{"type":"string","description":"The database name.","examples":["acme-prod"]},"kind":{"type":"string","description":"The product kind — `mysql` (Vitess) or `postgresql`.","examples":["postgresql"]},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PlanetScale's lifecycle state for the database, or `null`.","examples":["ready"]},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The region slug, or `null`.","examples":["us-east"]},"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The billing plan, or `null`.","examples":["scaler_pro"]},"branches":{"type":"array","items":{"$ref":"#/components/schemas/PlanetScaleBranch"},"description":"The database's branches, as of the last inventory refresh."}},"required":["id","object","name","kind","state","region","plan","branches"],"additionalProperties":false,"title":"PlanetScale database","description":"One database from the organization's polled PlanetScale inventory.","examples":[{"id":"database/def456","object":"planetscale_integration.database","name":"acme-prod","kind":"postgresql","state":"ready","region":"us-east","plan":"scaler_pro","branches":[{"id":"branch/xyz789","name":"main","production":true,"ready":true}]}]},"PlanetScaleDatabaseList":{"type":"object","properties":{"object":{"type":"string","enum":["planetscale_integration.database_list"],"description":"The object type — always `\"planetscale_integration.database_list\"`.","examples":["planetscale_integration.database_list"]},"databases":{"type":"array","items":{"$ref":"#/components/schemas/PlanetScaleDatabase"},"description":"Every database in the bound organization, as of the last inventory refresh."},"last_inventory_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the inventory last refreshed, or `null` before the first refresh. This response is served from Maple's polled copy, not live from PlanetScale, so this is how stale it may be."}},"required":["object","databases","last_inventory_at"],"additionalProperties":false,"title":"PlanetScale database list","description":"The polled database inventory. Note: unlike most v2 collections this is **not** the standard `{ object: \"list\", data, has_more, next_cursor }` envelope — the inventory is a bounded snapshot returned whole, and the envelope has no place for `last_inventory_at`, which callers need to judge staleness.","examples":[{"object":"planetscale_integration.database_list","databases":[{"id":"database/def456","object":"planetscale_integration.database","name":"acme-prod","kind":"postgresql","state":"ready","region":"us-east","plan":"scaler_pro","branches":[{"id":"branch/xyz789","name":"main","production":true,"ready":true}]}],"last_inventory_at":"2026-08-05T12:00:00.000Z"}]},"PlanetScaleWebhookConfig":{"type":"object","properties":{"object":{"type":"string","enum":["planetscale_integration.webhook_config"],"description":"The object type — always `\"planetscale_integration.webhook_config\"`.","examples":["planetscale_integration.webhook_config"]},"configured":{"type":"boolean","description":"Whether Maple has received at least one verified delivery on this endpoint.","examples":[true]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The absolute webhook URL to register in PlanetScale's per-database webhook settings, or `null` when the integration is not connected. This is a provider-facing receiver, so it lives under `/api/…` rather than `/v2/…` — the path is stable and must be registered verbatim.","examples":["https://api.maple.dev/api/integrations/planetscale/webhook/abc123"]},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The HMAC secret Maple verifies deliveries with — paste it into PlanetScale alongside the URL. `null` when not connected.","examples":["whsec_example"]}},"required":["object","configured","url","secret"],"additionalProperties":false,"title":"PlanetScale webhook configuration","description":"The material needed to register Maple as a webhook receiver in PlanetScale. Admin-only: the response carries the signing secret.","examples":[{"object":"planetscale_integration.webhook_config","configured":true,"url":"https://api.maple.dev/api/integrations/planetscale/webhook/abc123","secret":"whsec_example"}]},"PlanetScaleQueryInsightsRequest":{"type":"object","properties":{"database":{"type":"string","allOf":[{"minLength":1,"description":"The database to inspect.","examples":["acme-prod"]}]},"branch":{"type":"string","description":"The branch to inspect. Defaults to the database's production branch.","examples":["main"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"limit":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]}},"required":["database","start_time","end_time"],"additionalProperties":false,"title":"PlanetScale query insights request","description":"A top-queries lookup for one database branch. The window is aligned to the minute server-side so repeated panel refreshes share a cache entry.","examples":[{"database":"acme-prod","branch":"main","start_time":"2026-08-05T11:00:00.000Z","end_time":"2026-08-05T12:00:00.000Z","limit":10}]},"PlanetScaleQueryInsight":{"type":"object","properties":{"object":{"type":"string","enum":["planetscale_integration.query_insight"],"description":"The object type — always `\"planetscale_integration.query_insight\"`.","examples":["planetscale_integration.query_insight"]},"fingerprint":{"type":"string","description":"PlanetScale's stable identity for the normalized query.","examples":["a1b2c3d4"]},"normalized_sql":{"type":"string","description":"The query with literals replaced by placeholders.","examples":["SELECT * FROM users WHERE id = ?"]},"statement_type":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"`SELECT`, `INSERT`, … or `null` when PlanetScale did not classify it.","examples":["SELECT"]},"query_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"error_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"total_duration_millis":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"time_per_query_millis":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"p50_latency_millis":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"p99_latency_millis":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"rows_read_per_query":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"rows_returned_per_query":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"last_run_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the query last ran, or `null` when PlanetScale reported none."}},"required":["object","fingerprint","normalized_sql","statement_type","query_count","error_count","total_duration_millis","time_per_query_millis","p50_latency_millis","p99_latency_millis","rows_read_per_query","rows_returned_per_query","last_run_at"],"additionalProperties":false,"title":"PlanetScale query insight","description":"Aggregate statistics for one normalized query over the requested window.","examples":[{"object":"planetscale_integration.query_insight","fingerprint":"a1b2c3d4","normalized_sql":"SELECT * FROM users WHERE id = ?","statement_type":"SELECT","query_count":12045,"error_count":3,"total_duration_millis":48120.5,"time_per_query_millis":4,"p50_latency_millis":2.1,"p99_latency_millis":18.4,"rows_read_per_query":120,"rows_returned_per_query":1,"last_run_at":"2026-08-05T11:59:00.000Z"}]},"PlanetScaleQueryInsightList":{"type":"object","properties":{"object":{"type":"string","enum":["planetscale_integration.query_insight_list"],"description":"The object type — always `\"planetscale_integration.query_insight_list\"`.","examples":["planetscale_integration.query_insight_list"]},"branch":{"type":"string","description":"The branch actually queried — resolved server-side when the request omitted it.","examples":["main"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PlanetScaleQueryInsight"},"description":"The top queries, ordered by total time descending. Empty when `unavailable_reason` is set."},"unavailable_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why PlanetScale could not serve the lookup (service token missing `read_database`, unknown branch, …), or `null` on success. Set instead of failing the request so a dashboard can render the reason inline next to an otherwise working page.","examples":[null]}},"required":["object","branch","data","unavailable_reason"],"additionalProperties":false,"title":"PlanetScale query insight list","description":"Top queries for one branch. Note: **not** the standard list envelope — the response is a fixed top-N with no cursor, and it carries `branch` and `unavailable_reason` alongside the rows.","examples":[{"object":"planetscale_integration.query_insight_list","branch":"main","data":[],"unavailable_reason":null}]},"TimeRangeInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/TimeRangeInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["invalid_time_range"]},"title":{"type":"string","enum":["Invalid time range"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid time range","description":"The @maple/http/v2/TimeRangeInvalidError failure. HTTP 400."},"PlanetScaleEventCategory":{"type":"string","enum":["deploy_request","branch","database","cluster","keyspace"],"title":"PlanetScale event category","description":"The kind of PlanetScale lifecycle object an event concerns.","examples":["deploy_request"]},"PlanetScaleEventsRequest":{"type":"object","properties":{"database":{"type":"string","description":"Restrict to one database. Omit for the organization-wide feed.","examples":["acme-prod"]},"branch":{"type":"string","description":"Restrict branch-scoped rows to one branch. Deploy requests span two branches and carry no single one, so they are never filtered out by this.","examples":["main"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/PlanetScaleEventCategory"},"description":"Restrict to these categories. Omit for all of them.","examples":[["deploy_request"]]},"limit":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"cursor":{"type":"string","description":"A `next_cursor` from the previous page."}},"required":["start_time","end_time"],"additionalProperties":false,"title":"PlanetScale events request","description":"A window of the PlanetScale lifecycle timeline: deploy-request transitions and branch state changes.","examples":[{"database":"acme-prod","start_time":"2026-08-05T00:00:00.000Z","end_time":"2026-08-05T12:00:00.000Z","categories":["deploy_request"],"limit":100}]},"PlanetScaleEvent":{"type":"object","properties":{"id":{"type":"string","description":"Maple's identity for the event.","examples":["evt_ps_123"]},"object":{"type":"string","enum":["planetscale_integration.event"],"description":"The object type — always `\"planetscale_integration.event\"`.","examples":["planetscale_integration.event"]},"database_name":{"type":"string","description":"The database the event belongs to.","examples":["acme-prod"]},"branch_name":{"type":"string","description":"The branch, or `\"\"` for events that belong to no single branch (deploy requests).","examples":["main"]},"category":{"type":"string","description":"One of the `PlanetScaleEventCategory` values in practice, but typed as a plain string on the way out: the classifier is deliberately forward-compatible, so a category added by a newer poller renders as an unknown row rather than failing the whole response's decode.","examples":["deploy_request"]},"event_type":{"type":"string","description":"The raw PlanetScale event string.","examples":["deploy_request.schema_applied"]},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The resulting state, or `null`.","examples":["complete"]},"external_id":{"type":"string","description":"The deploy-request number or branch ID; `\"\"` when the event has none.","examples":["42"]},"title":{"type":"string","description":"A human-readable summary of the event.","examples":["Deploy request #42 applied"]},"source":{"type":"string","description":"`webhook` for live deliveries, `backfill` for REST history.","examples":["webhook"]},"actor_login":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The PlanetScale user who triggered it, or `null`.","examples":["octocat"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A deep link into PlanetScale, or `null`.","examples":["https://app.planetscale.com/acme/acme-prod/deploy-requests/42"]},"occurred_at":{"type":"string"}},"required":["id","object","database_name","branch_name","category","event_type","state","external_id","title","source","actor_login","url","occurred_at"],"additionalProperties":false,"title":"PlanetScale event","description":"One entry in the PlanetScale lifecycle timeline.","examples":[{"id":"evt_ps_123","object":"planetscale_integration.event","database_name":"acme-prod","branch_name":"main","category":"deploy_request","event_type":"deploy_request.schema_applied","state":"complete","external_id":"42","title":"Deploy request #42 applied","source":"webhook","actor_login":"octocat","url":"https://app.planetscale.com/acme/acme-prod/deploy-requests/42","occurred_at":"2026-08-05T11:30:00.000Z"}]},"PlanetScaleEventList":{"type":"object","properties":{"object":{"type":"string","enum":["planetscale_integration.event_list"],"description":"The object type — always `\"planetscale_integration.event_list\"`.","examples":["planetscale_integration.event_list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PlanetScaleEvent"},"description":"The events, newest first."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as `cursor` to fetch the next page, or `null` when this is the last one.","examples":[null]}},"required":["object","data","next_cursor"],"additionalProperties":false,"title":"PlanetScale event list","description":"A page of the PlanetScale lifecycle timeline. Keyset-paginated with `next_cursor`; it omits `has_more` (a null cursor says the same thing) and so is not the standard list envelope.","examples":[{"object":"planetscale_integration.event_list","data":[],"next_cursor":null}]},"_maple_WorkflowState":{"type":"string","enum":["triage","regressed","todo","in_progress","in_review","done","cancelled","wontfix"],"title":"Workflow State"},"_maple_IssueSeverity":{"type":"string","enum":["critical","high","medium","low"],"title":"Issue Severity"},"_maple_IssueKind":{"type":"string","enum":["error","alert","integration"],"title":"Issue Kind"},"_maple_IssueSeveritySource":{"type":"string","enum":["detector","ai","manual"],"title":"Issue Severity Source"},"Union_26":{"anyOf":[{"type":"object"},{"type":"null"}]},"_maple_ActorId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `actor_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["actor_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_ActorType":{"type":"string","enum":["user","agent"],"title":"Actor Type"},"ErrorIssueActor":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ActorId"},"type":{"$ref":"#/components/schemas/_maple_ActorType"},"user_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_UserId_1"},{"type":"null"}]},"agent_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"capabilities":{"type":"array","items":{"type":"string"}},"last_active_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","type","user_id","agent_name","model","capabilities","last_active_at"],"additionalProperties":false,"title":"Error issue actor","description":"A user or agent assigned to, or currently holding the lease for, an error issue."},"Union_27":{"anyOf":[{"$ref":"#/components/schemas/ErrorIssueActor"},{"type":"null"}]},"Union_28":{"anyOf":[{"$ref":"#/components/schemas/ErrorIssueActor"},{"type":"null"}]},"Arrays_15":{"type":"array","items":{"type":"string"}},"ErrorIssue":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"object":{"type":"string","enum":["error_issue"]},"kind":{"$ref":"#/components/schemas/_maple_IssueKind"},"fingerprint_hash":{"type":"string"},"service_name":{"type":"string"},"exception_type":{"type":"string"},"exception_message":{"type":"string"},"error_label":{"type":"string"},"top_frame":{"type":"string"},"workflow_state":{"$ref":"#/components/schemas/_maple_WorkflowState"},"priority":{"$ref":"#/components/schemas/Union_12"},"severity":{"anyOf":[{"$ref":"#/components/schemas/_maple_IssueSeverity"},{"type":"null"}]},"severity_source":{"anyOf":[{"$ref":"#/components/schemas/_maple_IssueSeveritySource"},{"type":"null"}]},"source_ref":{"$ref":"#/components/schemas/Union_26"},"assigned_actor":{"$ref":"#/components/schemas/Union_27"},"lease_holder":{"$ref":"#/components/schemas/Union_28"},"lease_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_seen_at":{"type":"string"},"last_seen_at":{"type":"string"},"occurrence_count":{"$ref":"#/components/schemas/Union_12"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_regressed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"regression_count":{"$ref":"#/components/schemas/Union_12"},"resolved_versions":{"$ref":"#/components/schemas/Arrays_15"},"snooze_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_open_incident":{"type":"boolean"}},"required":["id","object","kind","fingerprint_hash","service_name","exception_type","exception_message","error_label","top_frame","workflow_state","priority","severity","severity_source","source_ref","assigned_actor","lease_holder","lease_expires_at","claimed_at","notes","first_seen_at","last_seen_at","occurrence_count","resolved_at","last_resolved_at","last_regressed_at","regression_count","resolved_versions","snooze_until","archived_at","has_open_incident"],"additionalProperties":false,"title":"Error issue","description":"A deduplicated error, alert, or integration issue tracked through Maple's workflow."},"ErrorIssueList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ErrorIssue"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Error issue list","description":"Cursor-paginated list envelope wrapping a page of objects."},"CursorInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/CursorInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["cursor_invalid"]},"title":{"type":"string","enum":["Invalid pagination cursor"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid pagination cursor","description":"The @maple/http/v2/CursorInvalidError failure. HTTP 400."},"CursorSortMismatchError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/CursorSortMismatchError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["cursor_sort_mismatch"]},"title":{"type":"string","enum":["Cursor does not match sort"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Cursor does not match sort","description":"The @maple/http/v2/CursorSortMismatchError failure. HTTP 400."},"ErrorPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ErrorPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["error_issues_unavailable"]},"title":{"type":"string","enum":["Error issues are temporarily unavailable"]},"message":{"type":"string","enum":["Error issues are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Error issues are temporarily unavailable","description":"The @maple/http/errors/ErrorPersistenceError failure. HTTP 503."},"ErrorIssueServiceCount":{"type":"object","properties":{"service_name":{"type":"string"},"open_count":{"$ref":"#/components/schemas/Union_12"}},"required":["service_name","open_count"],"additionalProperties":false,"title":"Error issue service count","description":"Number of open (actionable-state) error issues for one service."},"ErrorIssueServiceCountList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ErrorIssueServiceCount"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Error issue service count list","description":"Cursor-paginated list envelope wrapping a page of objects."},"ErrorIssueTimeseriesPoint":{"type":"object","properties":{"bucket":{"type":"string"},"count":{"$ref":"#/components/schemas/Union_12"}},"required":["bucket","count"],"additionalProperties":false},"_maple_TraceId":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"Trace ID"}]},"_maple_SpanId":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"Span ID"}]},"ErrorIssueSampleTrace":{"type":"object","properties":{"trace_id":{"$ref":"#/components/schemas/_maple_TraceId"},"span_id":{"$ref":"#/components/schemas/_maple_SpanId"},"service_name":{"type":"string"},"timestamp":{"type":"string"},"exception_message":{"type":"string"},"duration_micros":{"$ref":"#/components/schemas/Union_12"}},"required":["trace_id","span_id","service_name","timestamp","exception_message","duration_micros"],"additionalProperties":false},"_maple_ErrorIncidentId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `einc_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["einc_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"ErrorIncident":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ErrorIncidentId"},"object":{"type":"string","enum":["error_incident"]},"issue_id":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"status":{"type":"string","enum":["open","resolved"]},"reason":{"type":"string","enum":["first_seen","regression","manual"]},"first_triggered_at":{"type":"string"},"last_triggered_at":{"type":"string"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurrence_count":{"$ref":"#/components/schemas/Union_12"}},"required":["id","object","issue_id","status","reason","first_triggered_at","last_triggered_at","resolved_at","occurrence_count"],"additionalProperties":false,"title":"Error incident"},"ErrorIssueDetail":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"object":{"type":"string","enum":["error_issue"]},"kind":{"$ref":"#/components/schemas/_maple_IssueKind"},"fingerprint_hash":{"type":"string"},"service_name":{"type":"string"},"exception_type":{"type":"string"},"exception_message":{"type":"string"},"error_label":{"type":"string"},"top_frame":{"type":"string"},"workflow_state":{"$ref":"#/components/schemas/_maple_WorkflowState"},"priority":{"$ref":"#/components/schemas/Union_12"},"severity":{"anyOf":[{"$ref":"#/components/schemas/_maple_IssueSeverity"},{"type":"null"}]},"severity_source":{"anyOf":[{"$ref":"#/components/schemas/_maple_IssueSeveritySource"},{"type":"null"}]},"source_ref":{"$ref":"#/components/schemas/Union_26"},"assigned_actor":{"$ref":"#/components/schemas/Union_27"},"lease_holder":{"$ref":"#/components/schemas/Union_28"},"lease_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"claimed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_seen_at":{"type":"string"},"last_seen_at":{"type":"string"},"occurrence_count":{"$ref":"#/components/schemas/Union_12"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_regressed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"regression_count":{"$ref":"#/components/schemas/Union_12"},"resolved_versions":{"$ref":"#/components/schemas/Arrays_15"},"snooze_until":{"anyOf":[{"type":"string"},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_open_incident":{"type":"boolean"},"timeseries":{"type":"array","items":{"$ref":"#/components/schemas/ErrorIssueTimeseriesPoint"}},"sample_traces":{"type":"array","items":{"$ref":"#/components/schemas/ErrorIssueSampleTrace"}},"incidents":{"type":"array","items":{"$ref":"#/components/schemas/ErrorIncident"}}},"required":["id","object","kind","fingerprint_hash","service_name","exception_type","exception_message","error_label","top_frame","workflow_state","priority","severity","severity_source","source_ref","assigned_actor","lease_holder","lease_expires_at","claimed_at","notes","first_seen_at","last_seen_at","occurrence_count","resolved_at","last_resolved_at","last_regressed_at","regression_count","resolved_versions","snooze_until","archived_at","has_open_incident","timeseries","sample_traces","incidents"],"additionalProperties":false,"title":"Error issue detail","description":"The issue resource with its requested timeseries window, sample traces, and incidents."},"ErrorIssueNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ErrorIssueNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["error_issue_not_found"]},"title":{"type":"string","enum":["Error issue not found"]},"message":{"type":"string","enum":["No such error issue."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Error issue not found","description":"The @maple/http/errors/ErrorIssueNotFoundError failure. HTTP 404."},"_maple_IngestAttributeMappingId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `amap_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["amap_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_IngestMappingSourceContext":{"type":"string","enum":["span","resource"],"title":"Ingest Mapping Source Context","description":"Where the source attribute lives: `span` (span attributes) or `resource` (resource attributes).","examples":["resource"]},"_maple_IngestMappingOperation":{"type":"string","enum":["move","copy"],"title":"Ingest Mapping Operation","description":"`move` renames the attribute (removes the source key); `copy` duplicates it under the target key.","examples":["copy"]},"AttributeMapping":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_IngestAttributeMappingId"},"object":{"type":"string","enum":["attribute_mapping"],"description":"The object type — always `\"attribute_mapping\"`.","examples":["attribute_mapping"]},"name":{"type":"string","description":"Human-readable label for the mapping, shown in the dashboard.","examples":["Promote team label"]},"source_context":{"$ref":"#/components/schemas/_maple_IngestMappingSourceContext"},"source_key":{"type":"string","description":"The attribute key to read from incoming telemetry.","examples":["labels.team"]},"target_key":{"type":"string","description":"The attribute key to write the value to.","examples":["team"]},"operation":{"$ref":"#/components/schemas/_maple_IngestMappingOperation"},"enabled":{"type":"boolean","description":"Whether the mapping is applied at ingest time. Disabled mappings are skipped.","examples":[true]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","name","source_context","source_key","target_key","operation","enabled","created_at","updated_at"],"additionalProperties":false,"title":"Attribute Mapping","description":"An ingest-time attribute rewrite rule: when telemetry arrives, the value at `source_key` (in the span or resource context) is moved or copied to `target_key`. Useful for normalizing attribute names across services without redeploying them.","examples":[{"id":"amap_YofPTrK9782DWwcnXhpcCw","object":"attribute_mapping","name":"Promote team label","source_context":"resource","source_key":"labels.team","target_key":"team","operation":"copy","enabled":true,"created_at":"2026-07-01T12:00:00.000Z","updated_at":"2026-07-15T09:12:00.000Z"}]},"AttributeMappingList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AttributeMapping"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Attribute mapping list","description":"A cursor-paginated page of attribute mappings."},"IngestAttributeMappingPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IngestAttributeMappingPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["attribute_mappings_unavailable"]},"title":{"type":"string","enum":["Attribute mappings are temporarily unavailable"]},"message":{"type":"string","enum":["Attribute mappings are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Attribute mappings are temporarily unavailable","description":"The @maple/http/errors/IngestAttributeMappingPersistenceError failure. HTTP 503."},"AttributeMappingCreateParams":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable label for the mapping. Required, non-empty.","examples":["Promote team label"]}]},"source_context":{"$ref":"#/components/schemas/_maple_IngestMappingSourceContext"},"source_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The attribute key to read from incoming telemetry. Required, non-empty.","examples":["labels.team"]}]},"target_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"The attribute key to write the value to. Required, non-empty.","examples":["team"]}]},"operation":{"$ref":"#/components/schemas/_maple_IngestMappingOperation"},"enabled":{"type":"boolean","description":"Whether the mapping starts enabled. Defaults to `true`.","examples":[true]}},"required":["name","source_context","source_key","target_key","operation"],"additionalProperties":false,"title":"Attribute mapping create parameters","description":"Request body for creating an attribute mapping.","examples":[{"name":"Promote team label","source_context":"resource","source_key":"labels.team","target_key":"team","operation":"copy","enabled":true}]},"IngestAttributeMappingValidationError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IngestAttributeMappingValidationError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["attribute_mapping_invalid"]},"title":{"type":"string","enum":["Invalid attribute mapping"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid attribute mapping","description":"The @maple/http/errors/IngestAttributeMappingValidationError failure. HTTP 400."},"IngestAttributeMappingNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/IngestAttributeMappingNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["attribute_mapping_not_found"]},"title":{"type":"string","enum":["Attribute mapping not found"]},"message":{"type":"string","enum":["No such attribute mapping."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Attribute mapping not found","description":"The @maple/http/errors/IngestAttributeMappingNotFoundError failure. HTTP 404."},"AttributeMappingUpdateParams":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"source_context":{"$ref":"#/components/schemas/_maple_IngestMappingSourceContext"},"source_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"target_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"operation":{"$ref":"#/components/schemas/_maple_IngestMappingOperation"},"enabled":{"type":"boolean"}},"additionalProperties":false,"title":"Attribute mapping update parameters","description":"Request body for updating an attribute mapping. Omitted fields are left unchanged.","examples":[{"enabled":false}]},"AttributeMappingDeleteResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_IngestAttributeMappingId"},"object":{"type":"string","enum":["attribute_mapping"],"description":"The object type — always `\"attribute_mapping\"`."},"deleted":{"type":"boolean","enum":[true],"description":"Always `true` — the mapping no longer exists."}},"required":["id","object","deleted"],"additionalProperties":false,"title":"Attribute mapping delete response","description":"Confirmation that an attribute mapping was deleted.","examples":[{"id":"amap_YofPTrK9782DWwcnXhpcCw","object":"attribute_mapping","deleted":true}]},"_maple_ScrapeTargetType":{"type":"string","enum":["prometheus","planetscale"],"title":"Scrape Target Type","description":"What is being scraped: `prometheus` (a metrics endpoint you host) or `planetscale` (branch metrics discovered from a PlanetScale organization).","examples":["prometheus"]},"_maple_ScrapeIntervalSeconds":{"type":"integer","allOf":[{"minimum":5},{"maximum":300,"title":"Scrape Interval Seconds","description":"How often the target is scraped, in seconds."}]},"_maple_ScrapeAuthType":{"type":"string","enum":["none","bearer","basic","token","planetscale_oauth"],"title":"Scrape Auth Type","description":"How the scraper authenticates against the target endpoint.","examples":["none"]},"ScrapeTarget":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ScrapeTargetId"},"object":{"type":"string","enum":["scrape_target"],"description":"The object type — always `\"scrape_target\"`.","examples":["scrape_target"]},"name":{"type":"string","description":"Human-readable label for the target.","examples":["payments prometheus"]},"service_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Service name the scraped metrics are attributed to, or `null` to use the target name.","examples":["payments"]},"url":{"type":"string","description":"The endpoint being scraped. For `planetscale` targets this is derived server-side from the organization.","examples":["https://payments.internal:9090/metrics"]},"target_type":{"$ref":"#/components/schemas/_maple_ScrapeTargetType"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PlanetScale organization name; `null` for plain Prometheus targets."},"include_branches":{"type":"array","items":{"type":"string"},"description":"PlanetScale only — branch glob allowlist; only matching branches are scraped (empty = all branches)."},"exclude_branches":{"type":"array","items":{"type":"string"},"description":"PlanetScale only — branch glob denylist; matching branches are skipped (e.g. `pr-*`)."},"scrape_interval_seconds":{"$ref":"#/components/schemas/_maple_ScrapeIntervalSeconds"},"labels_json":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON object of extra labels attached to every scraped sample, or `null`."},"auth_type":{"$ref":"#/components/schemas/_maple_ScrapeAuthType"},"has_credentials":{"type":"boolean","description":"Whether credentials are stored for the target. Credentials are write-only — they are never returned by the API.","examples":[false]},"managed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Integration ownership marker (e.g. `planetscale:{connection}`) for targets managed by an integration, or `null` for user-created targets. Managed targets are edited through the owning integration."},"enabled":{"type":"boolean","description":"Whether the target is scraped on its schedule. Disabled targets are skipped.","examples":[true]},"last_scrape_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the target was last scraped, or `null` if never scraped."},"last_scrape_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The failure message from the most recent scrape, or `null` if it succeeded."},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","name","service_name","url","target_type","organization","include_branches","exclude_branches","scrape_interval_seconds","labels_json","auth_type","has_credentials","managed_by","enabled","last_scrape_at","last_scrape_error","created_at","updated_at"],"additionalProperties":false,"title":"Scrape Target","description":"A metrics endpoint Maple scrapes on a schedule — a Prometheus endpoint you host, or PlanetScale branch metrics discovered from an organization. Scraped samples flow into your metrics like any other telemetry. Credentials are write-only: responses carry `has_credentials` instead.","examples":[{"id":"scrp_YofPTrK9782DWwcnXhpcCw","object":"scrape_target","name":"payments prometheus","service_name":"payments","url":"https://payments.internal:9090/metrics","target_type":"prometheus","organization":null,"include_branches":[],"exclude_branches":[],"scrape_interval_seconds":60,"labels_json":null,"auth_type":"none","has_credentials":false,"managed_by":null,"enabled":true,"last_scrape_at":"2026-07-15T09:12:00.000Z","last_scrape_error":null,"created_at":"2026-07-01T12:00:00.000Z","updated_at":"2026-07-15T09:12:00.000Z"}]},"ScrapeTargetList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ScrapeTarget"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Scrape target list","description":"A cursor-paginated page of scrape targets."},"ScrapeTargetCreateParams":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","description":"Human-readable label for the target. Required, non-empty.","examples":["payments prometheus"]}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The metrics endpoint to scrape. Required for `prometheus` targets; rejected for `planetscale` (derived server-side).","examples":["https://payments.internal:9090/metrics"]},"target_type":{"$ref":"#/components/schemas/_maple_ScrapeTargetType"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PlanetScale organization name. Required for `planetscale` targets."},"include_branches":{"type":"array","items":{"type":"string"},"description":"PlanetScale only — branch glob allowlist (omit or empty = scrape all branches)."},"exclude_branches":{"type":"array","items":{"type":"string"},"description":"PlanetScale only — branch glob denylist (e.g. `pr-*` to skip PR previews)."},"scrape_interval_seconds":{"$ref":"#/components/schemas/_maple_ScrapeIntervalSeconds"},"labels_json":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON object of extra labels attached to every scraped sample."},"auth_type":{"$ref":"#/components/schemas/_maple_ScrapeAuthType"},"service_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Service name to attribute the scraped metrics to."},"auth_credentials":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Credentials for the target endpoint, matching `auth_type`. Write-only — never returned."},"enabled":{"type":"boolean","description":"Whether the target starts enabled. Defaults to `true`."}},"required":["name"],"additionalProperties":false,"title":"Scrape target create parameters","description":"Request body for creating a scrape target.","examples":[{"name":"payments prometheus","url":"https://payments.internal:9090/metrics","target_type":"prometheus","scrape_interval_seconds":60,"auth_type":"none"}]},"ScrapeTargetUpdateParams":{"type":"object","properties":{"name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"url":{"type":"string"},"organization":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PlanetScale targets only — updates the organization and re-derives the scrape URL."},"include_branches":{"type":"array","items":{"type":"string"},"description":"PlanetScale only — branch glob allowlist (empty array clears it; omit = unchanged)."},"exclude_branches":{"type":"array","items":{"type":"string"},"description":"PlanetScale only — branch glob denylist (empty array clears it; omit = unchanged)."},"scrape_interval_seconds":{"$ref":"#/components/schemas/_maple_ScrapeIntervalSeconds"},"labels_json":{"anyOf":[{"type":"string"},{"type":"null"}]},"auth_type":{"$ref":"#/components/schemas/_maple_ScrapeAuthType"},"service_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"auth_credentials":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"New credentials for the target endpoint. Write-only — never returned."},"enabled":{"type":"boolean"}},"additionalProperties":false,"title":"Scrape target update parameters","description":"Request body for updating a scrape target. Omitted fields are left unchanged.","examples":[{"enabled":false}]},"ScrapeTargetDeleteResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ScrapeTargetId"},"object":{"type":"string","enum":["scrape_target"],"description":"The object type — always `\"scrape_target\"`."},"deleted":{"type":"boolean","enum":[true],"description":"Always `true` — the target no longer exists."}},"required":["id","object","deleted"],"additionalProperties":false,"title":"Scrape target delete response","description":"Confirmation that a scrape target was deleted.","examples":[{"id":"scrp_YofPTrK9782DWwcnXhpcCw","object":"scrape_target","deleted":true}]},"ScrapeTargetProbeResult":{"type":"object","properties":{"object":{"type":"string","enum":["scrape_target.probe_result"],"description":"The object type — always `\"scrape_target.probe_result\"`."},"success":{"type":"boolean","description":"Whether the probe scrape succeeded.","examples":[true]},"last_scrape_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the probe ran, or `null` if it could not be attempted."},"last_scrape_error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The probe failure message, or `null` on success."}},"required":["object","success","last_scrape_at","last_scrape_error"],"additionalProperties":false,"title":"Scrape target probe result","description":"The outcome of an on-demand probe scrape.","examples":[{"object":"scrape_target.probe_result","success":true,"last_scrape_at":"2026-07-15T09:12:00.000Z","last_scrape_error":null}]},"ScrapeTargetCheck":{"type":"object","properties":{"object":{"type":"string","enum":["scrape_target.check"],"description":"The object type — always `\"scrape_target.check\"`."},"timestamp":{"type":"string"},"success":{"type":"boolean","description":"Whether the scrape succeeded.","examples":[true]},"sub_target_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sub-target discriminator (e.g. the PlanetScale branch); `null` for plain targets."},"duration_seconds":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"How long the scrape took, in seconds, when recorded.","examples":[0.42]},"samples_scraped":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Number of samples fetched from the endpoint, when recorded."},"samples_post_metric_relabeling":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Number of samples remaining after metric relabeling, when recorded."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The scrape failure message, or `null` on success."}},"required":["object","timestamp","success","sub_target_key","duration_seconds","samples_scraped","samples_post_metric_relabeling","message"],"additionalProperties":false,"title":"Scrape target check","description":"One scheduled-scrape attempt against a target, as reported by the scraper.","examples":[{"object":"scrape_target.check","timestamp":"2026-07-15T09:12:00.000Z","success":true,"sub_target_key":null,"duration_seconds":0.42,"samples_scraped":1250,"samples_post_metric_relabeling":1250,"message":null}]},"ScrapeTargetCheckList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ScrapeTargetCheck"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Scrape target check list","description":"A cursor-paginated page of scrape checks, newest first."},"_maple_RecommendationIssueId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `rec_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["rec_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"Recommendation":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_RecommendationIssueId"},"object":{"type":"string","enum":["recommendation"],"description":"The object type — always `\"recommendation\"`.","examples":["recommendation"]},"number":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"recommendation_key":{"type":"string","description":"Stable key identifying the recommendation across reconciliation runs.","examples":["rename:http.status_code"]},"kind":{"type":"string","enum":["rename","double-emission","naming"],"description":"What kind of instrumentation issue was detected: `rename` (a non-canonical attribute name), `double-emission` (the same signal emitted twice), or `naming` (a convention violation).","examples":["rename"]},"source_key":{"type":"string","description":"The attribute or signal name the recommendation is about, as observed in your telemetry.","examples":["http.status_code"]},"canonical_key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The canonical (recommended) name to migrate to, or `null` when not applicable.","examples":["http.response.status_code"]},"status":{"type":"string","enum":["open","dismissed","applied","resolved"],"description":"Lifecycle state: `open`, `dismissed`, `applied`, or `resolved`.","examples":["open"]},"usage_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"opened_at":{"type":"string"},"updated_at":{"type":"string"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the recommendation was resolved, or `null` while it is still open or dismissed."}},"required":["id","object","number","recommendation_key","kind","source_key","canonical_key","status","usage_count","opened_at","updated_at","resolved_at"],"additionalProperties":false,"title":"Recommendation","description":"An instrumentation improvement detected from your live telemetry — for example a non-canonical attribute name that should be renamed. Recommendations are reconciled automatically against incoming data; dismiss ones you don't plan to act on.","examples":[{"id":"rec_YofPTrK9782DWwcnXhpcCw","object":"recommendation","number":7,"recommendation_key":"rename:http.status_code","kind":"rename","source_key":"http.status_code","canonical_key":"http.response.status_code","status":"open","usage_count":4182,"opened_at":"2026-07-01T12:00:00.000Z","updated_at":"2026-07-15T09:12:00.000Z","resolved_at":null}]},"RecommendationList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Recommendation"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Recommendation list","description":"A cursor-paginated page of recommendations."},"RecommendationIssuePersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/RecommendationIssuePersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["recommendations_unavailable"]},"title":{"type":"string","enum":["Recommendations are temporarily unavailable"]},"message":{"type":"string","enum":["Recommendations are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Recommendations are temporarily unavailable","description":"The @maple/http/errors/RecommendationIssuePersistenceError failure. HTTP 503."},"RecommendationIssueNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/RecommendationIssueNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["recommendation_not_found"]},"title":{"type":"string","enum":["Recommendation not found"]},"message":{"type":"string","enum":["No such recommendation."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Recommendation not found","description":"The @maple/http/errors/RecommendationIssueNotFoundError failure. HTTP 404."},"SetupAuditSummary":{"type":"object","properties":{"critical":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"warn":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"info":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"pass":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"skip":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]}},"required":["critical","warn","info","pass","skip"],"additionalProperties":false,"title":"Setup audit summary","description":"Check counts by outcome. Always consistent with `checks`."},"SetupAuditAffectedEntity":{"type":"object","properties":{"kind":{"type":"string","enum":["service","alert_rule","alert_destination","attribute_mapping","scrape_target","repository","integration","attribute_key"],"description":"What kind of object the finding points at.","examples":["alert_rule"]},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The object's public ID when it is addressable through this API, otherwise `null`. Treat it as an opaque string.","examples":["alrt_4CzLmR1pTx"]},"name":{"type":"string","description":"Display name of the affected object.","examples":["API error rate"]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Per-object evidence for the finding.","examples":["every selected destination is disabled or deleted"]}},"required":["kind","id","name","note"],"additionalProperties":false,"title":"Setup audit affected entity","description":"One object a setup audit finding points at."},"SetupAuditCheck":{"type":"object","properties":{"object":{"type":"string","enum":["setup_audit_check"],"description":"The object type — always `\"setup_audit_check\"`.","examples":["setup_audit_check"]},"id":{"type":"string","description":"Stable check identifier. Safe to key alerting or suppression on — ids are never reused for a different check.","examples":["CFG-ALERT-03"]},"category":{"type":"string","enum":["alerting","notifications","ingestion","attributes","traces","integrations","data_platform"],"description":"Which part of the setup the check covers.","examples":["alerting"]},"title":{"type":"string","description":"What the check asserts, phrased as the healthy state.","examples":["Every enabled alert rule routes somewhere"]},"severity":{"type":"string","enum":["critical","warn","info"],"description":"How bad a failure is: `critical` breaks a feature outright, `warn` degrades it, `info` is advisory. Fixed per check — it does not vary with the finding.","examples":["critical"]},"status":{"type":"string","enum":["pass","fail","skip"],"description":"`pass` when the assertion holds, `fail` when it does not, `skip` when the check needs telemetry that was unavailable.","examples":["fail"]},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One-sentence description of the finding, or `null` when the check passed.","examples":["2 enabled alert rules will evaluate and breach but deliver to nobody."]},"affected":{"type":"array","items":{"$ref":"#/components/schemas/SetupAuditAffectedEntity"},"description":"The objects this finding points at, capped at 20 entries."},"affected_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"fix_hint":{"type":"string","description":"How to resolve the finding.","examples":["Open each rule and pick at least one enabled destination under Notifications."]}},"required":["object","id","category","title","severity","status","detail","affected","affected_count","fix_hint"],"additionalProperties":false,"title":"Setup audit check","description":"The result of one setup audit check."},"SetupAudit":{"type":"object","properties":{"object":{"type":"string","enum":["setup_audit"],"description":"The object type — always `\"setup_audit\"`.","examples":["setup_audit"]},"generated_at":{"type":"string"},"data_status":{"type":"string","enum":["ok","no_data"],"description":"`no_data` means the organization has never received telemetry; `checks` is empty because connecting a service comes first.","examples":["ok"]},"telemetry_checks_available":{"type":"boolean","description":"Whether telemetry-backed checks could run. When `false`, those checks report `skip` and the configuration checks still apply.","examples":[true]},"summary":{"$ref":"#/components/schemas/SetupAuditSummary"},"checks":{"type":"array","items":{"$ref":"#/components/schemas/SetupAuditCheck"},"description":"Every check, passing ones included, so the summary is verifiable from the payload."},"open_recommendation_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]}},"required":["object","generated_at","data_status","telemetry_checks_available","summary","checks","open_recommendation_count"],"additionalProperties":false,"title":"Setup audit","description":"A point-in-time audit of the organization's Maple setup: whether alerts can actually deliver, whether every service is sending the signals you expect, whether attribute conventions hold, and whether traces arrive intact. Recomputed on every request.","examples":[{"object":"setup_audit","generated_at":"2026-07-27T12:00:00.000Z","data_status":"ok","telemetry_checks_available":true,"summary":{"critical":1,"warn":2,"info":0,"pass":15,"skip":0},"checks":[{"object":"setup_audit_check","id":"CFG-ALERT-03","category":"alerting","title":"Every enabled alert rule routes somewhere","severity":"critical","status":"fail","detail":"1 enabled alert rule will evaluate and breach but deliver to nobody.","affected":[{"kind":"alert_rule","id":"alrt_4CzLmR1pTx","name":"API error rate","note":"every selected destination is disabled or deleted"}],"affected_count":1,"fix_hint":"Open each rule and pick at least one enabled destination under Notifications."}],"open_recommendation_count":3}]},"SetupAuditUnavailableError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/SetupAuditUnavailableError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["setup_audit_unavailable"]},"title":{"type":"string","enum":["Setup audit is temporarily unavailable"]},"message":{"type":"string","enum":["The setup audit is temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Setup audit is temporarily unavailable","description":"The @maple/http/errors/SetupAuditUnavailableError failure. HTTP 503."},"_maple_InvestigationStatus":{"type":"string","enum":["investigating","diagnosed","inconclusive","resolved","failed"],"title":"Investigation Status","description":"Only return investigations in this status."},"_maple_AiTriageIncidentKind":{"type":"string","enum":["error","anomaly","alert"],"title":"AI Triage Incident Kind","description":"Only return investigations for this incident kind."},"_maple_AnomalyIncidentId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `anom_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["anom_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_InvestigationId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `inv_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["inv_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_InvestigationStatus_1":{"type":"string","enum":["investigating","diagnosed","inconclusive","resolved","failed"],"title":"Investigation Status","description":"Lifecycle state: `investigating` (diagnostic pass in progress), `diagnosed` (report attached), `resolved` (human-closed), or `failed`.","examples":["diagnosed"]},"Union_29":{"anyOf":[{"$ref":"#/components/schemas/_maple_ErrorIssueId"},{"type":"null"}],"description":"The linked `iss_…` error issue, or `null` when the incident has none."},"InvestigationIncidentSubject":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["incident"],"description":"Discriminator — always `\"incident\"` for an incident-anchored investigation."},"issue_id":{"$ref":"#/components/schemas/Union_29"},"incident_kind":{"type":"string","enum":["error"]},"incident_id":{"$ref":"#/components/schemas/_maple_ErrorIncidentId"}},"required":["type","issue_id","incident_kind","incident_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["incident"],"description":"Discriminator — always `\"incident\"` for an incident-anchored investigation."},"issue_id":{"$ref":"#/components/schemas/Union_29"},"incident_kind":{"type":"string","enum":["anomaly"]},"incident_id":{"$ref":"#/components/schemas/_maple_AnomalyIncidentId"}},"required":["type","issue_id","incident_kind","incident_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["incident"],"description":"Discriminator — always `\"incident\"` for an incident-anchored investigation."},"issue_id":{"$ref":"#/components/schemas/Union_29"},"incident_kind":{"type":"string","enum":["alert"]},"incident_id":{"$ref":"#/components/schemas/_maple_AlertIncidentId"}},"required":["type","issue_id","incident_kind","incident_id"],"additionalProperties":false}],"title":"Incident subject","description":"An investigation anchored to a typed incident. The public-ID prefix must match `incident_kind`: `einc_…`, `anom_…`, or `inc_…`."},"InvestigationFreeformSubject":{"type":"object","properties":{"type":{"type":"string","enum":["freeform"],"description":"Discriminator — always `\"freeform\"` for an ad-hoc investigation."},"title":{"type":"string","description":"Short human-readable title for the investigation."},"prompt":{"type":"string","description":"The question or task the investigation should answer."},"context_refs":{"type":"array","items":{"type":"object"},"description":"Opaque context hints (services, traces, dashboards, …) passed through verbatim for the agent to read as JSON."}},"required":["type","title","prompt","context_refs"],"additionalProperties":false,"title":"Freeform subject","description":"An ad-hoc investigation into a user-supplied question with optional context."},"InvestigationSubject":{"anyOf":[{"$ref":"#/components/schemas/InvestigationIncidentSubject"},{"$ref":"#/components/schemas/InvestigationFreeformSubject"}],"title":"Investigation subject","description":"What is being investigated — a typed incident or an ad-hoc question."},"Arrays_16":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"required":["label","value"],"additionalProperties":false}},"Arrays_17":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"}},"required":["label","url"],"additionalProperties":false}},"_maple_InvestigationConfidence":{"type":"string","enum":["high","medium","low"],"title":"Investigation Confidence"},"_maple_InvestigationSeededBy":{"type":"string","enum":["user","system"],"title":"Investigation Seeded By","description":"Who opened the investigation: `user` (attended) or `system` (incident-open trigger)."},"_maple_LensId":{"type":"string","allOf":[{"pattern":"^[a-z][a-z0-9_]{2,47}$","title":"Lens"}]},"_maple_LensRunStatus":{"type":"string","enum":["queued","checking","reported","no_finding"],"title":"Lens Run Status"},"_maple_LensVerdict":{"type":"string","enum":["pending","promoted","merged","ruled_out","rejected"],"title":"Lens Verdict"},"_maple_InvestigationFanoutState":{"type":"string","enum":["none","queued","running","validating","ranked","rejected_all","superseded"],"title":"Fan-out State"},"Investigation":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_InvestigationId"},"object":{"type":"string","enum":["investigation"],"description":"The object type — always `\"investigation\"`.","examples":["investigation"]},"status":{"$ref":"#/components/schemas/_maple_InvestigationStatus_1"},"subject":{"$ref":"#/components/schemas/InvestigationSubject"},"snapshot":{"type":"object","properties":{"title":{"type":"string"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"severity":{"anyOf":[{"$ref":"#/components/schemas/_maple_IssueSeverity"},{"type":"null"}]},"facts":{"$ref":"#/components/schemas/Arrays_16"},"references":{"$ref":"#/components/schemas/Arrays_17"},"incident_started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"incident_ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"fingerprint_hash":{"anyOf":[{"type":"string"},{"type":"null"}]},"exception_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"exception_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"top_frame":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_label":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurrence_count":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"service_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployment_env":{"anyOf":[{"type":"string"},{"type":"null"}]},"signal_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"observed_value":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"threshold_value":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]}},"required":["title","scope","status","severity","facts","references","incident_started_at","incident_ended_at"],"additionalProperties":false},"report":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"suspected_cause":{"type":"string"},"severity_assessment":{"$ref":"#/components/schemas/_maple_IssueSeverity"},"affected_scope":{"type":"string"},"evidence":{"type":"array","items":{"type":"object","properties":{"trace_ids":{"type":"array","items":{"$ref":"#/components/schemas/_maple_TraceId"}},"log_patterns":{"type":"array","items":{"type":"string"}},"related_services":{"type":"array","items":{"type":"string"}},"note":{"type":"string"}},"required":["trace_ids","log_patterns","related_services","note"],"additionalProperties":false}},"suggested_actions":{"type":"array","items":{"type":"string"}},"confidence":{"type":"string","enum":["high","medium","low"]},"ruled_out":{"type":"array","items":{"type":"string"}},"unchecked":{"type":"array","items":{"type":"string"}}},"required":["summary","suspected_cause","severity_assessment","affected_scope","evidence","suggested_actions","confidence"],"additionalProperties":false},{"type":"null"}],"description":"The latest structured AI diagnosis, or `null` until the first diagnosis lands. The report's internal fields are an evolving shape — treat it as a diagnosis blob, not a stability-committed schema."},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The model that produced the diagnosis, or `null`."},"severity":{"anyOf":[{"$ref":"#/components/schemas/_maple_IssueSeverity"},{"type":"null"}],"description":"Severity denormalized from the report for cheap list rendering, or `null`."},"confidence":{"anyOf":[{"$ref":"#/components/schemas/_maple_InvestigationConfidence"},{"type":"null"}],"description":"The diagnosis confidence (`high`/`medium`/`low`), or `null`."},"seeded_by":{"$ref":"#/components/schemas/_maple_InvestigationSeededBy"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/_maple_UserId_1"},{"type":"null"}],"description":"The `user_…` ID that opened the investigation, or `null` for system-seeded ones."},"input_tokens":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Input tokens consumed by the diagnostic pass, or `null`."},"output_tokens":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Output tokens produced by the diagnostic pass, or `null`."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The failure message if the diagnostic pass errored, or `null`."},"created_at":{"type":"string"},"started_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the current pass began, re-stamped on each restart. Use this rather than `created_at` to measure how long a run took."},"diagnosed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When a diagnosis was first attached, or `null`."},"updated_at":{"type":"string"},"lens_runs":{"type":"array","items":{"type":"object","properties":{"lens_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_LensId"},{"type":"string"}]},"status":{"anyOf":[{"$ref":"#/components/schemas/_maple_LensRunStatus"},{"type":"string"}]},"verdict":{"anyOf":[{"$ref":"#/components/schemas/_maple_LensVerdict"},{"type":"string"}]},"claim":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"progress_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"confidence":{"anyOf":[{"$ref":"#/components/schemas/_maple_InvestigationConfidence"},{"type":"null"}]},"tool_count":{"$ref":"#/components/schemas/Union_12"},"elapsed_seconds":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"lens_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"lens_question":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"deadline_hit":{"type":"boolean"}},"required":["lens_id","status","verdict","claim","reason","progress_note","confidence","tool_count","elapsed_seconds","lens_name","lens_question","priority","deadline_hit"],"additionalProperties":false},"description":"One entry per dispatched lens, in dispatch order, for investigations that fanned out; empty for single-pass runs. Use its emptiness — not `fanout.size` — to tell whether a run fanned out. The lens catalogue is an evolving shape: treat `lens_id` as an open string, not a stability-committed enum."},"validator":{"anyOf":[{"type":"object","properties":{"status":{"anyOf":[{"type":"string","enum":["blocked","ranked","rejected_all"]},{"type":"string"}]},"note":{"type":"string"},"elapsed_seconds":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]}},"required":["status","note","elapsed_seconds"],"additionalProperties":false},{"type":"null"}],"description":"The validator that ranked the lens candidates: `blocked` while lenses are still reporting, `ranked` once one was promoted, `rejected_all` when none held up. `null` for single-pass runs."},"fanout":{"type":"object","properties":{"state":{"anyOf":[{"$ref":"#/components/schemas/_maple_InvestigationFanoutState"},{"type":"string"}]},"size":{"$ref":"#/components/schemas/Union_12"}},"required":["state","size"],"additionalProperties":false,"description":"Fan-out bookkeeping. `state` is `none` for single-pass runs; `size` is how many lenses were dispatched."}},"required":["id","object","status","subject","snapshot","report","model","severity","confidence","seeded_by","created_by","input_tokens","output_tokens","error","created_at","started_at","diagnosed_at","updated_at","lens_runs","validator","fanout"],"additionalProperties":false,"title":"Investigation","description":"A durable investigation 'war-room' — an autonomous or human-opened diagnostic session over an incident or an ad-hoc question. Carries the structured AI diagnosis once it lands.","examples":[{"id":"inv_YofPTrK9782DWwcnXhpcCw","object":"investigation","status":"diagnosed","subject":{"type":"incident","incident_kind":"error","incident_id":"einc_YofPTrK9782DWwcnXhpcCw","issue_id":"iss_YofPTrK9782DWwcnXhpcCw"},"snapshot":{"title":"Checkout timeout rate increased","scope":"checkout-api","status":"open","severity":"high","facts":[],"references":[],"incident_started_at":"2026-07-15T09:04:00.000Z","incident_ended_at":null},"report":{"summary":"A deploy to checkout-api four minutes before the onset regressed the timeout budget.","suspected_cause":"Deploy 4f21a shortened the upstream timeout below the p99 of the call it guards.","severity_assessment":"high","affected_scope":"checkout-api","evidence":[],"suggested_actions":["Roll back deploy 4f21a."],"confidence":"high","ruled_out":["Downstream dependency: every callee stayed under 90ms in the window."],"unchecked":[]},"model":"claude-opus-4-8","severity":"high","confidence":"high","seeded_by":"system","created_by":null,"input_tokens":12000,"output_tokens":800,"error":null,"created_at":"2026-07-15T09:12:00.000Z","started_at":"2026-07-15T09:12:05.000Z","diagnosed_at":"2026-07-15T09:12:42.000Z","updated_at":"2026-07-15T09:12:42.000Z","lens_runs":[{"lens_id":"deploy_correlation","status":"reported","verdict":"promoted","claim":"A deploy to checkout-api landed four minutes before the onset.","reason":"Promoted — the only candidate that explains both the onset delay and the recovery.","progress_note":null,"confidence":"high","tool_count":4,"elapsed_seconds":12.6,"lens_name":"Checkout-api 14:02 rollout","lens_question":"Did the 14:02 checkout-api rollout introduce the timeout?","priority":1,"deadline_hit":false}],"validator":{"status":"ranked","note":"1 promoted · 0 merged · 0 ruled out","elapsed_seconds":8.2},"fanout":{"state":"ranked","size":1}}]},"InvestigationList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Investigation"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Investigation list","description":"A cursor-paginated page of investigations, newest first."},"InvestigationPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/investigations/InvestigationPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["investigations_unavailable"]},"title":{"type":"string","enum":["Investigations are temporarily unavailable"]},"message":{"type":"string","enum":["Investigations are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Investigations are temporarily unavailable","description":"The @maple/http/investigations/InvestigationPersistenceError failure. HTTP 503."},"InvestigationDataCorruptionError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/investigations/InvestigationDataCorruptionError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["investigation_data_corrupt"]},"title":{"type":"string","enum":["Stored investigation data is invalid"]},"message":{"type":"string","enum":["Maple could not decode the stored investigation."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Stored investigation data is invalid","description":"The @maple/http/investigations/InvestigationDataCorruptionError failure. HTTP 500."},"InvestigationNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/investigations/InvestigationNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["investigation_not_found"]},"title":{"type":"string","enum":["Investigation not found"]},"message":{"type":"string","enum":["No such investigation."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Investigation not found","description":"The @maple/http/investigations/InvestigationNotFoundError failure. HTTP 404."},"InvestigationCreateParams":{"type":"object","properties":{"subject":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["incident"],"description":"Discriminator — always `\"incident\"` for an incident-anchored investigation."},"issue_id":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"incident_kind":{"type":"string","enum":["error"]},"incident_id":{"$ref":"#/components/schemas/_maple_ErrorIncidentId"}},"required":["type","incident_kind","incident_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["incident"],"description":"Discriminator — always `\"incident\"` for an incident-anchored investigation."},"issue_id":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"incident_kind":{"type":"string","enum":["anomaly"]},"incident_id":{"$ref":"#/components/schemas/_maple_AnomalyIncidentId"}},"required":["type","incident_kind","incident_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["incident"],"description":"Discriminator — always `\"incident\"` for an incident-anchored investigation."},"issue_id":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"incident_kind":{"type":"string","enum":["alert"]},"incident_id":{"$ref":"#/components/schemas/_maple_AlertIncidentId"}},"required":["type","incident_kind","incident_id"],"additionalProperties":false}]},{"$ref":"#/components/schemas/InvestigationFreeformSubject"}]},"snapshot":{"type":"object","properties":{"title":{"type":"string"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"severity":{"anyOf":[{"$ref":"#/components/schemas/_maple_IssueSeverity"},{"type":"null"}]},"facts":{"$ref":"#/components/schemas/Arrays_16"},"references":{"$ref":"#/components/schemas/Arrays_17"},"incident_started_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"incident_ended_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"fingerprint_hash":{"anyOf":[{"type":"string"},{"type":"null"}]},"exception_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"exception_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"top_frame":{"anyOf":[{"type":"string"},{"type":"null"}]},"error_label":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurrence_count":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"service_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployment_env":{"anyOf":[{"type":"string"},{"type":"null"}]},"signal_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"observed_value":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"threshold_value":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]}},"required":["title","scope","status","severity","facts","references","incident_started_at","incident_ended_at"],"additionalProperties":false}},"required":["subject"],"additionalProperties":false,"title":"Investigation create parameters","description":"Request body for opening an investigation. Incident-anchored investigations dedup to one per incident.","examples":[{"subject":{"type":"incident","incident_kind":"error","incident_id":"einc_YofPTrK9782DWwcnXhpcCw"}}]},"InvestigationAgentUnavailableError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/investigations/InvestigationAgentUnavailableError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["investigation_agent_unavailable"]},"title":{"type":"string","enum":["Investigation agent is temporarily unavailable"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Investigation agent is temporarily unavailable","description":"The @maple/http/investigations/InvestigationAgentUnavailableError failure. HTTP 503."},"InvestigationStartFailedError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/investigations/InvestigationStartFailedError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["investigation_start_failed"]},"title":{"type":"string","enum":["Investigation could not be started"]},"message":{"type":"string","enum":["The investigation could not be started. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Investigation could not be started","description":"The @maple/http/investigations/InvestigationStartFailedError failure. HTTP 503."},"_maple_InvestigationStatus_2":{"type":"string","enum":["investigating","diagnosed","inconclusive","resolved","failed"],"title":"Investigation Status","description":"The new lifecycle status.","examples":["resolved"]},"InvestigationStatusUpdateParams":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/_maple_InvestigationStatus_2"}},"required":["status"],"additionalProperties":false,"title":"Investigation status update parameters","description":"Request body for changing an investigation's lifecycle status.","examples":[{"status":"resolved"}]},"_maple_AnomalyIncidentStatus":{"type":"string","enum":["open","resolved"],"title":"Anomaly Incident Status","description":"Filter by incident status."},"_maple_AnomalySignalType":{"type":"string","enum":["error_rate","latency_p95","throughput","error_spike","log_volume"],"title":"Anomaly Signal Type","description":"Filter by signal type."},"_maple_AnomalySignalType_1":{"type":"string","enum":["error_rate","latency_p95","throughput","error_spike","log_volume"],"title":"Anomaly Signal Type","description":"The monitored signal that triggered the anomaly.","examples":["error_rate"]},"_maple_AnomalyIncidentStatus_1":{"type":"string","enum":["open","resolved"],"title":"Anomaly Incident Status","description":"Incident status: `open` or `resolved`.","examples":["open"]},"_maple_AnomalyIncidentSeverity":{"type":"string","enum":["warning","critical"],"title":"Anomaly Incident Severity","description":"Incident severity: `warning` or `critical`.","examples":["critical"]},"_maple_AnomalyResolveReason":{"type":"string","enum":["returned_to_baseline","no_data","manual"],"title":"Anomaly Resolve Reason"},"_maple_AnomalyTriageStatus":{"type":"string","enum":["none","pending","completed","skipped"],"title":"Anomaly Triage Status","description":"AI-triage state for the incident (`none`, `pending`, `completed`, `skipped`)."},"_maple_AnomalyIncidentSeverity_1":{"type":"string","enum":["warning","critical"],"title":"Anomaly Incident Severity","description":"Severity contributed by this fingerprint."},"AnomalyIncidentFingerprint":{"type":"object","properties":{"fingerprint_hash":{"type":"string","description":"The error fingerprint hash."},"error_issue_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_ErrorIssueId"},{"type":"null"}],"description":"The `iss_…` error issue for this fingerprint, or `null`."},"opened_value":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"last_value":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"severity":{"$ref":"#/components/schemas/_maple_AnomalyIncidentSeverity_1"},"attached_at":{"type":"string"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When this fingerprint returned to baseline, or `null`."}},"required":["fingerprint_hash","error_issue_id","opened_value","last_value","severity","attached_at","resolved_at"],"additionalProperties":false,"title":"Anomaly incident fingerprint","description":"One error fingerprint participating in a consolidated error-spike incident."},"AnomalyIncident":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_AnomalyIncidentId"},"object":{"type":"string","enum":["anomaly_incident"],"description":"The object type — always `\"anomaly_incident\"`.","examples":["anomaly_incident"]},"detector_key":{"type":"string","description":"Stable key identifying the detector (signal + service + env) that opened the incident."},"signal_type":{"$ref":"#/components/schemas/_maple_AnomalySignalType_1"},"service_name":{"type":"string","description":"The service the anomaly was detected on."},"deployment_env":{"type":"string","description":"The deployment environment (e.g. `production`)."},"fingerprint_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The error fingerprint for `error_spike` incidents, or `null` for golden-signal incidents."},"error_issue_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_ErrorIssueId"},{"type":"null"}],"description":"The `iss_…` error issue linked to the incident, or `null`."},"status":{"$ref":"#/components/schemas/_maple_AnomalyIncidentStatus_1"},"severity":{"$ref":"#/components/schemas/_maple_AnomalyIncidentSeverity"},"opened_value":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"baseline_median":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"baseline_sigma":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"threshold_value":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"last_observed_value":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"last_sample_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"first_triggered_at":{"type":"string"},"last_triggered_at":{"type":"string"},"resolved_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the incident resolved, or `null`."},"resolve_reason":{"anyOf":[{"$ref":"#/components/schemas/_maple_AnomalyResolveReason"},{"type":"null"}],"description":"Why the incident resolved (`returned_to_baseline`, `no_data`, `manual`), or `null`."},"triage_status":{"$ref":"#/components/schemas/_maple_AnomalyTriageStatus"},"fingerprints":{"type":"array","items":{"$ref":"#/components/schemas/AnomalyIncidentFingerprint"},"description":"Fingerprints sharing this incident; empty for golden-signal incidents."},"reopen_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"last_reopened_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the incident last reopened, or `null`."}},"required":["id","object","detector_key","signal_type","service_name","deployment_env","fingerprint_hash","error_issue_id","status","severity","opened_value","baseline_median","baseline_sigma","threshold_value","last_observed_value","last_sample_count","first_triggered_at","last_triggered_at","resolved_at","resolve_reason","triage_status","fingerprints","reopen_count","last_reopened_at"],"additionalProperties":false,"title":"Anomaly incident","description":"A detected anomaly on a monitored signal (error rate, latency, throughput, error spike, or log volume) for a service and environment, opened by Maple's baseline detector.","examples":[{"id":"anom_YofPTrK9782DWwcnXhpcCw","object":"anomaly_incident","detector_key":"error_rate:payments:production","signal_type":"error_rate","service_name":"payments","deployment_env":"production","fingerprint_hash":null,"error_issue_id":null,"status":"open","severity":"critical","opened_value":0.12,"baseline_median":0.01,"baseline_sigma":0.004,"threshold_value":0.05,"last_observed_value":0.14,"last_sample_count":4200,"first_triggered_at":"2026-07-15T09:12:00.000Z","last_triggered_at":"2026-07-15T09:18:00.000Z","resolved_at":null,"resolve_reason":null,"triage_status":"completed","fingerprints":[],"reopen_count":0,"last_reopened_at":null}]},"AnomalyIncidentList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AnomalyIncident"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Anomaly incident list","description":"A cursor-paginated page of anomaly incidents, newest first."},"AnomalyPersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/anomalies/AnomalyPersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["anomalies_unavailable"]},"title":{"type":"string","enum":["Anomalies are temporarily unavailable"]},"message":{"type":"string","enum":["Anomalies are temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Anomalies are temporarily unavailable","description":"The @maple/http/anomalies/AnomalyPersistenceError failure. HTTP 503."},"_maple_AnomalyIncidentStatus_2":{"type":"string","enum":["open","resolved"],"title":"Anomaly Incident Status","description":"Which incidents to aggregate. Defaults to `open`."},"_maple_AnomalyIncidentSeverity_2":{"type":"string","enum":["warning","critical"],"title":"Anomaly Incident Severity","description":"The worst severity among the incidents in this group.","examples":["critical"]},"AnomalyServiceCount":{"type":"object","properties":{"object":{"type":"string","enum":["anomaly_service_count"],"description":"The object type — always `\"anomaly_service_count\"`.","examples":["anomaly_service_count"]},"service_name":{"type":"string","description":"The service the incidents were detected on."},"deployment_env":{"type":"string","description":"The deployment environment (e.g. `production`)."},"signal_type":{"$ref":"#/components/schemas/_maple_AnomalySignalType_1"},"severity":{"$ref":"#/components/schemas/_maple_AnomalyIncidentSeverity_2"},"incident_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"last_triggered_at":{"type":"string"}},"required":["object","service_name","deployment_env","signal_type","severity","incident_count","last_triggered_at"],"additionalProperties":false,"title":"Anomaly service count","description":"Open anomaly incidents for one (service, environment, signal), collapsed to a count with the worst severity and the most recent trigger.","examples":[{"object":"anomaly_service_count","service_name":"payments","deployment_env":"production","signal_type":"error_rate","severity":"critical","incident_count":2,"last_triggered_at":"2026-07-15T09:18:00.000Z"}]},"AnomalyServiceCountList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AnomalyServiceCount"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Anomaly service count list","description":"Every group for the org in one page — the aggregate is not paginated."},"AnomalyIncidentNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/anomalies/AnomalyIncidentNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["anomaly_incident_not_found"]},"title":{"type":"string","enum":["Anomaly incident not found"]},"message":{"type":"string","enum":["No such anomaly incident."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Anomaly incident not found","description":"The @maple/http/anomalies/AnomalyIncidentNotFoundError failure. HTTP 404."},"_maple_AnomalyTimeseriesUnit":{"type":"string","enum":["ratio","milliseconds","per_minute","count_per_30m"],"title":"Anomaly Timeseries Unit","description":"The unit of the bucketed values (`ratio`, `milliseconds`, `per_minute`, `count_per_30m`)."},"AnomalyTimeseriesBucket":{"type":"object","properties":{"bucket":{"type":"string"},"value":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"sample_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]}},"required":["bucket","value","sample_count"],"additionalProperties":false,"title":"Anomaly timeseries bucket"},"AnomalyIncidentTimeseries":{"type":"object","properties":{"object":{"type":"string","enum":["anomaly_incident.timeseries"],"description":"The object type — always `\"anomaly_incident.timeseries\"`."},"signal_type":{"$ref":"#/components/schemas/_maple_AnomalySignalType_1"},"unit":{"$ref":"#/components/schemas/_maple_AnomalyTimeseriesUnit"},"bucket_seconds":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"buckets":{"type":"array","items":{"$ref":"#/components/schemas/AnomalyTimeseriesBucket"},"description":"The signal timeseries around the incident window."},"baseline_median":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"threshold_value":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]}},"required":["object","signal_type","unit","bucket_seconds","buckets","baseline_median","threshold_value"],"additionalProperties":false,"title":"Anomaly incident timeseries","description":"The monitored signal's timeseries around an incident, with the baseline and threshold.","examples":[{"object":"anomaly_incident.timeseries","signal_type":"error_rate","unit":"ratio","bucket_seconds":300,"buckets":[{"bucket":"2026-07-15T09:10:00.000Z","value":0.12,"sample_count":4200}],"baseline_median":0.01,"threshold_value":0.05}]},"AnomalyLinkIssueParams":{"type":"object","properties":{"issue_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_ErrorIssueId"},{"type":"null"}],"description":"The `iss_…` error issue to link, or `null` to clear an existing link."}},"required":["issue_id"],"additionalProperties":false,"title":"Anomaly link-issue parameters","description":"Request body for linking (or unlinking) an error issue to an incident.","examples":[{"issue_id":"iss_YofPTrK9782DWwcnXhpcCw"}]},"AnomalyLinkedIssueNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/anomalies/AnomalyLinkedIssueNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["error_issue_not_found"]},"title":{"type":"string","enum":["Error issue not found"]},"message":{"type":"string","enum":["No such error issue."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Error issue not found","description":"The @maple/http/anomalies/AnomalyLinkedIssueNotFoundError failure. HTTP 404."},"_maple_AnomalySensitivity":{"type":"string","enum":["low","normal","high"],"title":"Anomaly Sensitivity","description":"Detector sensitivity (`low`, `normal`, `high`).","examples":["normal"]},"_maple_AnomalySignalType_2":{"type":"string","enum":["error_rate","latency_p95","throughput","error_spike","log_volume"],"title":"Anomaly Signal Type"},"AnomalySettings":{"type":"object","properties":{"object":{"type":"string","enum":["anomaly_settings"],"description":"The object type — always `\"anomaly_settings\"`."},"enabled":{"type":"boolean","description":"Whether anomaly detection is enabled for the org."},"sensitivity":{"$ref":"#/components/schemas/_maple_AnomalySensitivity"},"muted_signals":{"type":"array","items":{"$ref":"#/components/schemas/_maple_AnomalySignalType_2"},"description":"Signals the detector ignores."},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When settings were last updated, or `null`."},"updated_by":{"anyOf":[{"$ref":"#/components/schemas/_maple_UserId_1"},{"type":"null"}],"description":"The `user_…` who last updated settings, or `null`."}},"required":["object","enabled","sensitivity","muted_signals","updated_at","updated_by"],"additionalProperties":false,"title":"Anomaly detector settings","description":"Org-wide anomaly detector configuration.","examples":[{"object":"anomaly_settings","enabled":true,"sensitivity":"normal","muted_signals":[],"updated_at":"2026-07-15T09:12:00.000Z","updated_by":"user_2abc"}]},"_maple_AnomalySensitivity_1":{"type":"string","enum":["low","normal","high"],"title":"Anomaly Sensitivity","description":"Set detector sensitivity."},"AnomalySettingsUpdateParams":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Enable or disable detection."},"sensitivity":{"$ref":"#/components/schemas/_maple_AnomalySensitivity_1"},"muted_signals":{"type":"array","items":{"$ref":"#/components/schemas/_maple_AnomalySignalType_2"},"description":"Replace the set of muted signals."}},"additionalProperties":false,"title":"Anomaly settings update parameters","description":"Request body for updating the detector settings. Omitted fields are left unchanged.","examples":[{"sensitivity":"high"}]},"AnomalyForbiddenError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/anomalies/AnomalyForbiddenError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["permission_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["anomaly_settings_forbidden"]},"title":{"type":"string","enum":["Permission required"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["request_access"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Permission required","description":"The @maple/http/anomalies/AnomalyForbiddenError failure. HTTP 403."},"_maple_OrgId":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"Organization ID","description":"The organization's opaque `org_…` ID (e.g. `org_2abcDEF`)."}]},"Organization":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_OrgId"},"object":{"type":"string","enum":["organization"],"description":"The object type — always `\"organization\"`.","examples":["organization"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The organization's display name, or `null` in self-hosted mode.","examples":["Acme Inc"]},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The organization's URL slug, or `null` when unset or in self-hosted mode.","examples":["acme"]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the organization was created, or `null` in self-hosted mode."}},"required":["id","object","name","slug","created_at"],"additionalProperties":false,"title":"Organization","description":"The authenticated organization. Identity is sourced from the auth provider; in self-hosted mode only the `id` is populated.","examples":[{"id":"org_2abcDEF","object":"organization","name":"Acme Inc","slug":"acme","created_at":"2026-01-15T12:00:00.000Z"}]},"OrganizationProviderError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/OrganizationProviderError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["organization_provider_unavailable"]},"title":{"type":"string","enum":["Organization provider unavailable"]},"message":{"type":"string","enum":["The organization provider is temporarily unavailable."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Organization provider unavailable","description":"The @maple/http/errors/OrganizationProviderError failure. HTTP 502."},"_maple_MobileDeviceId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `mdev_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["mdev_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"_maple_MobilePlatform":{"anyOf":[{"type":"string","enum":["ios"]}],"title":"Mobile Platform"},"_maple_MobilePushEnvironment":{"type":"string","enum":["sandbox","production"],"title":"Mobile Push Environment","description":"`sandbox` for development builds, `production` for TestFlight and App Store builds."},"MobileDevice":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_MobileDeviceId"},"object":{"type":"string","enum":["mobile_device"],"description":"The object type — always `\"mobile_device\"`."},"platform":{"$ref":"#/components/schemas/_maple_MobilePlatform"},"token":{"type":"string","allOf":[{"minLength":16},{"maxLength":512,"title":"Device token","description":"The platform push token — the hex APNs device token on iOS. Opaque to Maple.","examples":["a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90"]}]},"environment":{"$ref":"#/components/schemas/_maple_MobilePushEnvironment"},"bundle_id":{"type":"string"},"app_version":{"anyOf":[{"type":"string"},{"type":"null"}]},"device_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"preferences":{"type":"object","properties":{"critical_incidents":{"type":"boolean"},"warning_incidents":{"type":"boolean"},"resolved_incidents":{"type":"boolean"},"new_error_issues":{"type":"boolean"},"anomalies":{"type":"boolean"}},"required":["critical_incidents","warning_incidents","resolved_incidents","new_error_issues","anomalies"],"additionalProperties":false},"live_activities_enabled":{"type":"boolean","description":"`true` once the device has handed over a Live Activity push-to-start token, meaning critical incidents can raise a Lock Screen Live Activity on it."},"enabled":{"type":"boolean","description":"`false` once the platform reported the token dead. Re-registering the token re-enables the device."},"last_seen_at":{"type":"string"},"created_at":{"type":"string"}},"required":["id","object","platform","token","environment","bundle_id","app_version","device_name","preferences","live_activities_enabled","enabled","last_seen_at","created_at"],"additionalProperties":false,"title":"Mobile Device","description":"A phone registered for push notifications by the current user in the current organization. Alert incidents fan out to every enabled device whose preferences include the event.","examples":[{"id":"mdev_YofPTrK9782DWwcnXhpcCw","object":"mobile_device","platform":"ios","token":"a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90","environment":"production","bundle_id":"com.maple.mobile","app_version":"0.2.0","device_name":"iPhone","preferences":{"critical_incidents":true,"warning_incidents":false,"resolved_incidents":false,"new_error_issues":false,"anomalies":false},"live_activities_enabled":true,"enabled":true,"last_seen_at":"2026-08-17T09:10:00.000Z","created_at":"2026-08-01T12:00:00.000Z"}]},"MobileDeviceList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/MobileDevice"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Mobile device list","description":"Cursor-paginated list envelope wrapping a page of objects."},"MobileDevicePersistenceError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/MobileDevicePersistenceError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["mobile_devices_unavailable"]},"title":{"type":"string","enum":["Device registration is temporarily unavailable"]},"message":{"type":"string","enum":["Device registration is temporarily unavailable. Retry in a few seconds."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Device registration is temporarily unavailable","description":"The @maple/http/errors/MobileDevicePersistenceError failure. HTTP 503."},"_maple_MobilePushEnvironment_1":{"type":"string","enum":["sandbox","production"],"title":"Mobile Push Environment"},"_maple_MobileDevicePreferences":{"type":"object","properties":{"critical_incidents":{"type":"boolean"},"warning_incidents":{"type":"boolean"},"resolved_incidents":{"type":"boolean"},"new_error_issues":{"type":"boolean"},"anomalies":{"type":"boolean"}},"additionalProperties":false,"title":"Mobile Device Preferences","description":"Which events this device is pushed. Omitted keys keep their default: `critical_incidents` defaults to `true`, and every other key to `false`.","examples":[{"critical_incidents":true,"warning_incidents":true,"resolved_incidents":false}]},"MobileDeviceRegisterParams":{"type":"object","properties":{"platform":{"$ref":"#/components/schemas/_maple_MobilePlatform"},"environment":{"$ref":"#/components/schemas/_maple_MobilePushEnvironment_1"},"bundle_id":{"type":"string","allOf":[{"minLength":1,"examples":["com.maple.mobile"]}]},"app_version":{"type":"string"},"device_name":{"type":"string"},"preferences":{"$ref":"#/components/schemas/_maple_MobileDevicePreferences"},"live_activity_start_token":{"type":"string","allOf":[{"minLength":16},{"maxLength":512,"title":"Live Activity push-to-start token","description":"ActivityKit's push-to-start token, hex. Lets Maple start a Lock Screen Live Activity for a critical incident on a phone that has not opened the app. Opaque to Maple."}]}},"required":["platform","environment","bundle_id"],"additionalProperties":false,"title":"Mobile device registration","description":"Registers or refreshes a device. Idempotent on `(platform, token)` within the organization: the app calls this on every launch and whenever the token or preferences change."},"MobileDeviceDeleteResponse":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_MobileDeviceId"},"object":{"type":"string","enum":["mobile_device"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"],"additionalProperties":false,"title":"Mobile device delete response"},"MobileDeviceNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/MobileDeviceNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["mobile_device_not_found"]},"title":{"type":"string","enum":["Device not registered"]},"message":{"type":"string","enum":["No device with this token is registered for the current user."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Device not registered","description":"The @maple/http/errors/MobileDeviceNotFoundError failure. HTTP 404."},"LiveActivityRegisterParams":{"type":"object","properties":{"activity_id":{"type":"string","allOf":[{"minLength":1},{"maxLength":128,"description":"ActivityKit's own identifier for the running activity."}]},"push_token":{"type":"string","allOf":[{"minLength":16},{"maxLength":512,"description":"The activity's APNs update token, hex. Different from both the device token and the push-to-start token, and rotated by iOS — the app re-submits it on every rotation."}]}},"required":["activity_id","push_token"],"additionalProperties":false,"title":"Live Activity registration","description":"Hands Maple the update token for an activity the device just started. Idempotent on `(device, incident)`."},"LiveActivity":{"type":"object","properties":{"object":{"type":"string","enum":["live_activity"],"description":"The object type — always `\"live_activity\"`."},"incident_id":{"$ref":"#/components/schemas/_maple_AlertIncidentId"},"activity_id":{"type":"string"},"ended":{"type":"boolean"},"created_at":{"type":"string"}},"required":["object","incident_id","activity_id","ended","created_at"],"additionalProperties":false,"title":"Live Activity","description":"A Lock Screen Live Activity running on one device for one alert incident. Maple pushes updates to it as the incident renotifies, and ends it when the incident resolves.","examples":[{"object":"live_activity","incident_id":"inc_YofPTrK9782DWwcnXhpcCw","activity_id":"F9E1B4C0-8F2A-4C6D-9E1B-4C08F2A4C6D9","ended":false,"created_at":"2026-08-17T09:10:00.000Z"}]},"LiveActivityDeleteResponse":{"type":"object","properties":{"object":{"type":"string","enum":["live_activity"]},"incident_id":{"$ref":"#/components/schemas/_maple_AlertIncidentId"},"deleted":{"type":"boolean","enum":[true]}},"required":["object","incident_id","deleted"],"additionalProperties":false,"title":"Live Activity delete response"},"SessionReplaySearchParams":{"type":"object","properties":{"start_time":{"type":"string"},"end_time":{"type":"string"},"service_name":{"type":"string","description":"Filter by service."},"browser":{"type":"string","description":"Filter by browser."},"country":{"type":"string","description":"Filter by country."},"device_type":{"type":"string","description":"Filter by device type."},"user_id":{"type":"string","description":"Filter by identified user."},"user_search":{"type":"string","description":"Case-insensitive substring match on the identified user's name or email."},"group_name":{"type":"string","description":"Filter by identified group (company / team) name."},"visitor_id":{"type":"string","description":"Filter by browser visitor. Unlike `user_id` this survives sign-in, so it walks from an anonymous session to the identified sessions of the same browser."},"has_errors":{"type":"boolean","description":"Only sessions with (or without) errors."},"search":{"type":"string","description":"Free-text search over URL/user."},"duration_min_ms":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"duration_max_ms":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"active_time_min_ms":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"active_time_max_ms":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"limit":{"type":"integer","allOf":[{"minimum":1,"maximum":100,"description":"Maximum number of sessions to return (1–100, default 20)."}]},"cursor":{"type":"string","description":"Opaque pagination cursor from a prior response."}},"required":["start_time","end_time"],"additionalProperties":false,"title":"Session replay search parameters","description":"Filters, required time window, and pagination for searching session replays.","examples":[{"start_time":"2026-07-15T00:00:00.000Z","end_time":"2026-07-16T00:00:00.000Z","has_errors":true}]},"_maple_SessionId":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `srep_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["srep_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"SessionReplayListItem":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_SessionId"},"object":{"type":"string","enum":["session_replay"],"description":"The object type — always `\"session_replay\"`.","examples":["session_replay"]},"start_time":{"type":"string"},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the session ended, or `null` if ongoing."},"duration_ms":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Session wall-clock duration in ms, or `null`."},"status":{"type":"string","description":"Session status (e.g. `active`, `ended`)."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identified user, or `null` if anonymous."},"user_name":{"type":"string","description":"The identified user's display name, or `\"\"` if unknown."},"user_email":{"type":"string","description":"The identified user's email, or `\"\"` if unknown or suppressed by the SDK's `captureUserEmail` setting."},"group_id":{"type":"string","description":"The identified group (company / team / tenant) ID, or `\"\"` if unknown."},"group_name":{"type":"string","description":"The identified group's display name, or `\"\"` if unknown."},"url_initial":{"type":"string","description":"The first URL of the session."},"browser_name":{"type":"string","description":"Browser name."},"os_name":{"type":"string","description":"Operating system name."},"device_type":{"type":"string","description":"Device type (e.g. `desktop`, `mobile`)."},"country":{"type":"string","description":"Country the session originated from."},"service_name":{"type":"string","description":"Service the session was recorded on."},"page_views":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"click_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"error_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"trace_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]}},"required":["id","object","start_time","end_time","duration_ms","status","user_id","user_name","user_email","group_id","group_name","url_initial","browser_name","os_name","device_type","country","service_name","page_views","click_count","error_count","trace_count"],"additionalProperties":false,"title":"Session replay","description":"A recorded browser session — summary form returned by search.","examples":[{"id":"srep_4yeq2Gm3r2drGjuAHorp","object":"session_replay","start_time":"2026-07-15T09:12:00.000Z","end_time":"2026-07-15T09:18:30.000Z","duration_ms":390000,"status":"ended","user_id":"user_2abc","user_name":"Ada Lovelace","user_email":"ada@acme.com","group_id":"acme","group_name":"Acme Inc","url_initial":"https://app.example.com/dashboard","browser_name":"Chrome","os_name":"macOS","device_type":"desktop","country":"US","service_name":"web","page_views":5,"click_count":24,"error_count":1,"trace_count":12}]},"SessionReplayList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionReplayListItem"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Session replay list","description":"A cursor-paginated page of session replays, newest first."},"SessionReplay":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_SessionId"},"object":{"type":"string","enum":["session_replay"],"description":"The object type — always `\"session_replay\"`.","examples":["session_replay"]},"start_time":{"type":"string"},"end_time":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"When the session ended, or `null` if ongoing."},"duration_ms":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Session wall-clock duration in ms, or `null`."},"status":{"type":"string","description":"Session status (e.g. `active`, `ended`)."},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The identified user, or `null` if anonymous."},"user_name":{"type":"string","description":"The identified user's display name, or `\"\"` if unknown."},"user_email":{"type":"string","description":"The identified user's email, or `\"\"` if unknown or suppressed by the SDK's `captureUserEmail` setting."},"group_id":{"type":"string","description":"The identified group (company / team / tenant) ID, or `\"\"` if unknown."},"group_name":{"type":"string","description":"The identified group's display name, or `\"\"` if unknown."},"url_initial":{"type":"string","description":"The first URL of the session."},"browser_name":{"type":"string","description":"Browser name."},"os_name":{"type":"string","description":"Operating system name."},"device_type":{"type":"string","description":"Device type (e.g. `desktop`, `mobile`)."},"country":{"type":"string","description":"Country the session originated from."},"service_name":{"type":"string","description":"Service the session was recorded on."},"page_views":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"click_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"error_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"trace_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"user_agent":{"type":"string","description":"The full user-agent string."},"trace_ids":{"type":"array","items":{"$ref":"#/components/schemas/_maple_TraceId"},"description":"All trace IDs correlated to the session."},"resource_attributes":{"type":"string","description":"The session's OTel resource attributes, JSON-encoded."},"active_time_ms":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Active (non-idle) time in ms, or `null` when the session has no distilled events."},"idle_time_ms":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Idle time in ms, or `null`."}},"required":["id","object","start_time","end_time","duration_ms","status","user_id","user_name","user_email","group_id","group_name","url_initial","browser_name","os_name","device_type","country","service_name","page_views","click_count","error_count","trace_count","user_agent","trace_ids","resource_attributes","active_time_ms","idle_time_ms"],"additionalProperties":false,"title":"Session replay (detail)","description":"A recorded browser session with full detail, returned by retrieve.","examples":[{"id":"srep_4yeq2Gm3r2drGjuAHorp","object":"session_replay","start_time":"2026-07-15T09:12:00.000Z","end_time":"2026-07-15T09:18:30.000Z","duration_ms":390000,"status":"ended","user_id":"user_2abc","user_name":"Ada Lovelace","user_email":"ada@acme.com","group_id":"acme","group_name":"Acme Inc","url_initial":"https://app.example.com/dashboard","browser_name":"Chrome","os_name":"macOS","device_type":"desktop","country":"US","service_name":"web","page_views":5,"click_count":24,"error_count":1,"trace_count":12,"user_agent":"Mozilla/5.0 …","trace_ids":[],"resource_attributes":"{}","active_time_ms":240000,"idle_time_ms":150000}]},"SessionReplayNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/SessionReplayNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["session_replay_not_found"]},"title":{"type":"string","enum":["Session replay not found"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Session replay not found","description":"The @maple/http/v2/SessionReplayNotFoundError failure. HTTP 404."},"SessionReplayChunkMeta":{"type":"object","properties":{"chunk_seq":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"timestamp":{"type":"string"},"duration_ms":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"event_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"byte_size":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"is_checkpoint":{"type":"boolean","description":"Whether the chunk contains a full DOM snapshot. Only a checkpoint can seed a player, so seeking means loading the nearest checkpoint at or before the target."}},"required":["chunk_seq","timestamp","duration_ms","event_count","byte_size","is_checkpoint"],"additionalProperties":false,"title":"Session replay chunk metadata","description":"One chunk's position and size, without its payload."},"SessionReplayManifest":{"type":"object","properties":{"object":{"type":"string","enum":["session_replay.manifest"],"description":"The object type — always `\"session_replay.manifest\"`."},"session_id":{"$ref":"#/components/schemas/_maple_SessionId"},"chunks":{"type":"array","items":{"$ref":"#/components/schemas/SessionReplayChunkMeta"},"description":"Every chunk in the session, ordered by `chunk_seq`."},"chunk_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"total_byte_size":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"max_chunks_per_request":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"max_bytes_per_request":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"truncated":{"type":"boolean","description":"Whether the chunk list was cut off at the manifest ceiling. `false` for any session recordable under the current ingest limits."}},"required":["object","session_id","chunks","chunk_count","total_byte_size","max_chunks_per_request","max_bytes_per_request","truncated"],"additionalProperties":false,"title":"Session replay manifest","description":"The session's chunk timeline without payloads — fetch this first, then request payload ranges against it."},"SessionReplayChunk":{"type":"object","properties":{"object":{"type":"string","enum":["session_replay.event_chunk"],"description":"The object type — always `\"session_replay.event_chunk\"`."},"chunk_seq":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"timestamp":{"type":"string"},"duration_ms":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"event_count":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"byte_size":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"is_checkpoint":{"type":"boolean","description":"Whether the chunk contains a full DOM snapshot. Only a checkpoint can seed a player, so seeking means loading the nearest checkpoint at or before the target."},"events":{"type":"string","description":"The rrweb event array for this chunk, serialized as a JSON string."}},"required":["object","chunk_seq","timestamp","duration_ms","event_count","byte_size","is_checkpoint","events"],"additionalProperties":false,"title":"Session replay event chunk","description":"One chunk of rrweb events for a session, payload inline."},"SessionReplayChunkList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionReplayChunk"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Session replay chunk list","description":"A cursor-paginated page of rrweb event chunks, in order."},"SessionReplayRangeTooLargeError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/SessionReplayRangeTooLargeError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["range_too_large"]},"title":{"type":"string","enum":["Session replay range too large"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Session replay range too large","description":"The @maple/http/v2/SessionReplayRangeTooLargeError failure. HTTP 413."},"SessionTranscriptEvent":{"type":"object","properties":{"object":{"type":"string","enum":["session_replay.transcript_event"],"description":"The object type — always `\"session_replay.transcript_event\"`."},"timestamp":{"type":"string"},"seq":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"type":{"type":"string","description":"Event type (navigation, click, network, console, error, …)."},"url":{"type":"string","description":"The page URL at the time of the event."},"trace_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_TraceId"},{"type":"null"}],"description":"Correlated trace ID, or `null`."},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Severity/level for console and error events, otherwise `null`."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The event message when this event carries one, otherwise `null`."},"target_selector":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"CSS selector of the interaction target, otherwise `null`."},"target_text":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Text of the interaction target, otherwise `null`."},"net_method":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"HTTP method for network events, otherwise `null`."},"net_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Request URL for network events, otherwise `null`."},"net_status":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Response status for network events, otherwise `null`."},"net_duration_ms":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Request duration in ms for network events, otherwise `null`."},"error_stack":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Stack trace for error events, otherwise `null`."}},"required":["object","timestamp","seq","type","url","trace_id","level","message","target_selector","target_text","net_method","net_url","net_status","net_duration_ms","error_stack"],"additionalProperties":false,"title":"Session transcript event","description":"One distilled event in a session's transcript."},"SessionTranscriptList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionTranscriptEvent"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Session transcript list","description":"A cursor-paginated page of distilled transcript events, in order."},"_maple_TraceId_1":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"Trace ID","description":"The trace ID to find sessions for."}]},"SessionReplaysForTraceParams":{"type":"object","properties":{"trace_id":{"$ref":"#/components/schemas/_maple_TraceId_1"},"start_time":{"type":"string"},"end_time":{"type":"string"},"limit":{"type":"integer","allOf":[{"minimum":1,"maximum":100,"description":"Maximum number of session references to return (1–100, default 20)."}]},"cursor":{"type":"string","description":"Opaque pagination cursor from a prior response."}},"required":["trace_id","start_time","end_time"],"additionalProperties":false,"title":"Sessions-for-trace parameters","description":"Find the sessions that contain a given trace."},"SessionReplayRef":{"type":"object","properties":{"object":{"type":"string","enum":["session_replay.ref"],"description":"The object type — always `\"session_replay.ref\"`."},"id":{"$ref":"#/components/schemas/_maple_SessionId"},"start_time":{"type":"string"},"duration_ms":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}],"description":"Session duration in ms, or `null`."}},"required":["object","id","start_time","duration_ms"],"additionalProperties":false,"title":"Session replay reference","description":"A lightweight reference to a session correlated with a trace."},"SessionReplayRefList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SessionReplayRef"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Session replay reference list","description":"A cursor-paginated page of session references correlated to a trace."},"_maple_ServiceName":{"type":"string","title":"Service Name"},"AttributeFilter":{"anyOf":[{"type":"object","properties":{"key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"operator":{"type":"string","enum":["exists"]},"value":{"not":{}},"negated":{"type":"boolean"}},"required":["key","operator"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"operator":{"type":"string","enum":["equals","contains"]},"value":{"type":"string"},"negated":{"type":"boolean"}},"required":["key","operator","value"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"operator":{"type":"string","enum":["gt","gte","lt","lte"]},"value":{"type":"number"},"negated":{"type":"boolean"}},"required":["key","operator","value"],"additionalProperties":false}],"title":"Attribute filter","description":"Matches an attribute by key. `exists` has no value, string operators require a string value, and numeric operators require a finite number."},"Arrays_18":{"type":"array","items":{"$ref":"#/components/schemas/AttributeFilter"},"allOf":[{"maxItems":20}]},"TraceFilters":{"type":"object","properties":{"service_name":{"$ref":"#/components/schemas/_maple_ServiceName"},"span_name":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"status_code":{"type":"string","enum":["Ok","Error","Unset"]},"has_error":{"type":"boolean"},"min_duration_ms":{"type":"number","allOf":[{"minimum":0}]},"max_duration_ms":{"type":"number","allOf":[{"minimum":0}]},"http_method":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"http_route":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"http_status_code":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"deployment_environment":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"service_namespace":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"span_scope":{"type":"string","enum":["root"]},"attributes":{"$ref":"#/components/schemas/Arrays_18"},"resource_attributes":{"$ref":"#/components/schemas/Arrays_18"}},"additionalProperties":false,"title":"Trace filters"},"TraceSearchParams":{"type":"object","properties":{"start_time":{"type":"string"},"end_time":{"type":"string"},"limit":{"type":"integer","allOf":[{"minimum":1,"maximum":100}]},"cursor":{"type":"string"},"filters":{"$ref":"#/components/schemas/TraceFilters"}},"required":["start_time","end_time"],"additionalProperties":false,"title":"Trace search parameters","examples":[{"start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","filters":{"service_name":"api","has_error":true,"attributes":[{"key":"http.route","operator":"contains","value":"/checkout"}]},"limit":20}]},"TraceSummary":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_TraceId"},"object":{"type":"string","enum":["trace"]},"start_time":{"type":"string"},"duration_ms":{"$ref":"#/components/schemas/Union_12"},"root_span_name":{"type":"string"},"root_span_kind":{"type":"string"},"root_service_name":{"type":"string"},"root_status_code":{"type":"string"},"root_has_error":{"type":"boolean"},"deployment_environment":{"anyOf":[{"type":"string"},{"type":"null"}]},"service_namespace":{"anyOf":[{"type":"string"},{"type":"null"}]},"http_method":{"anyOf":[{"type":"string"},{"type":"null"}]},"http_route":{"anyOf":[{"type":"string"},{"type":"null"}]},"http_status_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","object","start_time","duration_ms","root_span_name","root_span_kind","root_service_name","root_status_code","root_has_error","deployment_environment","service_namespace","http_method","http_route","http_status_code"],"additionalProperties":false,"title":"Trace summary","description":"A root-based summary returned by trace search.","examples":[{"id":"7f3a4b5c6d7e8f901234567890abcdef","object":"trace","start_time":"2026-07-15T12:00:00.000Z","duration_ms":42.5,"root_span_name":"GET /checkout","root_span_kind":"Server","root_service_name":"api","root_status_code":"Ok","root_has_error":false,"deployment_environment":"production","service_namespace":"checkout","http_method":"GET","http_route":"/checkout","http_status_code":"200"}]},"TraceList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/TraceSummary"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Trace list","description":"Cursor-paginated list envelope wrapping a page of objects."},"TelemetryRangeTooLargeError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/TelemetryRangeTooLargeError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["time_range_too_large"]},"title":{"type":"string","enum":["Time range too large"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Time range too large","description":"The @maple/http/v2/TelemetryRangeTooLargeError failure. HTTP 400."},"TraceTimeseriesParams":{"type":"object","properties":{"start_time":{"type":"string"},"end_time":{"type":"string"},"aggregation":{"type":"string","enum":["count","avg_duration","p50_duration","p95_duration","p99_duration","error_rate","apdex"]},"filters":{"$ref":"#/components/schemas/TraceFilters"},"group_by":{"type":"string","enum":["service","span_name","status_code","http_method","attribute"]},"group_by_attribute_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"bucket_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"series_limit":{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100}]},"apdex_threshold_ms":{"type":"number","allOf":[{"exclusiveMinimum":0}]}},"required":["start_time","end_time","aggregation"],"additionalProperties":false},"Union_32":{"anyOf":[{"type":"string"},{"type":"null"}]},"TimeseriesValuePoint":{"type":"object","properties":{"timestamp":{"type":"string"},"value":{"$ref":"#/components/schemas/Union_12"}},"required":["timestamp","value"],"additionalProperties":false,"title":"Timeseries value point"},"TimeseriesSeries":{"type":"object","properties":{"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"points":{"type":"array","items":{"$ref":"#/components/schemas/TimeseriesValuePoint"}}},"required":["group","points"],"additionalProperties":false,"title":"Timeseries series"},"Arrays_19":{"type":"array","items":{"$ref":"#/components/schemas/TimeseriesSeries"}},"TraceTimeseriesResult":{"type":"object","properties":{"object":{"type":"string","enum":["trace_timeseries"]},"aggregation":{"type":"string","enum":["count","avg_duration","p50_duration","p95_duration","p99_duration","error_rate","apdex"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"bucket_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"group_by":{"$ref":"#/components/schemas/Union_32"},"series":{"$ref":"#/components/schemas/Arrays_19"}},"required":["object","aggregation","start_time","end_time","bucket_seconds","group_by","series"],"additionalProperties":false,"title":"Trace timeseries result","examples":[{"object":"trace_timeseries","aggregation":"count","start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","bucket_seconds":60,"group_by":"service","series":[{"group":"api","points":[{"timestamp":"2026-07-15T12:00:00.000Z","value":42}]}]}]},"TelemetryBucketCountTooLargeError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/TelemetryBucketCountTooLargeError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["bucket_count_too_large"]},"title":{"type":"string","enum":["Too many time buckets"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Too many time buckets","description":"The @maple/http/v2/TelemetryBucketCountTooLargeError failure. HTTP 400."},"TraceQueryInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/TraceQueryInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["trace_query_invalid"]},"title":{"type":"string","enum":["Invalid trace query"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid trace query","description":"The @maple/http/v2/TraceQueryInvalidError failure. HTTP 400."},"QueryEngineResultMismatchError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/QueryEngineResultMismatchError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["api_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["query_engine_result_mismatch"]},"title":{"type":"string","enum":["Maple returned an invalid query result"]},"message":{"type":"string","enum":["Maple returned an invalid result for this query."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["contact_support"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Maple returned an invalid query result","description":"The @maple/http/errors/QueryEngineResultMismatchError failure. HTTP 500."},"TraceBreakdownParams":{"type":"object","properties":{"start_time":{"type":"string"},"end_time":{"type":"string"},"aggregation":{"type":"string","enum":["count","avg_duration","p50_duration","p95_duration","p99_duration","error_rate","apdex"]},"filters":{"$ref":"#/components/schemas/TraceFilters"},"group_by":{"type":"string","enum":["service","span_name","status_code","http_method","attribute"]},"group_by_attribute_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"limit":{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100}]},"apdex_threshold_ms":{"type":"number","allOf":[{"exclusiveMinimum":0}]}},"required":["start_time","end_time","aggregation","group_by"],"additionalProperties":false},"BreakdownItem":{"type":"object","properties":{"name":{"type":"string"},"value":{"$ref":"#/components/schemas/Union_12"}},"required":["name","value"],"additionalProperties":false,"title":"Breakdown item"},"Arrays_20":{"type":"array","items":{"$ref":"#/components/schemas/BreakdownItem"}},"TraceBreakdownResult":{"type":"object","properties":{"object":{"type":"string","enum":["trace_breakdown"]},"aggregation":{"type":"string","enum":["count","avg_duration","p50_duration","p95_duration","p99_duration","error_rate","apdex"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"group_by":{"type":"string"},"data":{"$ref":"#/components/schemas/Arrays_20"}},"required":["object","aggregation","start_time","end_time","group_by","data"],"additionalProperties":false,"title":"Trace breakdown result","examples":[{"object":"trace_breakdown","aggregation":"error_rate","start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","group_by":"service","data":[{"name":"api","value":0.05}]}]},"TelemetryBreakdownFilterRequiredError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/TelemetryBreakdownFilterRequiredError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["breakdown_filter_required"]},"title":{"type":"string","enum":["Breakdown filter required"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Breakdown filter required","description":"The @maple/http/v2/TelemetryBreakdownFilterRequiredError failure. HTTP 400."},"Objects_9":{"type":"object","additionalProperties":{"type":"string"}},"Span":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_SpanId"},"object":{"type":"string","enum":["span"]},"trace_id":{"$ref":"#/components/schemas/_maple_TraceId"},"parent_span_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_SpanId"},{"type":"null"}]},"name":{"type":"string"},"service_name":{"type":"string"},"kind":{"type":"string"},"start_time":{"type":"string"},"duration_ms":{"$ref":"#/components/schemas/Union_12"},"status_code":{"type":"string"},"status_message":{"anyOf":[{"type":"string"},{"type":"null"}]},"attributes":{"$ref":"#/components/schemas/Objects_9"},"resource_attributes":{"$ref":"#/components/schemas/Objects_9"}},"required":["id","object","trace_id","parent_span_id","name","service_name","kind","start_time","duration_ms","status_code","status_message","attributes","resource_attributes"],"additionalProperties":false,"title":"Span","description":"An OpenTelemetry span."},"Trace":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_TraceId"},"object":{"type":"string","enum":["trace"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"duration_ms":{"$ref":"#/components/schemas/Union_12"},"span_count":{"$ref":"#/components/schemas/Union_12"},"service_count":{"$ref":"#/components/schemas/Union_12"},"truncated":{"type":"boolean"},"spans":{"type":"array","items":{"$ref":"#/components/schemas/Span"}}},"required":["id","object","start_time","end_time","duration_ms","span_count","service_count","truncated","spans"],"additionalProperties":false,"title":"Trace","description":"A trace and its spans."},"TraceNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/TraceNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["trace_not_found"]},"title":{"type":"string","enum":["Trace not found"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Trace not found","description":"The @maple/http/v2/TraceNotFoundError failure. HTTP 404."},"SpanNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/SpanNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["span_not_found"]},"title":{"type":"string","enum":["Span not found"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Span not found","description":"The @maple/http/v2/SpanNotFoundError failure. HTTP 404."},"LogFilters":{"type":"object","properties":{"service_name":{"$ref":"#/components/schemas/_maple_ServiceName"},"severity":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"minimum_severity":{"type":"integer","allOf":[{"minimum":0,"maximum":255}]},"trace_id":{"$ref":"#/components/schemas/_maple_TraceId"},"span_id":{"$ref":"#/components/schemas/_maple_SpanId"},"body_search":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"deployment_environment":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"service_namespace":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"attributes":{"$ref":"#/components/schemas/Arrays_18"},"resource_attributes":{"$ref":"#/components/schemas/Arrays_18"}},"additionalProperties":false,"title":"Log filters"},"LogSearchParams":{"type":"object","properties":{"start_time":{"type":"string"},"end_time":{"type":"string"},"limit":{"type":"integer","allOf":[{"minimum":1,"maximum":100}]},"cursor":{"type":"string"},"filters":{"$ref":"#/components/schemas/LogFilters"}},"required":["start_time","end_time"],"additionalProperties":false,"title":"Log search parameters","examples":[{"start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","filters":{"service_name":"api","minimum_severity":17,"body_search":"checkout"},"limit":20}]},"LogIdEncoded":{"type":"string","title":"Public ID","description":"Opaque, prefixed public object ID (e.g. `log_YofPTrK9782DWwcnXhpcCw`). A reversible base58 encoding of the internal ID — treat it as an opaque string.","examples":["log_YofPTrK9782DWwcnXhpcCw"],"format":"maple.public_id"},"Log":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/LogIdEncoded"},"object":{"type":"string","enum":["log"]},"timestamp":{"type":"string"},"severity_text":{"type":"string"},"severity_number":{"$ref":"#/components/schemas/Union_12"},"service_name":{"type":"string"},"body":{"type":"string"},"trace_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_TraceId"},{"type":"null"}]},"span_id":{"anyOf":[{"$ref":"#/components/schemas/_maple_SpanId"},{"type":"null"}]},"log_attributes":{"$ref":"#/components/schemas/Objects_9"},"resource_attributes":{"$ref":"#/components/schemas/Objects_9"}},"required":["id","object","timestamp","severity_text","severity_number","service_name","body","trace_id","span_id","log_attributes","resource_attributes"],"additionalProperties":false,"title":"Log","description":"An OpenTelemetry log record."},"LogList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Log"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Log list","description":"Cursor-paginated list envelope wrapping a page of objects."},"LogTimeseriesParams":{"type":"object","properties":{"start_time":{"type":"string"},"end_time":{"type":"string"},"aggregation":{"type":"string","enum":["count"]},"filters":{"$ref":"#/components/schemas/LogFilters"},"group_by":{"type":"string","enum":["service","severity"]},"bucket_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"series_limit":{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100}]}},"required":["start_time","end_time","aggregation"],"additionalProperties":false,"title":"Log timeseries parameters","examples":[{"start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","aggregation":"count","filters":{"minimum_severity":17},"group_by":"severity"}]},"LogTimeseriesResult":{"type":"object","properties":{"object":{"type":"string","enum":["log_timeseries"]},"aggregation":{"type":"string","enum":["count"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"bucket_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"group_by":{"$ref":"#/components/schemas/Union_32"},"series":{"$ref":"#/components/schemas/Arrays_19"}},"required":["object","aggregation","start_time","end_time","bucket_seconds","group_by","series"],"additionalProperties":false,"title":"Log timeseries result","examples":[{"object":"log_timeseries","aggregation":"count","start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","bucket_seconds":60,"group_by":null,"series":[{"group":null,"points":[{"timestamp":"2026-07-15T12:00:00.000Z","value":10}]}]}]},"LogQueryInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/LogQueryInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["log_query_invalid"]},"title":{"type":"string","enum":["Invalid log query"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid log query","description":"The @maple/http/v2/LogQueryInvalidError failure. HTTP 400."},"LogBreakdownParams":{"type":"object","properties":{"start_time":{"type":"string"},"end_time":{"type":"string"},"aggregation":{"type":"string","enum":["count"]},"filters":{"$ref":"#/components/schemas/LogFilters"},"group_by":{"type":"string","enum":["service","severity"]},"limit":{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100}]}},"required":["start_time","end_time","aggregation","group_by"],"additionalProperties":false,"title":"Log breakdown parameters","examples":[{"start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","aggregation":"count","group_by":"service","limit":20}]},"LogBreakdownResult":{"type":"object","properties":{"object":{"type":"string","enum":["log_breakdown"]},"aggregation":{"type":"string","enum":["count"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"group_by":{"type":"string"},"data":{"$ref":"#/components/schemas/Arrays_20"}},"required":["object","aggregation","start_time","end_time","group_by","data"],"additionalProperties":false,"title":"Log breakdown result","examples":[{"object":"log_breakdown","aggregation":"count","start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","group_by":"severity","data":[{"name":"ERROR","value":10}]}]},"LogIdInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/LogIdInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["log_id_invalid"]},"title":{"type":"string","enum":["Invalid log ID"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid log ID","description":"The @maple/http/v2/LogIdInvalidError failure. HTTP 400."},"LogNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/LogNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["log_not_found"]},"title":{"type":"string","enum":["Log not found"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Log not found","description":"The @maple/http/v2/LogNotFoundError failure. HTTP 404."},"_maple_MetricName":{"type":"string","title":"Metric Name"},"Metric":{"type":"object","properties":{"object":{"type":"string","enum":["metric"]},"name":{"$ref":"#/components/schemas/_maple_MetricName"},"type":{"type":"string"},"service_name":{"type":"string"},"description":{"type":"string"},"unit":{"type":"string"},"is_monotonic":{"type":"boolean"},"data_point_count":{"$ref":"#/components/schemas/Union_12"},"first_seen":{"type":"string"},"last_seen":{"type":"string"}},"required":["object","name","type","service_name","description","unit","is_monotonic","data_point_count","first_seen","last_seen"],"additionalProperties":false,"title":"Metric","description":"A metric catalog entry."},"MetricList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Metric"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Metric list","description":"Cursor-paginated list envelope wrapping a page of objects."},"MetricFilters":{"type":"object","properties":{"metric_name":{"$ref":"#/components/schemas/_maple_MetricName"},"metric_type":{"type":"string","enum":["sum","gauge","histogram","exponential_histogram"]},"service_name":{"$ref":"#/components/schemas/_maple_ServiceName"}},"required":["metric_name","metric_type"],"additionalProperties":false,"title":"Metric filters"},"MetricsTimeseriesParams":{"type":"object","properties":{"start_time":{"type":"string"},"end_time":{"type":"string"},"aggregation":{"type":"string","enum":["avg","sum","min","max","count","rate","increase"]},"filters":{"$ref":"#/components/schemas/MetricFilters"},"group_by":{"type":"string","enum":["service","attribute","resource_attribute"]},"group_by_attribute_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"group_by_resource_attribute_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"bucket_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"series_limit":{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100}]}},"required":["start_time","end_time","aggregation","filters"],"additionalProperties":false},"MetricTimeseriesResult":{"type":"object","properties":{"object":{"type":"string","enum":["metric_timeseries"]},"aggregation":{"type":"string","enum":["avg","sum","min","max","count","rate","increase"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"bucket_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0}]},"group_by":{"$ref":"#/components/schemas/Union_32"},"series":{"$ref":"#/components/schemas/Arrays_19"}},"required":["object","aggregation","start_time","end_time","bucket_seconds","group_by","series"],"additionalProperties":false,"title":"Metric timeseries result","examples":[{"object":"metric_timeseries","aggregation":"avg","start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","bucket_seconds":60,"group_by":"service","series":[{"group":"api","points":[{"timestamp":"2026-07-15T12:00:00.000Z","value":42}]}]}]},"MetricQueryInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/MetricQueryInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["metric_query_invalid"]},"title":{"type":"string","enum":["Invalid metric query"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid metric query","description":"The @maple/http/v2/MetricQueryInvalidError failure. HTTP 400."},"MetricsBreakdownParams":{"type":"object","properties":{"start_time":{"type":"string"},"end_time":{"type":"string"},"aggregation":{"type":"string","enum":["avg","sum","count"]},"filters":{"$ref":"#/components/schemas/MetricFilters"},"group_by":{"type":"string","enum":["service","attribute","resource_attribute"]},"group_by_attribute_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"group_by_resource_attribute_key":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$"}]},"limit":{"type":"integer","allOf":[{"exclusiveMinimum":0},{"maximum":100}]}},"required":["start_time","end_time","aggregation","filters","group_by"],"additionalProperties":false},"MetricBreakdownResult":{"type":"object","properties":{"object":{"type":"string","enum":["metric_breakdown"]},"aggregation":{"type":"string","enum":["avg","sum","count"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"group_by":{"type":"string"},"data":{"$ref":"#/components/schemas/Arrays_20"}},"required":["object","aggregation","start_time","end_time","group_by","data"],"additionalProperties":false,"title":"Metric breakdown result","examples":[{"object":"metric_breakdown","aggregation":"sum","start_time":"2026-07-15T12:00:00.000Z","end_time":"2026-07-15T13:00:00.000Z","group_by":"service","data":[{"name":"api","value":420}]}]},"Service":{"type":"object","properties":{"object":{"type":"string","enum":["service"]},"name":{"$ref":"#/components/schemas/_maple_ServiceName"},"service_namespaces":{"type":"array","items":{"type":"string"}},"deployment_environments":{"type":"array","items":{"type":"string"}},"throughput":{"$ref":"#/components/schemas/Union_12"},"traced_throughput":{"$ref":"#/components/schemas/Union_12"},"span_count":{"$ref":"#/components/schemas/Union_12"},"error_count":{"$ref":"#/components/schemas/Union_12"},"error_rate":{"$ref":"#/components/schemas/Union_12"},"p50_latency_ms":{"$ref":"#/components/schemas/Union_12"},"p95_latency_ms":{"$ref":"#/components/schemas/Union_12"},"p99_latency_ms":{"$ref":"#/components/schemas/Union_12"},"has_sampling":{"type":"boolean"},"sampling_weight":{"$ref":"#/components/schemas/Union_12"},"baseline_p95_latency_ms":{"$ref":"#/components/schemas/Union_10"},"baseline_span_count":{"$ref":"#/components/schemas/Union_10"}},"required":["object","name","service_namespaces","deployment_environments","throughput","traced_throughput","span_count","error_count","error_rate","p50_latency_ms","p95_latency_ms","p99_latency_ms","has_sampling","sampling_weight"],"additionalProperties":false,"title":"Service","description":"An observed service aggregated by service name."},"ServiceList":{"type":"object","properties":{"object":{"type":"string","enum":["list"],"description":"Always `\"list\"` for a list response.","examples":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Service"},"description":"The page of objects, in the ordering documented by the endpoint."},"has_more":{"type":"boolean","description":"Whether more objects exist after this page. When `true`, use `next_cursor` to fetch them.","examples":[true]},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Cursor for the next page, or `null` on the last page. Pass it back as the `cursor` query param.","examples":["off_1k"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false,"title":"Service list","description":"Cursor-paginated list envelope wrapping a page of objects."},"ServiceNotFoundError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/v2/ServiceNotFoundError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["not_found_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["service_not_found"]},"title":{"type":"string","enum":["Service not found"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["none"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Service not found","description":"The @maple/http/v2/ServiceNotFoundError failure. HTTP 404."},"ServiceMapEdge":{"type":"object","properties":{"object":{"type":"string","enum":["service_map.edge"]},"source_service":{"type":"string"},"target_service":{"type":"string"},"call_count":{"$ref":"#/components/schemas/Union_12"},"estimated_call_count":{"$ref":"#/components/schemas/Union_12"},"error_count":{"$ref":"#/components/schemas/Union_12"},"error_rate":{"$ref":"#/components/schemas/Union_12"},"avg_duration_ms":{"$ref":"#/components/schemas/Union_12"},"max_duration_ms":{"$ref":"#/components/schemas/Union_12"},"has_sampling":{"type":"boolean"},"sampling_weight":{"$ref":"#/components/schemas/Union_12"}},"required":["object","source_service","target_service","call_count","estimated_call_count","error_count","error_rate","avg_duration_ms","max_duration_ms","has_sampling","sampling_weight"],"additionalProperties":false,"title":"Service map edge"},"ServiceMap":{"type":"object","properties":{"object":{"type":"string","enum":["service_map"]},"start_time":{"type":"string"},"end_time":{"type":"string"},"edges":{"type":"array","items":{"$ref":"#/components/schemas/ServiceMapEdge"}}},"required":["object","start_time","end_time","edges"],"additionalProperties":false,"title":"Service map"},"_maple_ShareToken":{"type":"string","allOf":[{"minLength":8},{"maxLength":128},{"pattern":"^[A-Za-z0-9_-]+$","title":"Dashboard share token"}]},"ShareResolveRequest":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/_maple_ShareToken"}},"required":["token"],"additionalProperties":false},"SharedDashboardResponseEncoded":{"type":"object","properties":{"mode":{"$ref":"#/components/schemas/Union_16"},"scope":{"type":"string","enum":["dashboard","widget"]},"dashboard":{},"limits":{"type":"object","properties":{"maxRangeSeconds":{"$ref":"#/components/schemas/Union_12"},"maxListRangeSeconds":{"$ref":"#/components/schemas/Union_12"}},"required":["maxRangeSeconds","maxListRangeSeconds"],"additionalProperties":false},"embeddable":{"type":"boolean"}},"required":["mode","scope","dashboard","limits","embeddable"],"additionalProperties":false},"ShareSignInRequiredError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ShareSignInRequiredError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["permission_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["share_signin_required"]},"title":{"type":"string","enum":["Sign-in required"]},"message":{"type":"string","enum":["This dashboard is shared with its organization only."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["reauthenticate"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Sign-in required","description":"The @maple/http/errors/ShareSignInRequiredError failure. HTTP 403."},"ShareWrongOrgError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ShareWrongOrgError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["permission_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["share_wrong_org"]},"title":{"type":"string","enum":["Wrong organization"]},"message":{"type":"string","enum":["This dashboard belongs to a different organization."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["request_access"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Wrong organization","description":"The @maple/http/errors/ShareWrongOrgError failure. HTTP 403."},"ShareRateLimitedError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ShareRateLimitedError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["rate_limit_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["share_rate_limited"]},"title":{"type":"string","enum":["Too many requests"]},"message":{"type":"string","enum":["This shared dashboard is receiving too many requests. Try again shortly."]},"retryable":{"type":"boolean","enum":[true]},"recovery":{"type":"string","enum":["retry"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Too many requests","description":"The @maple/http/errors/ShareRateLimitedError failure. HTTP 429."},"ShareWidgetDataRequest":{"type":"object","properties":{"widgetId":{"type":"string"},"source":{"type":"string","enum":["primary","sparkline"]},"maxDataPoints":{"type":"integer","allOf":[{"exclusiveMinimum":0}]}},"required":["widgetId"],"additionalProperties":false,"title":"Shared widget data request"},"ShareTimeRange":{"type":"object","properties":{"startTime":{"type":"string"},"endTime":{"type":"string"}},"required":["startTime","endTime"],"additionalProperties":false,"title":"Shared dashboard time range"},"ShareWidgetDataPayload":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/_maple_ShareToken"},"requests":{"type":"array","items":{"$ref":"#/components/schemas/ShareWidgetDataRequest"},"allOf":[{"minItems":1},{"maxItems":4}]},"timeRange":{"$ref":"#/components/schemas/ShareTimeRange"},"variableValues":{"type":"object","additionalProperties":{"type":"string"}}},"required":["token","requests","timeRange"],"additionalProperties":false},"ShareWidgetDataOutcome":{"anyOf":[{"type":"object","properties":{"widgetId":{"type":"string"},"ok":{"type":"boolean","enum":[true]},"data":{},"narrowedToSeconds":{"$ref":"#/components/schemas/Union_10"}},"required":["widgetId","ok","data"],"additionalProperties":false},{"type":"object","properties":{"widgetId":{"type":"string"},"ok":{"type":"boolean","enum":[false]},"reason":{"type":"string","enum":["unsupported","not_found","failed"]},"message":{"type":"string"}},"required":["widgetId","ok","reason","message"],"additionalProperties":false}]},"ShareWidgetDataResponseEncoded":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/ShareWidgetDataOutcome"}},"variables":{"type":"object","additionalProperties":{"type":"string"}}},"required":["results"],"additionalProperties":false},"ShareRangeInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ShareRangeInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["share_range_invalid"]},"title":{"type":"string","enum":["Invalid time range"]},"message":{"type":"string","description":"Human-readable explanation for people, not programmatic branching."},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid time range","description":"The @maple/http/errors/ShareRangeInvalidError failure. HTTP 400."},"ShareVariableInvalidError":{"type":"object","properties":{"error":{"type":"object","properties":{"_tag":{"type":"string","enum":["@maple/http/errors/ShareVariableInvalidError"],"description":"Stable semantic error tag. Branch on this exact value."},"type":{"type":"string","enum":["invalid_request_error"],"description":"Broad error category shared by related semantic tags."},"code":{"type":"string","enum":["share_variable_invalid"]},"title":{"type":"string","enum":["Invalid variable value"]},"message":{"type":"string","enum":["That value isn't allowed for this dashboard variable."]},"retryable":{"type":"boolean","enum":[false]},"recovery":{"type":"string","enum":["fix_request"]},"retry_after_seconds":{"type":"integer","allOf":[{"exclusiveMinimum":0,"description":"Minimum delay before retrying, mirrored in the Retry-After header."}]},"retry_at":{"type":"string"},"param":{"type":"string","description":"Request parameter associated with the failure."}},"required":["_tag","type","code","title","message","retryable","recovery"],"additionalProperties":false}},"required":["error"],"additionalProperties":false,"title":"Invalid variable value","description":"The @maple/http/errors/ShareVariableInvalidError failure. HTTP 400."},"ShareOgMetaRequest":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/_maple_ShareToken"}},"required":["token"],"additionalProperties":false},"ShareOgMetaResponseEncoded":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"imagePath":{"type":"string"}},"required":["title","description","imagePath"],"additionalProperties":false},"_maple_ShareOgId":{"type":"string","allOf":[{"minLength":3},{"maxLength":256,"title":"Share preview image id"}]},"ShareOgCardRequest":{"type":"object","properties":{"ogId":{"$ref":"#/components/schemas/_maple_ShareOgId"}},"required":["ogId"],"additionalProperties":false},"ShareOgCardOrg":{"type":"object","properties":{"name":{"type":"string"},"imageUrl":{"type":"string"}},"required":["name"],"additionalProperties":false},"ShareOgCardTile":{"type":"object","properties":{"x":{"$ref":"#/components/schemas/Union_12"},"y":{"$ref":"#/components/schemas/Union_12"},"w":{"$ref":"#/components/schemas/Union_12"},"h":{"$ref":"#/components/schemas/Union_12"},"title":{"type":"string"},"section":{"type":"string"},"visualization":{"type":"string"}},"required":["x","y","w","h","visualization"],"additionalProperties":false},"ShareOgCardResponseEncoded":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"org":{"$ref":"#/components/schemas/ShareOgCardOrg"},"widgetCount":{"$ref":"#/components/schemas/Union_12"},"tiles":{"type":"array","items":{"$ref":"#/components/schemas/ShareOgCardTile"}}},"required":["title","widgetCount","tiles"],"additionalProperties":false},"AlertChartId":{"type":"string","allOf":[{"minLength":3},{"maxLength":1024}]},"AlertChartRequest":{"type":"object","properties":{"chartId":{"$ref":"#/components/schemas/AlertChartId"}},"required":["chartId"],"additionalProperties":false},"AlertChartUnit":{"type":"string","enum":["number","percent","duration_ms","bytes","requests_per_sec"]},"AlertChartPoint":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/Union_12"},{"$ref":"#/components/schemas/Union_12"}],"maxItems":2,"minItems":2},"AlertChartBreachSide":{"type":"string","enum":["above","below","none"]},"AlertChartResponseEncoded":{"type":"object","properties":{"title":{"type":"string"},"unit":{"$ref":"#/components/schemas/AlertChartUnit"},"kind":{"type":"string","enum":["line","area","bar"]},"points":{"type":"array","items":{"$ref":"#/components/schemas/AlertChartPoint"}},"threshold":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"breachSide":{"$ref":"#/components/schemas/AlertChartBreachSide"}},"required":["title","unit","kind","points","threshold","breachSide"],"additionalProperties":false},"_maple_OrgId_1":{"type":"string","allOf":[{"minLength":1},{"pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","title":"Org ID"}]},"WidgetSummaryIssue":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/_maple_ErrorIssueId"},"exception_type":{"type":"string"},"error_label":{"type":"string"},"exception_message":{"type":"string"},"service_name":{"type":"string"},"severity":{"anyOf":[{"$ref":"#/components/schemas/_maple_IssueSeverity"},{"type":"null"}]},"occurrence_count":{"$ref":"#/components/schemas/Union_12"},"last_seen_at":{"type":"string"},"is_regressed":{"type":"boolean"},"has_open_incident":{"type":"boolean"}},"required":["id","exception_type","error_label","exception_message","service_name","severity","occurrence_count","last_seen_at","is_regressed","has_open_incident"],"additionalProperties":false,"title":"Widget summary issue","description":"One ongoing error issue, reduced to what a Home Screen row can render."},"WidgetSummaryIssues":{"type":"object","properties":{"window_seconds":{"$ref":"#/components/schemas/Union_12"},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WidgetSummaryIssue"}}},"required":["window_seconds","has_more","data"],"additionalProperties":false,"title":"Widget summary issues"},"WidgetSummaryService":{"type":"object","properties":{"name":{"$ref":"#/components/schemas/_maple_ServiceName"},"throughput_per_second":{"$ref":"#/components/schemas/Union_12"},"error_rate":{"$ref":"#/components/schemas/Union_12"},"p95_latency_ms":{"$ref":"#/components/schemas/Union_12"},"points":{"type":"array","items":{"$ref":"#/components/schemas/Union_12"}}},"required":["name","throughput_per_second","error_rate","p95_latency_ms","points"],"additionalProperties":false,"title":"Widget summary service","description":"One service's traffic over the throughput window."},"WidgetSummaryThroughput":{"type":"object","properties":{"window_seconds":{"$ref":"#/components/schemas/Union_12"},"bucket_seconds":{"anyOf":[{"$ref":"#/components/schemas/Union_12"},{"type":"null"}]},"services":{"type":"array","items":{"$ref":"#/components/schemas/WidgetSummaryService"}},"total_points":{"type":"array","items":{"$ref":"#/components/schemas/Union_12"}}},"required":["window_seconds","bucket_seconds","services","total_points"],"additionalProperties":false,"title":"Widget summary throughput"},"WidgetSummary":{"type":"object","properties":{"object":{"type":"string","enum":["widget_summary"],"description":"The object type — always `\"widget_summary\"`."},"schema_version":{"anyOf":[{"type":"number"},{"$ref":"#/components/schemas/Union_11"}]},"generated_at":{"type":"string"},"organization_id":{"$ref":"#/components/schemas/_maple_OrgId_1"},"issues":{"$ref":"#/components/schemas/WidgetSummaryIssues"},"throughput":{"$ref":"#/components/schemas/WidgetSummaryThroughput"}},"required":["object","schema_version","generated_at","organization_id","issues","throughput"],"additionalProperties":false,"title":"Widget summary","description":"Everything the Maple iOS Home Screen widgets draw, in one response: ongoing error issues over the last day, and per-service traffic over the last hour.","examples":[{"object":"widget_summary","schema_version":1,"generated_at":"2026-08-21T09:10:00.000Z","organization_id":"org_2abcDEF","issues":{"window_seconds":86400,"has_more":false,"data":[{"id":"iss_YofPTrK9782DWwcnXhpcCw","exception_type":"TypeError","error_label":"checkout","exception_message":"Cannot read properties of undefined","service_name":"api","severity":"critical","occurrence_count":412,"last_seen_at":"2026-08-21T09:08:12.000Z","is_regressed":false,"has_open_incident":true}]},"throughput":{"window_seconds":3600,"bucket_seconds":300,"services":[{"name":"api","throughput_per_second":12.5,"error_rate":0.012,"p95_latency_ms":184,"points":[3600,3720,3540]}],"total_points":[5200,5310,5180]}}]},"WidgetCredential":{"type":"object","properties":{"object":{"type":"string","enum":["widget_credential"],"description":"The object type — always `\"widget_credential\"`."},"secret":{"type":"string","description":"The bearer token, shown once. Store it where only this installation can read it, and send it nowhere but Maple."},"organization_id":{"$ref":"#/components/schemas/_maple_OrgId_1"},"scopes":{"type":"array","items":{"type":"string"},"description":"Fixed by the server. Today, exactly `widget_summary:read`."},"expires_at":{"type":"string"},"created_at":{"type":"string"}},"required":["object","secret","organization_id","scopes","expires_at","created_at"],"additionalProperties":false,"title":"Widget credential","description":"A read-only, expiring credential for one app installation's Home Screen widgets. Minting is idempotent per installation: the previous credential is revoked in the same transaction.","examples":[{"object":"widget_credential","secret":"maple_ak_1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f7081","organization_id":"org_2abcDEF","scopes":["widget_summary:read"],"expires_at":"2026-09-20T09:10:00.000Z","created_at":"2026-08-21T09:10:00.000Z"}]},"WidgetCredentialDeleteResponse":{"type":"object","properties":{"object":{"type":"string","enum":["widget_credential"]},"deleted":{"type":"boolean","enum":[true]}},"required":["object","deleted"],"additionalProperties":false,"title":"Widget credential delete response"}},"securitySchemes":{"bearer":{"description":"Authenticate every request with a Bearer token: `Authorization: Bearer <token>`. Accepts a Maple API key (`maple_ak_…`) or a dashboard session token (Clerk / self-hosted JWT). API keys may be restricted with scopes — see the `Scope` schema.","type":"http","scheme":"Bearer","bearerFormat":"maple_ak_… API key or session JWT"}}},"security":[],"tags":[{"name":"API Keys","description":"Programmatic credentials for the Maple API. Create scoped keys, list and retrieve them, roll their secrets, and revoke them. Creating, rolling, and revoking keys is admin-only; a key's `secret` is returned only when it is created or rolled."},{"name":"Dashboards","description":"Create and manage dashboards, browse version history, restore snapshots, and instantiate built-in templates."},{"name":"Alert Rules","description":"Monitors over your telemetry: error rate, latency percentiles, Apdex, throughput, metrics, query-builder queries, and raw SQL. Rules evaluate on a rolling window, open incidents after consecutive breaches, and notify their alert destinations. Mutations are admin-only."},{"name":"Alert Deliveries","description":"Read-only notification delivery history for alert rules."},{"name":"Alert Destinations","description":"Notification channels for alert rules — Slack bot, PagerDuty, generic webhooks, Hazel OAuth, Discord, Telegram, and workspace-member email. Create and manage destinations, then reference them from alert rules via `destination_ids`. Mutations are admin-only; channel secrets are write-only."},{"name":"Alert Incidents","description":"The incident history produced by your alert rules. Incidents open when a rule breaches for enough consecutive checks and resolve automatically once the signal recovers — this surface is read-only."},{"name":"Ingest Keys","description":"Telemetry ingest credentials for your organization: a public key for client-side senders and a private key for server-side senders. Retrieve them or roll either key. All operations are admin-only."},{"name":"Slack Integration","description":"Install and manage the Maple Slack app for your organization: begin an OAuth install, read installation status, list channels, and uninstall."},{"name":"PlanetScale Integration","description":"Connect PlanetScale to your organization and manage what Maple collects from it: connection status, organization binding, the metrics service token that enables branch-metrics scraping, the database inventory, webhook setup, query insights, and the lifecycle event timeline."},{"name":"Error Issues","description":"Deduplicated errors and alert-backed issues tracked through Maple's triage workflow."},{"name":"Attribute Mappings","description":"Ingest-time attribute rewrite rules. Move or copy span/resource attribute values to new keys as telemetry arrives, normalizing naming across services without redeploying them."},{"name":"Scrape Targets","description":"Metrics endpoints Maple scrapes on a schedule — self-hosted Prometheus endpoints and PlanetScale branch metrics. Manage targets, probe them on demand, and inspect recent scrape checks. Credentials are write-only."},{"name":"Instrumentation Recommendations","description":"Automatically detected instrumentation improvements — attribute renames toward canonical semantic conventions, double emissions, and naming violations. List them, and dismiss or reopen individual recommendations."},{"name":"Setup Audit","description":"A health check for your Maple setup — what you are ingesting, whether alerts can reach you, and whether your telemetry follows the conventions Maple's features depend on."},{"name":"Investigations","description":"Durable investigation war-rooms — autonomous or human-opened diagnostic sessions over incidents and ad-hoc questions, each carrying its structured AI diagnosis."},{"name":"Anomalies","description":"Baseline-detected anomalies on monitored signals — list and inspect incidents, resolve them, link error issues, and manage detector settings."},{"name":"Organization","description":"The authenticated organization's identity."},{"name":"Mobile Devices","description":"Push-notification registrations for the native apps. Per user, per organization."},{"name":"Session Replays","description":"Recorded browser sessions — search them, retrieve detail, stream rrweb event chunks, read the distilled transcript, and reverse-correlate from a trace."},{"name":"Traces","description":"Search and inspect distributed traces."},{"name":"Logs","description":"Search and retrieve OpenTelemetry logs."},{"name":"Metrics","description":"Browse and query OpenTelemetry metrics."},{"name":"Services","description":"Observed service health summaries."},{"name":"Service Map","description":"Service-to-service topology."},{"name":"Shares","description":"Read a dashboard through a share link. The only unauthenticated group in this API: the token in the request body is the credential, so these operations resolve for a viewer with no Maple account."},{"name":"Widget Summary","description":"The single read behind the Maple mobile Home Screen widgets. Deliberately its own scope family so a device credential can be fenced to it alone."},{"name":"Widget Credentials","description":"Device-scoped, read-only credentials for the Maple mobile Home Screen widgets. Minted by a signed-in app for one installation at a time."}],"servers":[{"url":"https://api.maple.dev","description":"Production"}],"externalDocs":{"url":"https://api.maple.dev/v2/docs","description":"Interactive Maple API reference"}}
