{
  "swagger": "2.0",
  "info": {
    "title": "Persistent compute service",
    "version": "0.1507.0",
    "description": "Send your API key as a bearer token: `Authorization: Bearer <api key>`."
  },
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "securityDefinitions": {
    "ApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Your API key as a bearer token: `Authorization: Bearer <api key>`."
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/persistent-compute/enabled": {
      "get": {
        "operationId": "PersistentComputeService_isEnabled",
        "summary": "Is enabled",
        "tags": [
          "Persistent Compute Service"
        ],
        "description": "Simple \"ping\" like endpoint to see if the service is enabled (and available).",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/IsEnabledResponse"
            },
            "x-example": {}
          }
        }
      }
    }
  },
  "definitions": {
    "IsEnabledResponse": {
      "type": "object",
      "properties": {}
    }
  },
  "tags": [
    {
      "name": "Persistent Compute Service",
      "x-displayName": "Persistent compute service",
      "description": "Exposes a simple endpoints for checking whether or not persistent compute is enabled.",
      "x-errors": [
        {
          "status": 500,
          "errorCode": "INTERNAL",
          "errorName": "PersistentCompute:JobInvalidState",
          "description": "The streaming compute job entered a terminal state unexpectedly. This can indicate a transient issue with the compute engine."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:NonNominalStorageLocator"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:UnsupportedGranularity"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:WindowTooLarge"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:WindowWithLookBackTooLarge"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:WindowNegative"
        },
        {
          "status": 403,
          "errorCode": "PERMISSION_DENIED",
          "errorName": "PersistentCompute:PermissionDenied"
        },
        {
          "status": 403,
          "errorCode": "PERMISSION_DENIED",
          "errorName": "PersistentCompute:SubscriptionAuthExpired",
          "description": "The websocket subscription auth token expired. Clients should refresh credentials and re-establish the subscription."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:InvalidComputation"
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:PollingOnlyComputation",
          "description": "The requested compute contains nodes that support streaming but only via polling (not WebSocket). The frontend should use polling mode (HTTP requests) instead of WebSocket streaming for this query."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:TooManyPoints",
          "description": "The subscription is operating on too many points."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:TooManyPointsForSingleSeries",
          "description": "The subscription is operating on a series that has too many points."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:InvalidClientMessage",
          "description": "Could not parse client message."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "PersistentCompute:UnavailableResultConfiguration",
          "description": "ResultConfiguration is incompatible with the requested compute."
        }
      ]
    }
  ]
}
