{
  "openapi": "3.1.0",
  "info": {
    "title": "Colossium API",
    "version": "1",
    "description": "Manage Colossium projects, resources and requests with an organisation API token. Create tokens in the console under API access."
  },
  "servers": [
    {
      "url": "https://api.colossium.cloud/v1"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "token"
    },
    {
      "name": "organisation"
    },
    {
      "name": "projects"
    },
    {
      "name": "resources"
    },
    {
      "name": "requests"
    },
    {
      "name": "audit events"
    }
  ],
  "paths": {
    "/token/verify": {
      "get": {
        "operationId": "verifyToken",
        "summary": "Check a token",
        "description": "Returns what the token is and what it can do right now. Its effective scopes are its granted scopes limited to what its creator’s role allows today.",
        "tags": [
          "token"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "The token is valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenInfo"
                }
              }
            }
          },
          "401": {
            "description": "The token is missing, invalid, revoked or expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": null
      }
    },
    "/organisation": {
      "get": {
        "operationId": "getOrganisation",
        "summary": "Get the organisation",
        "description": "The organisation the token belongs to.\n\nRequires the `resource.read` scope.",
        "tags": [
          "organisation"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "The organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Organisation"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "resource.read"
      }
    },
    "/projects": {
      "get": {
        "operationId": "listProjects",
        "summary": "List projects",
        "description": "Projects in the organisation, newest first. A token limited to some projects sees only those.\n\nRequires the `resource.read` scope.",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many items to return, 1 to 100. Default 25.",
            "schema": {
              "type": "integer",
              "description": "How many items to return, 1 to 100. Default 25."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The next_cursor from the previous page.",
            "schema": {
              "type": "string",
              "description": "The next_cursor from the previous page."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectPage"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "resource.read"
      },
      "post": {
        "operationId": "createProject",
        "summary": "Create a project",
        "description": "Creates a project. A token that is limited to some projects cannot create new ones.\n\nRequires the `project.write` scope.",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "slug"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "2 to 60 characters."
                  },
                  "slug": {
                    "type": "string",
                    "description": "Lower case letters, numbers and single hyphens, 2 to 48 characters. Unique in the organisation."
                  },
                  "description": {
                    "type": "string",
                    "description": "Up to 280 characters."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "400": {
            "description": "The body is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token cannot create projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The slug is taken.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "project.write"
      }
    },
    "/projects/{id}": {
      "get": {
        "operationId": "getProject",
        "summary": "Get a project",
        "description": "One project.\n\nRequires the `resource.read` scope.",
        "tags": [
          "projects"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project"
                }
              }
            }
          },
          "404": {
            "description": "No such project, or the token may not see it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "resource.read"
      }
    },
    "/resources": {
      "get": {
        "operationId": "listResources",
        "summary": "List resources",
        "description": "Domains, functions, databases and buckets the organisation owns, newest first.\n\nRequires the `resource.read` scope.",
        "tags": [
          "resources"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many items to return, 1 to 100. Default 25.",
            "schema": {
              "type": "integer",
              "description": "How many items to return, 1 to 100. Default 25."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The next_cursor from the previous page.",
            "schema": {
              "type": "string",
              "description": "The next_cursor from the previous page."
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "description": "Only resources in this project.",
            "schema": {
              "type": "string",
              "description": "Only resources in this project."
            }
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "description": "Only this service, for example databases.",
            "schema": {
              "type": "string",
              "description": "Only this service, for example databases."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of resources.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourcePage"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "resource.read"
      }
    },
    "/resources/{id}": {
      "get": {
        "operationId": "getResource",
        "summary": "Get a resource",
        "description": "One resource.\n\nRequires the `resource.read` scope.",
        "tags": [
          "resources"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Resource"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or the token may not see it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "resource.read"
      }
    },
    "/requests": {
      "get": {
        "operationId": "listRequests",
        "summary": "List requests",
        "description": "Requests for services, newest first.\n\nRequires the `resource.read` scope.",
        "tags": [
          "requests"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many items to return, 1 to 100. Default 25.",
            "schema": {
              "type": "integer",
              "description": "How many items to return, 1 to 100. Default 25."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The next_cursor from the previous page.",
            "schema": {
              "type": "string",
              "description": "The next_cursor from the previous page."
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "awaiting_approval, queued, running, awaiting_verification, succeeded, failed or cancelled.",
            "schema": {
              "type": "string",
              "description": "awaiting_approval, queued, running, awaiting_verification, succeeded, failed or cancelled."
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "For example databases.create.",
            "schema": {
              "type": "string",
              "description": "For example databases.create."
            }
          },
          {
            "name": "project_id",
            "in": "query",
            "required": false,
            "description": "Only requests in this project.",
            "schema": {
              "type": "string",
              "description": "Only requests in this project."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestPage"
                }
              }
            }
          },
          "400": {
            "description": "A parameter is not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "resource.read"
      },
      "post": {
        "operationId": "createRequest",
        "summary": "Make a request",
        "description": "Asks for a service to be created or changed. It goes through the same checks as a request made in the console and then waits for approval. A request with a kind that ends in .delete needs the resource.destroy scope.\n\nRequires the `resource.write` scope.",
        "tags": [
          "requests"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "8 to 120 characters. Repeating a request with the same key returns the original, with status 200 and the header Idempotent-Replayed: true.",
            "schema": {
              "type": "string",
              "description": "8 to 120 characters. Repeating a request with the same key returns the original, with status 200 and the header Idempotent-Replayed: true."
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "input"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "description": "One of dns.domain.add, dns.record.create, dns.record.delete, functions.create, functions.update, functions.delete, databases.create, databases.delete, storage.create, storage.delete. The input each one needs is in the Requests guide."
                  },
                  "project_id": {
                    "type": "string",
                    "description": "The project it belongs to. Required for a token limited to some projects."
                  },
                  "input": {
                    "type": "object",
                    "description": "What the kind needs, for example { \"name\": \"orders\", \"region\": \"eu\" } for databases.create. It is checked before the request is accepted, and a problem is reported field by field."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A repeat of an earlier request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Request"
                }
              }
            }
          },
          "201": {
            "description": "Accepted and waiting for approval.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Request"
                }
              }
            }
          },
          "400": {
            "description": "The request is not valid, or the Idempotency-Key is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks the scope, or may not use the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "A plan limit has been reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "resource.write"
      }
    },
    "/requests/{id}": {
      "get": {
        "operationId": "getRequest",
        "summary": "Get a request",
        "description": "One request with its progress events.\n\nRequires the `resource.read` scope.",
        "tags": [
          "requests"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestWithEvents"
                }
              }
            }
          },
          "404": {
            "description": "No such request, or the token may not see it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "resource.read"
      }
    },
    "/requests/{id}/cancel": {
      "post": {
        "operationId": "cancelRequest",
        "summary": "Cancel a request",
        "description": "Withdraws a request that is awaiting approval or queued. One that has started cannot be cancelled.\n\nRequires the `resource.write` scope.",
        "tags": [
          "requests"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Request"
                }
              }
            }
          },
          "404": {
            "description": "No such request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "It has already started or finished.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "resource.write"
      }
    },
    "/audit-events": {
      "get": {
        "operationId": "listAuditEvents",
        "summary": "List audit events",
        "description": "The organisation’s audit log, newest first. A token limited to some projects cannot read it.\n\nRequires the `audit.read` scope.",
        "tags": [
          "audit events"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "How many items to return, 1 to 100. Default 25.",
            "schema": {
              "type": "integer",
              "description": "How many items to return, 1 to 100. Default 25."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The next_cursor from the previous page.",
            "schema": {
              "type": "string",
              "description": "The next_cursor from the previous page."
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "description": "Only this action, for example api_token.create.",
            "schema": {
              "type": "string",
              "description": "Only this action, for example api_token.create."
            }
          },
          {
            "name": "outcome",
            "in": "query",
            "required": false,
            "description": "success, denied or failure.",
            "schema": {
              "type": "string",
              "description": "success, denied or failure."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuditEventPage"
                }
              }
            }
          },
          "403": {
            "description": "The token lacks audit.read, or is limited to some projects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "x-required-scope": "audit.read"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "clsm_ token",
        "description": "Send \"Authorization: Bearer clsm_...\". Scopes: resource.read, resource.write, resource.destroy, project.write, billing.read, audit.read."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "request_id",
              "doc_url"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "missing_token",
                  "invalid_token",
                  "token_revoked",
                  "token_expired",
                  "token_in_url",
                  "ip_not_allowed",
                  "organisation_closed",
                  "insufficient_scope",
                  "project_not_allowed",
                  "invalid_request",
                  "idempotency_key_required",
                  "not_found",
                  "conflict",
                  "quota_exceeded",
                  "rate_limited",
                  "unavailable",
                  "internal_error"
                ]
              },
              "message": {
                "type": "string"
              },
              "request_id": {
                "type": "string",
                "description": "Quote this when you contact support."
              },
              "doc_url": {
                "type": "string",
                "description": "A page that explains this error and what to do about it."
              },
              "details": {
                "type": "object"
              }
            }
          }
        }
      },
      "TokenInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "organisation_id": {
            "type": "string",
            "format": "uuid"
          },
          "token": {
            "type": "string",
            "description": "The token prefix and last four characters."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What the token can do now."
          },
          "granted_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "project_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Organisation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Resource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "service": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "observed_status": {
            "type": "string"
          },
          "drift": {
            "type": "boolean"
          },
          "last_observed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Request": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "kind": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "input": {
            "type": "object"
          },
          "failure": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "RequestWithEvents": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Request"
          },
          {
            "type": "object",
            "properties": {
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "AuditEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "actor_kind": {
            "type": "string"
          },
          "actor_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "action": {
            "type": "string"
          },
          "target_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "target_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "outcome": {
            "type": "string"
          },
          "detail": {
            "type": "object"
          }
        }
      },
      "ProjectPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Project"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as ?cursor= for the next page. Null on the last page."
          }
        }
      },
      "ResourcePage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Resource"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as ?cursor= for the next page. Null on the last page."
          }
        }
      },
      "RequestPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Request"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as ?cursor= for the next page. Null on the last page."
          }
        }
      },
      "AuditEventPage": {
        "type": "object",
        "required": [
          "data",
          "next_cursor"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditEvent"
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as ?cursor= for the next page. Null on the last page."
          }
        }
      }
    }
  }
}