{
  "openapi": "3.0.1",
  "info": {
    "title": "Popdock API V4",
    "description": "RESTful API for the Popdock business intelligence and data management platform.",
    "termsOfService": "https://www.popdock.com/terms",
    "contact": {
      "name": "eOne Solutions",
      "url": "https://www.popdock.com"
    },
    "license": {
      "name": "Proprietary"
    },
    "version": "4"
  },
  "paths": {
    "/api/v4/odata": {
      "get": {
        "tags": [
          "Query"
        ],
        "summary": "Returns the OData service document listing the account's endpoints as entity sets.",
        "responses": {
          "200": {
            "description": "The OData v4 service document."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eOne.Microservice.Shared.Response.ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eOne.Microservice.Shared.Response.ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eOne.Microservice.Shared.Response.ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v4/odata/$metadata": {
      "get": {
        "tags": [
          "Query"
        ],
        "summary": "Returns the OData $metadata document describing each endpoint's entity type and fields.",
        "responses": {
          "200": {
            "description": "The OData v4 EDMX metadata document."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eOne.Microservice.Shared.Response.ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eOne.Microservice.Shared.Response.ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eOne.Microservice.Shared.Response.ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v4/odata/{id}": {
      "get": {
        "tags": [
          "Query"
        ],
        "summary": "Runs an endpoint as an OData entity set and returns its data, honoring OData query options.",
        "description": "Supports `$filter`, `$select`, `$top` and `$orderby`, plus entity variables passed as query-string parameters.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The endpoint URL slug (entity set name).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The endpoint's data in OData JSON format."
          },
          "400": {
            "description": "No endpoint exists with that URL slug."
          },
          "402": {
            "description": "The account has spent its plan's monthly task allowance."
          },
          "403": {
            "description": "The caller does not have access to the endpoint."
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eOne.Microservice.Shared.Response.ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eOne.Microservice.Shared.Response.ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eOne.Microservice.Shared.Response.ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "eOne.Microservice.Shared.Response.ErrorResponse": {
        "type": "object",
        "properties": {
          "Status": {
            "type": "string",
            "nullable": true
          },
          "Error": {
            "type": "string",
            "nullable": true
          },
          "ErrorDescription": {
            "type": "string",
            "nullable": true
          },
          "ErrorNumber": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "Please enter 'Bearer' followed by your JWT token",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "Query",
      "description": "Running queries and exporting, downloading, uploading and OData access."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Query",
      "tags": [
        "Query"
      ]
    }
  ]
}