TAŇBA-OOH Әзірлеушілерге

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

АтауыТүріМіндеттіСипаттамаМысал
versionstringиәVersion of the dictionary."1.0"
licenceobjectиәThe licence note of the files. The terms of use are the city's decision; until it is made the note says so.
licence.statusstringиәdraft until the city decides. draft
licence.textobjectиәThe note in English, Russian and Kazakh.
licence.text.enstringиәEnglish text."Draft - pending the city's decision."
licence.text.rustringиәRussian text."Проект - ожидает решения города."
licence.text.kkstringиәKazakh text."Жоба - қаланың шешімін күтуде."
basisobjectиәOne documented item: a file, a table, a column, a status or the counting basis.
basis.namestringName of the item; files, tables, columns and the basis have one."plays"
basis.codestringCode of the item; statuses have one."published"
basis.descriptionobjectиәA text in English, Russian and Kazakh.
basis.description.enstringиәEnglish text."Plays in the month."
basis.description.rustringиәRussian text."Показы за месяц."
basis.description.kkstringиәKazakh text."Айдағы көрсетілімдер."
filesarray of OpenDataEntryиәThe two files of a release.
files[].namestringName of the item; files, tables, columns and the basis have one."plays"
files[].codestringCode of the item; statuses have one."published"
files[].descriptionobjectиәA text in English, Russian and Kazakh.
files[].description.enstringиәEnglish text."Plays in the month."
files[].description.rustringиәRussian text."Показы за месяц."
files[].description.kkstringиәKazakh text."Айдағы көрсетілімдер."
tablesarray of OpenDataEntryиәThe tables in the files.
tables[].namestringName of the item; files, tables, columns and the basis have one."plays"
tables[].codestringCode of the item; statuses have one."published"
tables[].descriptionobjectиәA text in English, Russian and Kazakh.
tables[].description.enstringиәEnglish text."Plays in the month."
tables[].description.rustringиәRussian text."Показы за месяц."
tables[].description.kkstringиәKazakh text."Айдағы көрсетілімдер."
columnsarray of OpenDataEntryиәThe columns of the CSV file.
columns[].namestringName of the item; files, tables, columns and the basis have one."plays"
columns[].codestringCode of the item; statuses have one."published"
columns[].descriptionobjectиәA text in English, Russian and Kazakh.
columns[].description.enstringиәEnglish text."Plays in the month."
columns[].description.rustringиәRussian text."Показы за месяц."
columns[].description.kkstringиәKazakh text."Айдағы көрсетілімдер."
statusesarray of OpenDataEntryиәThe statuses a cell can have.
statuses[].namestringName of the item; files, tables, columns and the basis have one."plays"
statuses[].codestringCode of the item; statuses have one."published"
statuses[].descriptionobjectиәA text in English, Russian and Kazakh.
statuses[].description.enstringиәEnglish text."Plays in the month."
statuses[].description.rustringиәRussian text."Показы за месяц."
statuses[].description.kkstringиәKazakh text."Айдағы көрсетілімдер."
codesobjectиәThe codes used in the row and col columns, with names in three languages.
codes.districtarray of OpenDataCodeиәDistricts.
codes.district[].codestringиәThe code used in the files."medeu"
codes.district[].nameobjectиәA text in English, Russian and Kazakh.
codes.district[].name.enstringиәEnglish text."Plays in the month."
codes.district[].name.rustringиәRussian text."Показы за месяц."
codes.district[].name.kkstringиәKazakh text."Айдағы көрсетілімдер."
codes.district[].start_hourintegerDayparts only: first hour of the daypart, Almaty time.6
codes.district[].end_hourintegerDayparts only: hour at which the daypart ends, not included.10
codes.formatarray of OpenDataCodeиәFormats.
codes.format[].codestringиәThe code used in the files."medeu"
codes.format[].nameobjectиәA text in English, Russian and Kazakh.
codes.format[].name.enstringиәEnglish text."Plays in the month."
codes.format[].name.rustringиәRussian text."Показы за месяц."
codes.format[].name.kkstringиәKazakh text."Айдағы көрсетілімдер."
codes.format[].start_hourintegerDayparts only: first hour of the daypart, Almaty time.6
codes.format[].end_hourintegerDayparts only: hour at which the daypart ends, not included.10
codes.daypartarray of OpenDataCodeиәDayparts of the Almaty day; start_hour is inclusive and end_hour exclusive.
codes.daypart[].codestringиәThe code used in the files."medeu"
codes.daypart[].nameobjectиәA text in English, Russian and Kazakh.
codes.daypart[].name.enstringиәEnglish text."Plays in the month."
codes.daypart[].name.rustringиәRussian text."Показы за месяц."
codes.daypart[].name.kkstringиәKazakh text."Айдағы көрсетілімдер."
codes.daypart[].start_hourintegerDayparts only: first hour of the daypart, Almaty time.6
codes.daypart[].end_hourintegerDayparts only: hour at which the daypart ends, not included.10
disclosureobjectиәThe disclosure rules in force.
disclosure.min_operatorsintegerиәOperators a published cell needs.3
disclosure.min_advertisersintegerиәAdvertisers a published cell needs.3
disclosure.max_party_share_pctintegerиәThe most percent of a cell's plays one operator or one advertiser may hold.70
disclosure.lag_monthsintegerиәFull months between the end of a month and its release.1
disclosure.descriptionobjectиәA text in English, Russian and Kazakh.
disclosure.description.enstringиәEnglish text."Plays in the month."
disclosure.description.rustringиәRussian text."Показы за месяц."
disclosure.description.kkstringиә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 өрісімен келеді.

МәртебесіМағынасы
404Open data is switched off (not_published), or the month or file is not published or does not exist (not_found).
429Rate 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))
}