Open data dictionary
GET /v1/open/dictionary.json
https://verify.tanba-ooh.kz/v1/open/dictionary.json
Анықтамалықтың техникалық мәтіні ағылшын тілінде жазылған.
What the files hold - columns, tables, cell statuses, the codes of districts, formats and dayparts with their names in three languages, the thresholds of the disclosure rules and the licence note. No credentials. While publication is switched off it answers 404 with the code not_published.
Аутентификация
Қажет емес. Шақыру ашық.
Жауаптар
200 The dictionary.
application/json
OpenDataDictionary
| Атауы | Түрі | Міндетті | Сипаттама | Мысал |
|---|---|---|---|---|
version | string | иә | Version of the dictionary. | "1.0" |
licence | object | иә | The licence note of the files. The terms of use are the city's decision; until it is made the note says so. | |
licence.status | string | иә | draft until the city decides. draft | |
licence.text | object | иә | The note in English, Russian and Kazakh. | |
licence.text.en | string | иә | English text. | "Draft - pending the city's decision." |
licence.text.ru | string | иә | Russian text. | "Проект - ожидает решения города." |
licence.text.kk | string | иә | Kazakh text. | "Жоба - қаланың шешімін күтуде." |
basis | object | иә | One documented item: a file, a table, a column, a status or the counting basis. | |
basis.name | string | Name of the item; files, tables, columns and the basis have one. | "plays" | |
basis.code | string | Code of the item; statuses have one. | "published" | |
basis.description | object | иә | A text in English, Russian and Kazakh. | |
basis.description.en | string | иә | English text. | "Plays in the month." |
basis.description.ru | string | иә | Russian text. | "Показы за месяц." |
basis.description.kk | string | иә | Kazakh text. | "Айдағы көрсетілімдер." |
files | array of OpenDataEntry | иә | The two files of a release. | |
files[].name | string | Name of the item; files, tables, columns and the basis have one. | "plays" | |
files[].code | string | Code of the item; statuses have one. | "published" | |
files[].description | object | иә | A text in English, Russian and Kazakh. | |
files[].description.en | string | иә | English text. | "Plays in the month." |
files[].description.ru | string | иә | Russian text. | "Показы за месяц." |
files[].description.kk | string | иә | Kazakh text. | "Айдағы көрсетілімдер." |
tables | array of OpenDataEntry | иә | The tables in the files. | |
tables[].name | string | Name of the item; files, tables, columns and the basis have one. | "plays" | |
tables[].code | string | Code of the item; statuses have one. | "published" | |
tables[].description | object | иә | A text in English, Russian and Kazakh. | |
tables[].description.en | string | иә | English text. | "Plays in the month." |
tables[].description.ru | string | иә | Russian text. | "Показы за месяц." |
tables[].description.kk | string | иә | Kazakh text. | "Айдағы көрсетілімдер." |
columns | array of OpenDataEntry | иә | The columns of the CSV file. | |
columns[].name | string | Name of the item; files, tables, columns and the basis have one. | "plays" | |
columns[].code | string | Code of the item; statuses have one. | "published" | |
columns[].description | object | иә | A text in English, Russian and Kazakh. | |
columns[].description.en | string | иә | English text. | "Plays in the month." |
columns[].description.ru | string | иә | Russian text. | "Показы за месяц." |
columns[].description.kk | string | иә | Kazakh text. | "Айдағы көрсетілімдер." |
statuses | array of OpenDataEntry | иә | The statuses a cell can have. | |
statuses[].name | string | Name of the item; files, tables, columns and the basis have one. | "plays" | |
statuses[].code | string | Code of the item; statuses have one. | "published" | |
statuses[].description | object | иә | A text in English, Russian and Kazakh. | |
statuses[].description.en | string | иә | English text. | "Plays in the month." |
statuses[].description.ru | string | иә | Russian text. | "Показы за месяц." |
statuses[].description.kk | string | иә | Kazakh text. | "Айдағы көрсетілімдер." |
codes | object | иә | The codes used in the row and col columns, with names in three languages. | |
codes.district | array of OpenDataCode | иә | Districts. | |
codes.district[].code | string | иә | The code used in the files. | "medeu" |
codes.district[].name | object | иә | A text in English, Russian and Kazakh. | |
codes.district[].name.en | string | иә | English text. | "Plays in the month." |
codes.district[].name.ru | string | иә | Russian text. | "Показы за месяц." |
codes.district[].name.kk | string | иә | Kazakh text. | "Айдағы көрсетілімдер." |
codes.district[].start_hour | integer | Dayparts only: first hour of the daypart, Almaty time. | 6 | |
codes.district[].end_hour | integer | Dayparts only: hour at which the daypart ends, not included. | 10 | |
codes.format | array of OpenDataCode | иә | Formats. | |
codes.format[].code | string | иә | The code used in the files. | "medeu" |
codes.format[].name | object | иә | A text in English, Russian and Kazakh. | |
codes.format[].name.en | string | иә | English text. | "Plays in the month." |
codes.format[].name.ru | string | иә | Russian text. | "Показы за месяц." |
codes.format[].name.kk | string | иә | Kazakh text. | "Айдағы көрсетілімдер." |
codes.format[].start_hour | integer | Dayparts only: first hour of the daypart, Almaty time. | 6 | |
codes.format[].end_hour | integer | Dayparts only: hour at which the daypart ends, not included. | 10 | |
codes.daypart | array of OpenDataCode | иә | Dayparts of the Almaty day; start_hour is inclusive and end_hour exclusive. | |
codes.daypart[].code | string | иә | The code used in the files. | "medeu" |
codes.daypart[].name | object | иә | A text in English, Russian and Kazakh. | |
codes.daypart[].name.en | string | иә | English text. | "Plays in the month." |
codes.daypart[].name.ru | string | иә | Russian text. | "Показы за месяц." |
codes.daypart[].name.kk | string | иә | Kazakh text. | "Айдағы көрсетілімдер." |
codes.daypart[].start_hour | integer | Dayparts only: first hour of the daypart, Almaty time. | 6 | |
codes.daypart[].end_hour | integer | Dayparts only: hour at which the daypart ends, not included. | 10 | |
disclosure | object | иә | The disclosure rules in force. | |
disclosure.min_operators | integer | иә | Operators a published cell needs. | 3 |
disclosure.min_advertisers | integer | иә | Advertisers a published cell needs. | 3 |
disclosure.max_party_share_pct | integer | иә | The most percent of a cell's plays one operator or one advertiser may hold. | 70 |
disclosure.lag_months | integer | иә | Full months between the end of a month and its release. | 1 |
disclosure.description | object | иә | A text in English, Russian and Kazakh. | |
disclosure.description.en | string | иә | English text. | "Plays in the month." |
disclosure.description.ru | string | иә | Russian text. | "Показы за месяц." |
disclosure.description.kk | string | иә | Kazakh text. | "Айдағы көрсетілімдер." |
Мысал
{
"version": "1.0",
"licence": {
"status": "draft",
"text": {
"en": "Draft - pending the city's decision.",
"ru": "Проект - ожидает решения города.",
"kk": "Жоба - қаланың шешімін күтуде."
}
},
"basis": {
"name": "plays",
"code": "published",
"description": {
"en": "Plays in the month.",
"ru": "Показы за месяц.",
"kk": "Айдағы көрсетілімдер."
}
},
"files": [
{
"name": "plays",
"code": "published",
"description": {
"en": "Plays in the month.",
"ru": "Показы за месяц.",
"kk": "Айдағы көрсетілімдер."
}
}
],
"tables": [
{
"name": "plays",
"code": "published",
"description": {
"en": "Plays in the month.",
"ru": "Показы за месяц.",
"kk": "Айдағы көрсетілімдер."
}
}
],
"columns": [
{
"name": "plays",
"code": "published",
"description": {
"en": "Plays in the month.",
"ru": "Показы за месяц.",
"kk": "Айдағы көрсетілімдер."
}
}
],
"statuses": [
{
"name": "plays",
"code": "published",
"description": {
"en": "Plays in the month.",
"ru": "Показы за месяц.",
"kk": "Айдағы көрсетілімдер."
}
}
],
"codes": {
"district": [
{
"code": "medeu",
"name": {
"en": "Plays in the month.",
"ru": "Показы за месяц.",
"kk": "Айдағы көрсетілімдер."
},
"start_hour": 6,
"end_hour": 10
}
],
"format": [
{
"code": "medeu",
"name": {
"en": "Plays in the month.",
"ru": "Показы за месяц.",
"kk": "Айдағы көрсетілімдер."
},
"start_hour": 6,
"end_hour": 10
}
],
"daypart": [
{
"code": "medeu",
"name": {
"en": "Plays in the month.",
"ru": "Показы за месяц.",
"kk": "Айдағы көрсетілімдер."
},
"start_hour": 6,
"end_hour": 10
}
]
},
"disclosure": {
"min_operators": 3,
"min_advertisers": 3,
"max_party_share_pct": 70,
"lag_months": 1,
"description": {
"en": "Plays in the month.",
"ru": "Показы за месяц.",
"kk": "Айдағы көрсетілімдер."
}
}
}
Қателер
Қателер problem құжаты (application/problem+json) түрінде, тұрақты code өрісімен келеді.
| Мәртебесі | Мағынасы |
|---|---|
| 404 | Open data is switched off (not_published), or the month or file is not published or does not exist (not_found). |
| 429 | Rate limit; see Retry-After. |
Код мысалдары
curl
curl 'https://verify.tanba-ooh.kz/v1/open/dictionary.json'
Python
import requests
response = requests.get(
"https://verify.tanba-ooh.kz/v1/open/dictionary.json",
)
print(response.status_code, response.text)
Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://verify.tanba-ooh.kz/v1/open/dictionary.json", nil)
if err != nil {
panic(err)
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(data))
}