{"openapi":"3.0.1","info":{"title":"OPENDATA API","description":"This API provides endpoints to search datasets and retrieve dataset details.","contact":{"name":"Poznańskie Centrum Superkomputerowo-Sieciowe","email":"mkrystek@man.poznan.pl"},"version":"v1"},"servers":[{"url":"https://www.poznan.pl/opendata","description":"Production development"}],"paths":{"/rest/tags":{"get":{"tags":["Tags"],"description":"Get tags by name or all if phrase not provided.","operationId":"searchTags","parameters":[{"name":"phrase","in":"query","description":"Phrase containing part of the name tag. If the phrase is not given, the list of all tags is returned.","required":false,"schema":{"type":"string","default":""}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchableTags"}}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request"}}}},"/rest/organizations":{"get":{"tags":["Organizations"],"description":"Get organizations by name or all if phrase not provided.","operationId":"organizations","parameters":[{"name":"phrase","in":"query","description":"Phrase containing part of the name organization. If the phrase is not given, the list of all organizations is returned.","required":false,"schema":{"type":"string","default":""}},{"name":"pageNumber","in":"query","description":"Page number of paginated result. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32"},"example":1},{"name":"pageSize","in":"query","description":"Maximum number of elements that page should contain. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32","default":10}},{"name":"sortBy","in":"query","description":"Value (field name) by which the results are to be sorted.","required":true,"schema":{"type":"string"},"example":"name"},{"name":"order","in":"query","description":"Sort order. 'ASC': ascending or 'DESC': descending.","required":true,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableOrganizations"}}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request"}}}},"/rest/download/file":{"get":{"tags":["Download files"],"description":"Download single resource file by file name, dataset id and resource id.","operationId":"downloadFile","parameters":[{"name":"datasetId","in":"query","description":"Unique Resource Identifier for requested dataset","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"resourceId","in":"query","description":"Unique Resource Identifier for requested resource within the dataset","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"fileName","in":"query","description":"Name of file that should be downloaded","required":true,"schema":{"type":"string"}}],"responses":{"default":{"description":"Download controller related to dataset resources files","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request"}}}},"/rest/dictionaries":{"get":{"tags":["Dictionaries"],"description":"Get all dictionaries.","operationId":"dictionaries","parameters":[{"name":"pageNumber","in":"query","description":"Page number of paginated result. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32"},"example":1},{"name":"pageSize","in":"query","description":"Maximum number of elements that page should contain. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableDictionaries"}}}},"500":{"description":"Internal Server Error"}}}},"/rest/dictionaries/{dictionaryId}":{"get":{"tags":["Dictionaries"],"description":"Get single dictionary by id","operationId":"dictionary","parameters":[{"name":"dictionaryId","in":"path","description":"Unique Resource Identifier for requested dictionary","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dictionary"}}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"}}}},"/rest/dictionaries/{dictionaryId}/records":{"get":{"tags":["Dictionaries"],"description":"Get dictionary records","operationId":"dictionaryRecords","parameters":[{"name":"dictionaryId","in":"path","description":"Unique Resource Identifier for requested dictionary","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageNumber","in":"query","description":"Page number of paginated result. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32"},"example":1},{"name":"pageSize","in":"query","description":"Maximum number of elements that page should contain. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32","default":10}},{"name":"sortBy","in":"query","description":"Sort by any dictionary attribute","required":true,"schema":{"type":"string"},"example":"name"},{"name":"order","in":"query","description":"Sort order. 'ASC': ascending or 'DESC': descending.","required":true,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableDictionaryRecords"}}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"}}}},"/rest/dataset/{datasetId}":{"get":{"tags":["Datasets"],"description":"Get information's about given dataset.","operationId":"getDataset","parameters":[{"name":"datasetId","in":"path","description":"Unique Resource Identifier for requested dataset","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"default":{"description":"Dataset controller aggregates endpoints related to any dataset information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"}}}}},"security":[{"bearerAuth":[]}]}},"/rest/dataset/{datasetId}/resourceInfos":{"get":{"tags":["Datasets"],"description":"Get information's about dataset resources.","operationId":"datasetResourceInfos","parameters":[{"name":"datasetId","in":"path","description":"Unique Resource Identifier for requested dataset","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"pageNumber","in":"query","description":"Page number of paginated result. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32"},"example":1},{"name":"pageSize","in":"query","description":"Maximum number of elements that page should contain. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableResourceInfos"}}}},"401":{"description":"Unauthorized"},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"default":{"description":"Dataset controller aggregates endpoints related to any dataset information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableResourceInfos"}}}}},"security":[{"bearerAuth":[]}]}},"/rest/dataset/search":{"get":{"tags":["Datasets"],"description":"Get dataset by name and description <br>Authorization is not required, but in this case only public datasets will be returned <br>Authorization with the minimal 'reader' role allows access to non-public objects and causes the 'isPublic' filter to work. <br><br> <b>case 1:</b> If user are not logged in and filters not provided return only public datasets <br> <b>case 2:</b> User provided some filters data <br> &nbsp; <b>case 2_1:</b> User provided some filters data, but not for `isPublic` attribute and user are not logged in - return only public datasets <br>  &nbsp; <b>case 3_1:</b> User provided value `true` for `isPublic` and user is not authenticated - return only public datasets as user set in filter <br>  &nbsp; &nbsp; <b>case 3_2:</b> User provided value `false` for `isPublic` filter  and user is not authenticated - throw unauthorized exception,                because only authenticated users has permission to see not public datasets","operationId":"searchDatasets","parameters":[{"name":"phrase","in":"query","description":"Phrase containing part of the name or description dataset. If the phrase is not given, the list of all public volumes is returned.","required":false,"schema":{"type":"string","default":""}},{"name":"pageNumber","in":"query","description":"Page number of paginated result. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32"},"example":1},{"name":"pageSize","in":"query","description":"Maximum number of elements that page should contain. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32","default":10}},{"name":"categoriesIds","in":"query","description":"List of indicated categories present in data sets in the form of a UUID character string, example: fdffea9a-4a55-41d4-8665-0a7724c44a91","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"presentationTypesIds","in":"query","description":"List of indicated presentation types present in data sets in the form of a UUID character string, example: fdffea9a-4a55-41d4-8665-0a7724c44a91 ","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"fileFormatsIds","in":"query","description":"List of indicated file formats present in data sets in the form of a UUID character string, example: fdffea9a-4a55-41d4-8665-0a7724c44a91","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"organizationsIds","in":"query","description":"List of indicated organizations present in data sets in the form of a UUID character string, example: fdffea9a-4a55-41d4-8665-0a7724c44a91","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"tagsIds","in":"query","description":"List of indicated tags present in data sets in the form of a UUID character string, example: fdffea9a-4a55-41d4-8665-0a7724c44a91","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"isPublic","in":"query","description":"Determines whether public/non-public datasets are to be taken into account. If neither is the case, both are taken into account","required":false,"schema":{"type":"boolean"}},{"name":"sortBy","in":"query","description":"Value (field name) by which the results are to be sorted. Sorting includes the following fields: 'name', 'views', 'createdOn', 'modifiedOn'","required":true,"schema":{"type":"string"},"example":"name"},{"name":"order","in":"query","description":"Sort order. 'ASC': ascending or 'DESC': descending.","required":true,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchableDatasets"}}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request"},"default":{"description":"Dataset controller aggregates endpoints related to any dataset information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchableDatasets"}}}}},"security":[{"bearerAuth":[]}]}},"/rest/categories":{"get":{"tags":["Categories"],"description":"Get categories by name or all if phrase not provided. <br>If user hasn't minimum 'reader' role access level then only public categories are available (with value visible == true)","operationId":"categories","parameters":[{"name":"phrase","in":"query","description":"Phrase containing part of the name category. If the phrase is not given, the list of all categories is returned.","required":false,"schema":{"type":"string","default":""}},{"name":"pageNumber","in":"query","description":"Page number of paginated result. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32"},"example":1},{"name":"pageSize","in":"query","description":"Maximum number of elements that page should contain. Starts with 1..N.","required":true,"schema":{"minimum":1,"type":"integer","format":"int32","default":10}},{"name":"sortBy","in":"query","description":"Value (field name) by which the results are to be sorted.","required":true,"schema":{"type":"string"},"example":"name"},{"name":"order","in":"query","description":"Sort order. 'ASC': ascending or 'DESC': descending.","required":true,"schema":{"type":"string","enum":["ASC","DESC"]},"example":"ASC"}],"responses":{"400":{"description":"Invalid request data"},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageableCategories"}}}},"500":{"description":"Internal Server Error"}},"security":[{"bearerAuth":[]}]}}},"components":{"schemas":{"SearchableTags":{"type":"object","properties":{"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}}}},"Tag":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"Organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":"string"},"email":{"type":"string"},"order":{"type":"integer","format":"int32"}}},"PageInfo":{"type":"object","properties":{"pageSize":{"type":"integer","format":"int32"},"pageNumber":{"type":"integer","format":"int32"},"totalPages":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64"}}},"PageableOrganizations":{"type":"object","properties":{"organizations":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}},"pageable":{"$ref":"#/components/schemas/PageInfo"}}},"Dictionary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}}},"PageableDictionaries":{"type":"object","properties":{"dictionaries":{"type":"array","items":{"$ref":"#/components/schemas/Dictionary"}},"pageable":{"$ref":"#/components/schemas/PageInfo"}}},"AbstractBaseDictionary":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"visible":{"type":"boolean"},"order":{"type":"integer","format":"int32"}}},"PageableDictionaryRecords":{"type":"object","properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/AbstractBaseDictionary"}},"pageable":{"$ref":"#/components/schemas/PageInfo"}}},"Dataset":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"description":{"type":"string"},"supportArea":{"type":"string"},"license":{"type":"string"},"source":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"modifiedOn":{"type":"string","format":"date-time"},"isPublic":{"type":"boolean"},"administratorId":{"type":"string","format":"uuid"},"categoriesIds":{"type":"array","items":{"type":"string","format":"uuid"}},"organizationId":{"type":"string","format":"uuid"},"refreshRateId":{"type":"string","format":"uuid"},"tagsIds":{"type":"array","items":{"type":"string","format":"uuid"}},"viewsTemporary":{"type":"integer","format":"int64"}}},"PageableResourceInfos":{"type":"object","properties":{"resourceInfos":{"type":"array","items":{"$ref":"#/components/schemas/ResourceInfo"}},"pageable":{"$ref":"#/components/schemas/PageInfo"}}},"ResourceFile":{"type":"object","properties":{"fileName":{"type":"string"},"format":{"$ref":"#/components/schemas/ResourceFileFormat"},"size":{"type":"integer","format":"int64"},"url":{"type":"string"},"formatId":{"type":"string","format":"uuid"}}},"ResourceFileFormat":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"visible":{"type":"boolean"},"order":{"type":"integer","format":"int32"}}},"ResourceInfo":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"files":{"type":"array","items":{"$ref":"#/components/schemas/ResourceFile"}},"createdOn":{"type":"string","format":"date-time"},"presentationTypesIds":{"type":"array","items":{"type":"string","format":"uuid"}}}},"SearchFilterValue":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"allResultsCount":{"type":"integer","format":"int64"},"filteredResultsCount":{"type":"integer","format":"int64"}}},"SearchFilters":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/SearchFilterValue"}},"presentationTypes":{"type":"array","items":{"$ref":"#/components/schemas/SearchFilterValue"}},"fileFormats":{"type":"array","items":{"$ref":"#/components/schemas/SearchFilterValue"}},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/SearchFilterValue"}},"tags":{"type":"array","items":{"$ref":"#/components/schemas/SearchFilterValue"}},"isPublic":{"type":"array","items":{"$ref":"#/components/schemas/SearchFilterValue"}}}},"SearchableDatasets":{"type":"object","properties":{"datasets":{"type":"array","items":{"$ref":"#/components/schemas/Dataset"}},"pageable":{"$ref":"#/components/schemas/PageInfo"},"filters":{"$ref":"#/components/schemas/SearchFilters"}}},"PageableCategories":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/AbstractBaseDictionary"}},"pageable":{"$ref":"#/components/schemas/PageInfo"}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}}}