{
  "swagger": "2.0",
  "info": {
    "version": "v1",
    "title": "Laces Hub - REST API"
  },
  "host": "hub.laces.tech",
  "schemes": [
    "https"
  ],
  "paths": {
    "/api/v1/groups": {
      "get": {
        "tags": [
          "Groups"
        ],
        "operationId": "getTopGroups",
        "summary": "Return top-level groups",
        "description": "Returns a collection with all top-level groups.",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "searchText",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "name",
              "description",
              "createdOn",
              "modifiedOn"
            ]
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 0,
            "format": "int32"
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "format": "int32"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PaginatedGroupDTO"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Groups"
        ],
        "summary": "Create top-level group",
        "description": "Creates a new top-level group.",
        "operationId": "createTopGroup",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/GroupDTO"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GroupDTO"
            }
          }
        }
      }
    },
    "/api/v1/groups/{groupId}": {
      "get": {
        "tags": [
          "Groups"
        ],
        "summary": "Return group",
        "description": "Returns the group's details",
        "operationId": "getGroupDetails",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GroupDTO"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Groups"
        ],
        "summary": "Delete group",
        "description": "Deletes the specified group.",
        "operationId": "deleteGroup",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GroupDTO"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Groups"
        ],
        "summary": "Create subgroup",
        "description": "Creates a new subgroup within the given group.",
        "operationId": "createSubGroup",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/GroupDTO"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GroupDTO"
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Groups"
        ],
        "summary": "Update group partially",
        "description": "Updates the groups only with the provided info, omits the rest.",
        "operationId": "updatePartialGroup",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PartialGroupDTO"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/GroupDTO"
            }
          }
        }
      }
    },
    "/api/v1/groups/{groupId}/subgroups": {
      "get": {
        "tags": [
          "Groups"
        ],
        "operationId": "getSubGroups",
        "summary": "Return subgroups",
        "description": "Returns a collection with all subgroups within the given group.",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "searchText",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "name",
              "description",
              "createdOn",
              "modifiedOn"
            ]
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "minimum": 0,
            "format": "int32"
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "format": "int32"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PaginatedGroupDTO"
            }
          }
        }
      }
    },
    "/api/v1/repositories": {
      "get": {
        "tags": [
          "Repositories"
        ],
        "summary": "Return repositories",
        "description": "Retrieve all repositories for which the user has access.",
        "operationId": "getRepositoriesWithAccessStatus",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/RepositoryInfo"
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Repositories"
        ],
        "summary": "Create repository",
        "description": "Creates a new repository based on provided JSON body.",
        "operationId": "createRepositoryInGroup",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Repository to be created",
            "required": true,
            "schema": {
              "$ref": "#/definitions/RepositoryDTO"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Repository"
            }
          }
        }
      }
    },
    "/api/v1/repositories/{repositoryId}": {
      "get": {
        "tags": [
          "Repositories"
        ],
        "summary": "Return repository's details",
        "description": "Return the details of the provided repository.",
        "operationId": "getRepositoryMetadata",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "description": "The id of the repository",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/RepositoryDTO"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Repositories"
        ],
        "summary": "Delete repository",
        "description": "Remove the provided repository.",
        "operationId": "deleteRepository",
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Repository"
            }
          }
        }
      }
    },
    "/api/v1/repositories/{groupId}/repositories": {
      "get": {
        "tags": [
          "Repositories"
        ],
        "summary": "Return repositories within group",
        "description": "Returns all the repositories located within the given group.",
        "operationId": "getRepositories",
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "searchText",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortBy",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sortDirection",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "ASC",
              "DESC"
            ]
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "format": "int32"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/PaginatedRepositoryDTO"
            }
          }
        }
      }
    },
    "/api/v1/repositories/{repositoryId}/publications": {
      "get": {
        "tags": [
          "Publications"
        ],
        "summary": "Return publications within repository",
        "description": "Returns the publications from the specified repository.",
        "operationId": "getRepositoryPublications",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "description": "The id of the repository",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "array",
              "items": {
                "$ref": "#/definitions/Publication"
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Publications"
        ],
        "summary": "Create publication",
        "description": "Create new publication within repository using multipart body",
        "operationId": "createPublication",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "meta-data",
            "in": "formData",
            "required": true,
            "type": "string",
            "format": "{\"type\":\"object\",\"properties\":{\"publicationUri\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"versioningMode\":{\"type\":\"string\"},\"versionLabel\":{\"type\":\"string\"},\"useVersionedBaseUri\":{\"type\":\"boolean\"},\"description\":{\"type\":\"string\"},\"owner\":{\"type\":\"string\"},\"publisher\":{\"type\":\"string\"},\"schemaURIs\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}",
            "x-example": "{\"publicationUri\":\"private\\/test\\/semmtech\\/library\\/cabins-in-the-woods\",\"name\":\"cabins-in-the-woods\",\"owner\":\"Jill\",\"publisher\":\"Ellen\",\"versioningMode\":\"INCREMENTAL\",\"versionLabel\":\"ver1\",\"useVersionedBaseUri\":true,\"description\":\"Demo OTL\",\"schemaURIs\":[\"http:\\/\\/www.laces.tech\\/publication\\/ns\\/semmtech\\/live\\/laces\\/schema\\/shapes\\/\",\"http:\\/\\/www.laces.tech\\/publication\\/ns\\/semmtech\\/live\\/laces\\/schema\\/otl-manager\\/\"]}"
          },
          {
            "name": "Content",
            "in": "formData",
            "required": true,
            "type": "file",
            "format": "\"Turtle (.ttl), N-Triples (.nt), N3 (.n3), RDF/XML (.rdf, .owl, .xml), JSON-LD (.jsonld), RDF/JSON (.rj)\";"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Publication"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Publications"
        ],
        "summary": "Update publication",
        "description": "Update the publication's meta-data and/or RDF data.",
        "operationId": "updatePublication",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "meta-data",
            "in": "formData",
            "required": true,
            "type": "string",
            "format": "{\"type\":\"object\",\"properties\":{\"publicationUri\":{\"type\":\"string\"},\"name\":{\"type\":\"string\"},\"versioningMode\":{\"type\":\"string\"},\"versionLabel\":{\"type\":\"string\"},\"useVersionedBaseUri\":{\"type\":\"boolean\"},\"description\":{\"type\":\"string\"},\"owner\":{\"type\":\"string\"},\"publisher\":{\"type\":\"string\"},\"schemaURIs\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}",
            "x-example": "{\"publicationUri\":\"private\\/test\\/semmtech\\/library\\/cabins-in-the-woods\",\"name\":\"cabins-in-the-woods\",\"owner\":\"Jill\",\"publisher\":\"Ellen\",\"versioningMode\":\"INCREMENTAL\",\"versionLabel\":\"ver1\",\"useVersionedBaseUri\":true,\"description\":\"Demo OTL\",\"schemaURIs\":[\"http:\\/\\/www.laces.tech\\/publication\\/ns\\/semmtech\\/live\\/laces\\/schema\\/shapes\\/\",\"http:\\/\\/www.laces.tech\\/publication\\/ns\\/semmtech\\/live\\/laces\\/schema\\/otl-manager\\/\"]}"
          },
          {
            "name": "Content",
            "in": "formData",
            "required": true,
            "type": "file",
            "format": "\"Turtle (.ttl), N-Triples (.nt), N3 (.n3), RDF/XML (.rdf, .owl, .xml), JSON-LD (.jsonld), RDF/JSON (.rj)\";"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Publication"
            }
          }
        }
      }
    },
    "/api/v1/repositories/{repositoryId}/publications/publication": {
      "get": {
        "tags": [
          "Publications"
        ],
        "summary": "Return publication",
        "description": "Return the RDF data of the publication",
        "operationId": "getPublicationContent",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "id",
            "in": "query",
            "description": "The id of the publication",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Publications"
        ],
        "summary": "Delete publication",
        "description": "",
        "operationId": "deletePublication",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "id",
            "in": "query",
            "description": "The id of the publication",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Publication"
            }
          }
        }
      }
    },
    "/api/v1/repositories/{repositoryId}/publications/{accessibility}/{status}/{context}/{function}/{name}": {
      "get": {
        "tags": [
          "Publications"
        ],
        "summary": "Return publication's meta-data",
        "description": "Returns the meta-data of the publication based on the provided segments.",
        "operationId": "getNonVersionedPublicationMetadata",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "description": "The id of the repository",
            "required": true,
            "type": "string"
          },
          {
            "name": "accessibility",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "private",
              "public"
            ]
          },
          {
            "name": "status",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "live",
              "test",
              "acceptance"
            ]
          },
          {
            "name": "context",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "function",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "library",
              "schema"
            ]
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Publication"
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Publications"
        ],
        "summary": "Update publication's meta-data",
        "description": "",
        "operationId": "updateNonVersionedPublicationMetadata",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "accessibility",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "private",
              "public"
            ]
          },
          {
            "name": "status",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "live",
              "test",
              "acceptance"
            ]
          },
          {
            "name": "context",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "function",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "library",
              "schema"
            ]
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "publisher",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Publication"
            }
          }
        }
      }
    },
    "/api/v1/repositories/{repositoryId}/publications/{accessibility}/{status}/{context}/{function}/{name}/sparql": {
      "get": {
        "tags": [
          "Publications"
        ],
        "summary": "Execute SPARQL query",
        "description": "Executes a SPARQL query on the given publication",
        "operationId": "executeSparqlQueryGet",
        "produces": [
          "application/json",
          "text/csv",
          "application/sparql-results+json",
          "application/sparql-results+xml",
          "text/tab-separated-values"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Application Token Authorization or Basic Authentication",
            "required": false,
            "type": "string"
          },
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "accessibility",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "private",
              "public"
            ]
          },
          {
            "name": "status",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "live",
              "test",
              "acceptance"
            ]
          },
          {
            "name": "context",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "function",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "library",
              "schema"
            ]
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "query",
            "in": "query",
            "description": "Query",
            "required": true,
            "type": "string"
          },
          {
            "name": "default-graph-uri",
            "in": "query",
            "description": "Any (additional) publications/datasets that should be added as default graph",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "Output format",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "schema": {
              "$ref": "#/definitions/Pair"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/Pair"
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/v1/repositories/{repositoryId}/publications/{accessibility}/{status}/{context}/{function}/{name}/versions/{version}": {
      "get": {
        "tags": [
          "Publications"
        ],
        "summary": "Return publication's meta-data",
        "description": "",
        "operationId": "getVersionedPublicationMetadata",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "accessibility",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "private",
              "public"
            ]
          },
          {
            "name": "status",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "live",
              "test",
              "acceptance"
            ]
          },
          {
            "name": "context",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "function",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "library",
              "schema"
            ]
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Publication"
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Publications"
        ],
        "summary": "Update publication's meta-data",
        "description": "",
        "operationId": "updateVersionedPublicationMetadata",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "accessibility",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "private",
              "public"
            ]
          },
          {
            "name": "status",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "live",
              "test",
              "acceptance"
            ]
          },
          {
            "name": "context",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "function",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "library",
              "schema"
            ]
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "publisher",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "owner",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "description",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "successful operation",
            "schema": {
              "$ref": "#/definitions/Publication"
            }
          }
        }
      }
    },
    "/api/v1/repositories/{repositoryId}/publications/{accessibility}/{status}/{context}/{function}/{name}/{version}/sparql": {
      "get": {
        "tags": [
          "Publications"
        ],
        "summary": "Execute SPARQL query",
        "description": "",
        "operationId": "executeSparqlQueryOnVersionGet",
        "produces": [
          "application/json",
          "text/csv",
          "application/sparql-results+json",
          "application/sparql-results+xml",
          "text/tab-separated-values"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "Application Token Authorization or Basic Authentication",
            "required": false,
            "type": "string"
          },
          {
            "name": "repositoryId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "accessibility",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "private",
              "public"
            ]
          },
          {
            "name": "status",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "live",
              "test",
              "acceptance"
            ]
          },
          {
            "name": "context",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "function",
            "in": "path",
            "required": true,
            "type": "string",
            "enum": [
              "library",
              "schema"
            ]
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "type": "string",
            "pattern": "[A-Za-z0-9_-]+"
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "query",
            "in": "query",
            "description": "Query",
            "required": true,
            "type": "string"
          },
          {
            "name": "default-graph-uri",
            "in": "query",
            "description": "(additional) publications/datasets that should be added as default graph",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "Accept",
            "in": "header",
            "description": "Output format",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Ok",
            "schema": {
              "$ref": "#/definitions/Pair"
            }
          },
          "400": {
            "description": "Bad request",
            "schema": {
              "$ref": "#/definitions/Pair"
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/v1/publications.delta": {
      "get": {
        "tags": [ "Publications" ],
        "summary": "Delta between two publication URL's",
        "description": "",
        "operationId": "findDeltaForPublicationVersions",
        "produces": [
          "application/n-quads",
          "application/trig"
        ],
        "parameters": [
          {
            "name": "Authorization",
            "in": "header",
            "description": "App Token Authorization or Basic Authentication",
            "required": false,
            "type": "string"
          },
          {
            "name": "version1",
            "in": "query",
            "description": "Version 1 Publication URL ",
            "required": true,
            "type": "string"
          },
          {
            "name": "version2",
            "in": "query",
            "description": "Version 2 Publication URL ",
            "required": true,
            "type": "string"
          },
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "type": "string",
            "enum": [
              "application/n-quads",
              "application/trig"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "type": "object"
            }
          },
          "400": {
            "description": "Invalid request",
            "schema": {
              "$ref": "#/definitions/Pair"
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "406": {
            "description": "Not Acceptable"
          },
          "500": {
            "description": "Server error"
          }
        }
      }
    }
  },
  "definitions": {
    "GroupDTO": {
      "type": "object",
      "required": [
        "name",
        "visible"
      ],
      "properties": {
        "createdBy": {
          "type": "string"
        },
        "createdOn": {
          "type": "integer",
          "format": "int64"
        },
        "description": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "modifiedBy": {
          "type": "string"
        },
        "modifiedOn": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "parentId": {
          "type": "string"
        },
        "pathSegment": {
          "type": "string"
        },
        "repositoryCount": {
          "type": "integer",
          "format": "int32"
        },
        "role": {
          "type": "string",
          "enum": [
            "VIEWER",
            "PUBLISHER",
            "MANAGER",
            "OWNER"
          ]
        },
        "subgroupCount": {
          "type": "integer",
          "format": "int32"
        },
        "userGroup": {
          "type": "boolean"
        },
        "visible": {
          "type": "boolean"
        }
      }
    },
    "Paginated": {
      "type": "object",
      "required": [
        "contents",
        "total"
      ],
      "properties": {
        "contents": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "PaginatedGroupDTO": {
      "type": "object",
      "required": [
        "contents",
        "total"
      ],
      "properties": {
        "contents": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/GroupDTO"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "PartialGroupDTO": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "parentId": {
          "type": "string"
        },
        "visible": {
          "type": "boolean"
        }
      }
    },
    "PaginatedRepositoryDTO": {
      "type": "object",
      "required": [
        "contents",
        "total"
      ],
      "properties": {
        "contents": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/RepositoryDTO"
          }
        },
        "total": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "Pair": {
      "type": "object",
      "properties": {
        "key": {
          "type": "object"
        },
        "left": {
          "type": "object"
        },
        "right": {
          "type": "object"
        },
        "value": {
          "type": "object"
        }
      }
    },
    "Publication": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "publicationDate": {
          "type": "string",
          "format": "date-time"
        },
        "publisher": {
          "type": "string"
        },
        "repository": {
          "type": "string"
        },
        "schemaURIs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "useVersionedBaseUri": {
          "type": "boolean"
        },
        "versioningMode": {
          "type": "string",
          "enum": [
            "UNDEFINED",
            "NONE",
            "TIMESTAMP",
            "INCREMENTAL",
            "DATE_TIME",
            "CUSTOM"
          ]
        },
        "versions": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/PublicationVersion"
          }
        }
      }
    },
    "PublicationVersion": {
      "type": "object",
      "properties": {
        "description": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "publicationDate": {
          "type": "string",
          "format": "date-time"
        },
        "publisher": {
          "type": "string"
        },
        "schemaURIs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "version": {
          "type": "string"
        }
      }
    },
    "Repository": {
      "type": "object",
      "required": [
        "name",
        "parentId",
        "pathSegment"
      ],
      "properties": {
        "createdBy": {
          "type": "string"
        },
        "createdOn": {
          "type": "integer",
          "format": "int64"
        },
        "description": {
          "type": "string",
          "description": "description"
        },
        "id": {
          "type": "string"
        },
        "modifiedBy": {
          "type": "string"
        },
        "modifiedOn": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string",
          "description": "name"
        },
        "parentId": {
          "type": "string"
        },
        "pathSegment": {
          "type": "string"
        },
        "publiclyVisible": {
          "type": "boolean"
        }
      }
    },
    "RepositoryDTO": {
      "type": "object",
      "required": [
        "name",
        "parentId",
        "pathSegment",
        "visible"
      ],
      "properties": {
        "createdBy": {
          "type": "string"
        },
        "createdOn": {
          "type": "integer",
          "format": "int64"
        },
        "description": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "modifiedBy": {
          "type": "string"
        },
        "modifiedOn": {
          "type": "integer",
          "format": "int64"
        },
        "name": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "parentId": {
          "type": "string"
        },
        "pathSegment": {
          "type": "string"
        },
        "publicationCount": {
          "type": "integer",
          "format": "int32"
        },
        "visible": {
          "type": "boolean"
        }
      }
    },
    "RepositoryInfo": {
      "type": "object",
      "required": [
        "id",
        "name",
        "owner",
        "status"
      ],
      "properties": {
        "accessRequestId": {
          "type": "string"
        },
        "description": {
          "type": "string",
          "description": "Description"
        },
        "fullPath": {
          "type": "string"
        },
        "id": {
          "type": "string",
          "description": "ID"
        },
        "name": {
          "type": "string",
          "description": "Name"
        },
        "owner": {
          "type": "string",
          "description": "Owner"
        },
        "publicVisibility": {
          "type": "boolean"
        },
        "status": {
          "type": "string",
          "description": "Status",
          "enum": [
            "PENDING_PUBLISHER",
            "PENDING_MANAGER",
            "DENIED",
            "VIEWER",
            "PUBLISHER",
            "MANAGER",
            "OWNER"
          ]
        }
      }
    }
  }
}