{
  "openapi": "3.0.3",
  "info": {
    "title": "Openstapps Backend",
    "description": "# Introduction\nThis is a human readable documentation of the backend OpenAPI representation.",
    "contact": {
      "name": "Openstapps Team",
      "url": "https://gitlab.com/openstapps/backend",
      "email": "app@uni-frankfurt.de"
    },
    "license": {
      "name": "AGPL 3.0",
      "url": "https://www.gnu.org/licenses/agpl-3.0.en.html"
    },
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://mobile.server.uni-frankfurt.de:3000",
      "description": "Production server"
    }
  ],
  "paths": {
    "/": {
      "post": {
        "summary": "Request meta information about the deployment",
        "description": "",
        "requestBody": {
          "description": "A response to an index request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCIndexRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A response to an index request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCIndexResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": []
      }
    },
    "/{TYPE}/{UID}": {
      "put": {
        "summary": "Updating existing things",
        "description": "",
        "requestBody": {
          "description": "Response for an entity update request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCThingUpdateRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "TYPE",
            "required": true,
            "schema": {
              "$ref": "schema/SCSearchResponse.json#/definitions/SCThingType"
            }
          },
          {
            "in": "path",
            "name": "UID",
            "required": true,
            "schema": {
              "$ref": "schema/SCSearchResponse.json#/definitions/SCUuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response for an entity update request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCThingUpdateResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCNotFoundErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": []
      }
    },
    "/bookAvailability": {
      "post": {
        "summary": "Book availability",
        "description": "This checks if a book is available in a library.\n\n**Example**:\n\n`POST https://example.com/bookAvailability`\n\n```json\n{\n  \"isbn\": \"978-3-16-148410-0\"\n}\n```",
        "requestBody": {
          "description": "List of availabilities of a book",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCBookAvailabilityRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "List of availabilities of a book",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCBookAvailabilityResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCNotFoundErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": []
      }
    },
    "/bulk": {
      "post": {
        "summary": "Bulk creation",
        "description": "",
        "requestBody": {
          "description": "Requested Bulk from backend",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCBulkRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Requested Bulk from backend",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCBulkResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk"
        ]
      }
    },
    "/bulk/{UID}": {
      "post": {
        "summary": "Indexing sc things in a bulk",
        "description": "",
        "requestBody": {
          "description": "Response to a request to add a thing to a bulk",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCBulkAddRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "UID",
            "required": true,
            "schema": {
              "$ref": "schema/SCSearchResponse.json#/definitions/SCUuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Response to a request to add a thing to a bulk",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCBulkAddResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCNotFoundErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk"
        ]
      }
    },
    "/bulk/{UID}/done": {
      "post": {
        "summary": "Closing bulks",
        "description": "",
        "requestBody": {
          "description": "Response to a request to change the state of a bulk to done",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCBulkDoneRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "UID",
            "required": true,
            "schema": {
              "$ref": "schema/SCSearchResponse.json#/definitions/SCUuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Response to a request to change the state of a bulk to done",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCBulkDoneResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCNotFoundErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": [
          "Bulk"
        ]
      }
    },
    "/feedback": {
      "post": {
        "summary": "Feedback submission",
        "description": "",
        "requestBody": {
          "description": "A response to a feedback request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCFeedbackRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A response to a feedback request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCFeedbackResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": []
      }
    },
    "/plugin/register": {
      "post": {
        "summary": "Register plugins",
        "description": "",
        "requestBody": {
          "description": "Plugin register response",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCPluginRegisterRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Plugin register response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCPluginRegisterResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Syntax error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCSyntaxErrorResponse.json"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCNotFoundErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "406": {
            "description": "Parameters not acceptable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCParametersNotAcceptable.json"
                }
              }
            }
          },
          "409": {
            "description": "Plugin already registered error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCPluginAlreadyRegisteredErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "500": {
            "description": "Plugin registering failed error response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCPluginRegisteringFailedErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": []
      }
    },
    "/rating": {
      "post": {
        "summary": "Rating submission",
        "description": "",
        "requestBody": {
          "description": "A response to a rating request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCRatingRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A response to a rating request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRatingResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": []
      }
    },
    "/search": {
      "post": {
        "summary": "Searching things",
        "description": "",
        "requestBody": {
          "description": "A search response",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCSearchRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A search response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCSearchResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": [
          "Search"
        ]
      }
    },
    "/search/multi": {
      "post": {
        "summary": "Submission of multiple search requests at once",
        "description": "",
        "requestBody": {
          "description": "A multi search response",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "schema/SCMultiSearchRequest.json"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "X-StApps-Version",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "2.0.0"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "A multi search response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMultiSearchResponse.json"
                }
              }
            }
          },
          "400": {
            "description": "Validation of request failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCValidationErrorResponse.json"
                }
              }
            }
          },
          "405": {
            "description": "HTTP method is not allowed on this route",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCMethodNotAllowedErrorResponse.json"
                }
              }
            }
          },
          "413": {
            "description": "The request body is too large.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCRequestBodyTooLargeErrorResponse.json"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported media type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCUnsupportedMediaTypeErrorResponse.json"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. You can not submit more than 5 queries an once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCTooManyRequestsErrorResponse.json"
                }
              }
            }
          },
          "502": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "schema/SCInternalServerErrorResponse.json"
                }
              }
            }
          }
        },
        "tags": [
          "Search"
        ]
      }
    }
  }
}