{
  "schemaVersion": 1,
  "operation": {
    "operationId": "getCapabilities",
    "method": "GET",
    "path": "/api/v1/capabilities",
    "summary": "Describe server capabilities",
    "description": "",
    "tags": [
      "System"
    ],
    "effect": "read",
    "confirmation": "never",
    "authorization": {
      "mode": "privilege",
      "privilege": "USE_WORKSPACE"
    },
    "parameters": [],
    "responses": [
      {
        "status": "200",
        "description": "The request has succeeded.",
        "content": [
          {
            "contentType": "application/json",
            "schema": {
              "$ref": "#/components/schemas/CapabilitiesResponse"
            }
          }
        ]
      },
      {
        "status": "400",
        "description": "The server could not understand the request due to invalid syntax.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "401",
        "description": "Access is unauthorized.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "403",
        "description": "Access is forbidden.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "404",
        "description": "The server cannot find the requested resource.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "409",
        "description": "The request conflicts with the current state of the server.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "412",
        "description": "Precondition failed.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "413",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "415",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "422",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "429",
        "description": "Client error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "500",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "502",
        "description": "Server error",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      },
      {
        "status": "503",
        "description": "Service unavailable.",
        "content": [
          {
            "contentType": "application/problem+json",
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          }
        ]
      }
    ]
  },
  "schemas": {
    "AuthenticationMode": {
      "enum": [
        "bearer"
      ],
      "example": "bearer",
      "type": "string"
    },
    "CapabilitiesResponse": {
      "example": {
        "apiVersion": "example",
        "authentication": [
          "bearer"
        ],
        "buildDevelopment": true,
        "buildDirty": true,
        "buildRevision": "example",
        "buildTime": "example",
        "buildVersion": "example",
        "environment": "example",
        "queryFormats": [
          "application/json"
        ],
        "uploadProtocols": [
          "tus"
        ],
        "visualization": {
          "renderers": [
            {
              "id": "echarts",
              "kinds": [
                "cartesian"
              ],
              "schemaVersion": 1,
              "version": "example"
            }
          ],
          "schemaVersion": 1
        }
      },
      "properties": {
        "apiVersion": {
          "example": "example",
          "type": "string"
        },
        "authentication": {
          "example": [
            "bearer"
          ],
          "items": {
            "$ref": "#/components/schemas/AuthenticationMode"
          },
          "type": "array"
        },
        "buildDevelopment": {
          "example": true,
          "type": "boolean"
        },
        "buildDirty": {
          "example": true,
          "type": "boolean"
        },
        "buildRevision": {
          "example": "example",
          "type": "string"
        },
        "buildTime": {
          "example": "example",
          "type": "string"
        },
        "buildVersion": {
          "example": "example",
          "type": "string"
        },
        "environment": {
          "example": "example",
          "type": "string"
        },
        "queryFormats": {
          "example": [
            "application/json"
          ],
          "items": {
            "$ref": "#/components/schemas/QueryFormat"
          },
          "type": "array"
        },
        "uploadProtocols": {
          "example": [
            "tus"
          ],
          "items": {
            "$ref": "#/components/schemas/UploadProtocol"
          },
          "type": "array"
        },
        "visualization": {
          "$ref": "#/components/schemas/VisualizationCapabilities"
        }
      },
      "required": [
        "apiVersion",
        "buildVersion",
        "buildRevision",
        "buildTime",
        "buildDirty",
        "buildDevelopment",
        "environment",
        "authentication",
        "queryFormats",
        "uploadProtocols",
        "visualization"
      ],
      "type": "object"
    },
    "ProblemDetails": {
      "example": {
        "code": "example",
        "detail": "example",
        "errors": [
          {
            "code": "example",
            "detail": "example",
            "field": "example"
          }
        ],
        "instance": "example",
        "requestId": "example",
        "status": 1,
        "title": "example",
        "type": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "errors": {
          "example": [
            {
              "code": "example",
              "detail": "example",
              "field": "example"
            }
          ],
          "items": {
            "$ref": "#/components/schemas/ProblemFieldError"
          },
          "type": "array"
        },
        "instance": {
          "example": "example",
          "type": "string"
        },
        "requestId": {
          "example": "example",
          "type": "string"
        },
        "status": {
          "example": 1,
          "format": "int32",
          "type": "integer"
        },
        "title": {
          "example": "example",
          "type": "string"
        },
        "type": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "type",
        "title",
        "status",
        "detail",
        "instance",
        "code",
        "requestId",
        "errors"
      ],
      "type": "object"
    },
    "ProblemFieldError": {
      "example": {
        "code": "example",
        "detail": "example",
        "field": "example"
      },
      "properties": {
        "code": {
          "example": "example",
          "type": "string"
        },
        "detail": {
          "example": "example",
          "type": "string"
        },
        "field": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "field",
        "code",
        "detail"
      ],
      "type": "object"
    },
    "QueryFormat": {
      "enum": [
        "application/json",
        "application/vnd.apache.arrow.stream"
      ],
      "example": "application/json",
      "type": "string"
    },
    "UploadProtocol": {
      "enum": [
        "tus",
        "s3_multipart"
      ],
      "example": "tus",
      "type": "string"
    },
    "VisualizationCapabilities": {
      "example": {
        "renderers": [
          {
            "id": "echarts",
            "kinds": [
              "cartesian"
            ],
            "schemaVersion": 1,
            "version": "example"
          }
        ],
        "schemaVersion": 1
      },
      "properties": {
        "renderers": {
          "example": [
            {
              "id": "echarts",
              "kinds": [
                "cartesian"
              ],
              "schemaVersion": 1,
              "version": "example"
            }
          ],
          "items": {
            "$ref": "#/components/schemas/VisualizationRendererCapability"
          },
          "type": "array"
        },
        "schemaVersion": {
          "example": 1,
          "type": "integer"
        }
      },
      "required": [
        "schemaVersion",
        "renderers"
      ],
      "type": "object"
    },
    "VisualizationRendererCapability": {
      "example": {
        "id": "echarts",
        "kinds": [
          "cartesian"
        ],
        "schemaVersion": 1,
        "version": "example"
      },
      "properties": {
        "id": {
          "$ref": "#/components/schemas/VisualizationRendererID"
        },
        "kinds": {
          "example": [
            "cartesian"
          ],
          "items": {
            "$ref": "#/components/schemas/VisualizationSpecKind"
          },
          "type": "array"
        },
        "schemaVersion": {
          "example": 1,
          "type": "integer"
        },
        "version": {
          "example": "example",
          "type": "string"
        }
      },
      "required": [
        "id",
        "version",
        "schemaVersion",
        "kinds"
      ],
      "type": "object"
    },
    "VisualizationRendererID": {
      "enum": [
        "echarts",
        "tanstack",
        "html",
        "maplibre",
        "vega-lite-sandbox"
      ],
      "example": "echarts",
      "type": "string"
    },
    "VisualizationSpecKind": {
      "enum": [
        "cartesian",
        "proportional",
        "hierarchy",
        "polar",
        "table",
        "matrix",
        "pivot",
        "kpi",
        "geographic",
        "custom"
      ],
      "example": "cartesian",
      "type": "string"
    }
  }
}
