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

The CSV file of a finished export job

GET /api/v1/delivery/exports/{id}/file

https://app.tanba-ooh.kz/api/v1/delivery/exports/{id}/file

Анықтамалықтың техникалық мәтіні ағылшын тілінде жазылған.

Scope read:delivery. One row per play as the player reported it, in the field names of the OpenDirect 2.1 Stats object and the UK Playout digital file: frameid (structure code), startdate and startutcoffset (local start), spotlength (seconds), creativeid (approval number), thirdpartycreativeref (SHA-256 of the media file), playerref (device id), plus tier and batch_sha256, the hash of the stored batch the play came in. The rows are the bytes the player sent: records the platform refused or counted as duplicates are not filtered out.

Аутентификация

Authorization тақырыбындағы API кілті немесе консоль сеансы.

Рұқсат: read:delivery

Параметрлер

АтауыОрныТүріМіндеттіСипаттамаМысал
idжолstring (uuid)иәId of the job.1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f

Жауаптар

200 UTF-8 CSV with a byte-order mark and a header row.

text/csv

Мысал

string

Қателер

Қателер problem құжаты (application/problem+json) түрінде, тұрақты code өрісімен келеді.

МәртебесіМағынасы
401No valid session or API key (unauthenticated, session_expired, invalid_api_key).
403The role or the key's scope does not allow this (forbidden, key_scope_denied, key_route_denied).
404Nothing there, or not visible to the caller.
defaultAn error as a problem document.

Код мысалдары

curl

curl 'https://app.tanba-ooh.kz/api/v1/delivery/exports/1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f/file' \
  -H 'Authorization: Bearer YOUR_API_KEY'
Python
import requests

response = requests.get(
    "https://app.tanba-ooh.kz/api/v1/delivery/exports/1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f/file",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
    },
)
print(response.status_code, response.text)
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, err := http.NewRequest("GET", "https://app.tanba-ooh.kz/api/v1/delivery/exports/1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f/file", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	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))
}