OpenData Bratislava API API Reference
API Documentation for OpenData Bratislava API
API Endpoint
http://opendata.bratislava.sk/api
Version: 1.0.0
Authentication
ApiKeyAuth
Category
List of categories
Returns array of categories
Language (sk/en)
Category informations
Returns informations about specified category
Category ID
Language (sk/en)
List of datasets in category
Returns array of datasets per page
Category ID
Language (sk/en)
Array of available datasets in category
Invalid parameter - id
Category doesn't exists
Response Example (200 OK)
{
"id": 123,
"name": "Dataset",
"slug": "dataset"
}
Dataset
List of datasets
Returns array of datasets per page
Page number
Language (sk/en)
Array of available datasets
Invalid header - page
Page not found
Response Example (200 OK)
{
"id": 123,
"name": "Dataset",
"slug": "dataset"
}
Dataset informations
Returns informations about specified dataset
Dataset ID
Language (sk/en)
Array of dataset informations
Invalid parameter - id
File or dataset doesn't exists
Response Example (200 OK)
{
"id": 123,
"name": "Dataset",
"slug": "dataset",
"description": "Description of dataset",
"author": "Author",
"created_at": 1588593600,
"changed_at": 1588593600,
"licence": "Creative commons",
"category": 123,
"year": 2020,
"disctrict": "Bratislava - Stare mesto",
"uniq_id": "abcde12345",
"downloaded": 12345,
"powerbi": null,
"map": null,
"onlinedata": false,
"tags": "bratislava stare mesto"
}
List of files in dataset
Returns array of files in specified dataset
Dataset ID
Language (sk/en)
Array of files in dataset
Invalid parameter - id
Dataset doesn't exists
Response Example (200 OK)
{
"id": 123,
"name": "File name",
"type": "csv"
}
File
File informations
Returns informations about specified file
File ID
Language (sk/en)
Array of file informations
Invalid parameter - id
File or dataset doesn't exists
Response Example (200 OK)
{
"id": 123,
"dataset": 123,
"name": "File name",
"type": "csv",
"created_at": "2020-05-04 12:00:00",
"powerbi": null,
"map": null
}
Download file
Returns specified file
File ID
Specified file
Invalid parameter - id
File or dataset doesn't exists
Schema Definitions
Category: object
- id: integer
- name: string
- slug: string
Example
{
"id": "integer",
"name": "string",
"slug": "string"
}
Dataset-basic: object
- id: integer
- name: string
- slug: string
Example
{
"id": "integer",
"name": "string",
"slug": "string"
}
Dataset: object
- id: integer
- name: string
- slug: string
- description: string
- author: string
- created_at: string
- changed_at: string
- licence: string
- category: integer
- year: integer
- disctrict: string
- uniq_id: string
- downloaded: integer
- powerbi: string
- map: string
- onlinedata: boolean
- tags: array of strings
Example
{
"id": "integer",
"name": "string",
"slug": "string",
"description": "string",
"author": "string",
"created_at": "string",
"changed_at": "string",
"licence": "string",
"category": "integer",
"year": "integer",
"disctrict": "string",
"uniq_id": "string",
"downloaded": "integer",
"powerbi": "string",
"map": "string",
"onlinedata": "boolean",
"tags": "array of strings"
}
File-basic: object
- id: integer
- name: string
- type: string
Example
{
"id": "integer",
"name": "string",
"type": "string"
}