{
  "swagger": "2.0",
  "info": {
    "title": "Connect demo apps service",
    "version": "0.1507.0",
    "description": "Send your API key as a bearer token: `Authorization: Bearer <api key>`."
  },
  "tags": [
    {
      "name": "ConnectDemoAppsService",
      "x-displayName": "Connect demo apps service",
      "description": "Service for downloading demo Connect apps",
      "x-errors": [
        {
          "status": 404,
          "errorCode": "NOT_FOUND",
          "errorName": "NominalConnectDemoAppsV1:ConnectDemoAppsServiceErrorUnavailableForEnvironment",
          "message": "Demo apps not available for specified environment."
        },
        {
          "status": 400,
          "errorCode": "INVALID_ARGUMENT",
          "errorName": "NominalConnectDemoAppsV1:ConnectDemoAppsServiceErrorInvalidChecksum",
          "message": "Provided checksum is not valid."
        }
      ]
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/connect/v1/demo-apps/download": {
      "post": {
        "operationId": "ConnectDemoAppsService_GetDemoAppDownloadUrl",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/GetDemoAppDownloadUrlResponse"
            },
            "x-example": {
              "url": "<url>"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/GetDemoAppDownloadUrlRequest"
            },
            "x-example": {
              "sha256Checksum": "<sha256 checksum>"
            }
          }
        ],
        "tags": [
          "ConnectDemoAppsService"
        ],
        "summary": "Get demo app download URL",
        "description": "Get a pre-signed URL for downloading a demo Connect app Not workspace-scoped: any session may call it."
      }
    }
  },
  "definitions": {
    "GetDemoAppDownloadUrlRequest": {
      "type": "object",
      "properties": {
        "sha256Checksum": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$",
          "x-constraints": [
            "Matches `^[a-f0-9]{64}$`."
          ]
        }
      },
      "title": "Checksums for every bundled demo app are calculated when Connect is released and stored within the Connect installation .tar.zst files are named with their SHA256 checksum such that Connect can download the correct version of demo apps easily",
      "example": {
        "sha256Checksum": "<sha256 checksum>"
      }
    },
    "GetDemoAppDownloadUrlResponse": {
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "ApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "Authorization",
      "description": "Your API key as a bearer token: `Authorization: Bearer <api key>`."
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}
