Public Api: Dokumentation: Unterschied zwischen den Versionen
Admin (Diskussion | Beiträge) (→Asset) |
Admin (Diskussion | Beiträge) |
||
| Zeile 148: | Zeile 148: | ||
title: Map<locale, string> |
title: Map<locale, string> |
||
subtitle: Map<locale, string> |
subtitle: Map<locale, string> |
||
| − | state: 'CONFIRMED' | 'CANCELLED' |
+ | state: 'CONFIRMED' | 'CANCELLED' | 'RESCHEDULED' |
type: 'CLOSED' | 'RADIO' | 'TV' | 'STREAM' |
type: 'CLOSED' | 'RADIO' | 'TV' | 'STREAM' |
||
broadcastType: 'LIVE' | 'RECORDING' |
broadcastType: 'LIVE' | 'RECORDING' |
||
Aktuelle Version vom 28. Juli 2020, 15:44 Uhr
Basics
URL
Die API ist unter https://copilot-office.de/$KUNDE/public/api zu erreichen.
Content-Type
Sämtliche Daten werden im JSON Format ausgegeben.
Datentypen
string
Strings werden als Strings interpretiert. Beispiel: ?channel=A.
boolean
Es werden die Strings true und false unterstützt. Beispiel: ?highlight=false.
integer
Beispiel: ?page.page=2&page.size=30.
float
Beispiel: 3.14.
localdate
Datumsangaben erfolgen im ISO 8601 Format. Beispiel: ?from=2019-06-13.
localtime
Zeitangaben erfolgen im ISO 8601 Format. Beispiel: 23:59:59.
locale
Angabe des Ländercodes im ISO 3166-1 alpha-2 Format. Beispiel: DE.
Arrays
Bei der Verwendung von Arrays kann der Query Parameter mehrfach angegeben werden. Beispiel: ?channel=A&channel=B.
Pagination
Pagination funktioniert bei allen Endpunkten mit den Query Parametern page.page und page.size. Beispiel: https://copilot-office.de/$KUNDE/public/api/artists?page.page=2&page.size=30
Response
{
"content": [ ELEMENT1, ELEMENT2, ELEMENT3, ... ],
"totalElements":9386,
"totalPages":313
}
Channel
Bei der Verwendung von mehreren Webseiten können sog. Channels verwendet werden, um z.B. Künstler und Events auf mehrere Webseiten verteilt anzuzeigen.
Objekttypen
Address
{
street: string
addon: string
postbox: string
zipcode: string
city: string
region: string
country: string
latitude: float
longitude: float
}
Asset
{
id: string
filename: string
mimeType: string
size: integer
description: string
copyright: string
width: integer
height: integer
downloadUrl: string
tags: { tagName: string }[]
}
API
Assets / Dateianhänge
Basis URL
https://copilot-office.de/$KUNDE/public/api/assets
By ID
https://copilot-office.de/$KUNDE/public/api/assets/{ASSET_ID}
Download
https://copilot-office.de/$KUNDE/public/api/assets/{ASSET_ID}/download
Events
Basis URL
https://copilot-office.de/$KUNDE/public/api/events
Liste
https://copilot-office.de/$KUNDE/public/api/events/
| Parameter | Typ | Optional | Default | Beschreibung |
|---|---|---|---|---|
| page.page | integer | ja | 0 | Seitennummer |
| page.size | integer | ja | 30 | Seitengröße |
| from | localdate | ja | Eventdatum von | |
| to | localdate | ja | Eventdatum bis | |
| channel | string[] | ja | Channel | |
| highlight | boolean | ja | Highlight |
By ID
https://copilot-office.de/$KUNDE/public/api/events/{EVENT_ID}
Response Object
{
id: string
title: Map<locale, string>
subtitle: Map<locale, string>
state: 'CONFIRMED' | 'CANCELLED' | 'RESCHEDULED'
type: 'CLOSED' | 'RADIO' | 'TV' | 'STREAM'
broadcastType: 'LIVE' | 'RECORDING'
broadcastStation: string
facebook: string
youtube: string
miscLinks: { url: string }[]
genres: Genre[]
description: string
hearingAssistance: boolean
highlight: boolean
dateOfEvent: localdate
entrance: localtime
start: localtime
cast: Cast[]
venue: Venue
tickets: Tickets
tour: Tour
remark: string
publication: { startAt: instant }
}
Cast
{
mainAct: boolean
artist: {
id: string
stageName: string
mainact: boolean
bookerSimple: string
web: string
facebook: string
myspace: string
youtube: string
twitter: string
instagram: string
snapchat: string
shortBio: string
longBio: string
assets: Asset[]
requiresSeating: boolean
}
}
Genre
{
id: string
name: Map<locale, string>
}
Tickets
{
soldOut: boolean
preSale: {
notApplicable: boolean
info: string
startAt: instant
endAt: instant
systems: { name: string, url: string, phone: string, info: string, startAt: instant, endAt: instant }[]
}
boxOffice: { notApplicable: boolean }
}
Tour
{
id: string
title: string
description: string
assets: Asset[]
}
Venue
{
id: string
name: string
description: string
web: string
address: Address
assets: Asset[]
rooms: Room[]
}
Künstler
Basis URL
https://copilot-office.de/$KUNDE/public/api/artists
Liste
https://copilot-office.de/$KUNDE/public/api/artists/search
| Parameter | Typ | Optional | Default | Beschreibung |
|---|---|---|---|---|
| page.page | integer | ja | 0 | Seitennummer |
| page.size | integer | ja | 30 | Seitengröße |
| channel | string[] | ja | Channel |
By ID
https://copilot-office.de/$KUNDE/public/api/artists/{ARTIST_ID}
Response Object
{
id: string
stageName: string
web: string
facebook: string
myspace: string
youtube: string
twitter: string
instagram: string
snapchat: string
shortBio: string
longBio: string
assets: Asset[]
}
Events
https://copilot-office.de/$KUNDE/public/api/artists/{ARTIST_ID}/events
| Parameter | Typ | Optional | Default | Beschreibung |
|---|---|---|---|---|
| page.page | integer | ja | 0 | Seitennummer |
| page.size | integer | ja | 30 | Seitengröße |
| channel | string[] | ja | Channel |
Tour
Basis URL
https://copilot-office.de/$KUNDE/public/api/tours
Liste
https://copilot-office.de/$KUNDE/public/api/tours
| Parameter | Typ | Optional | Default | Beschreibung |
|---|---|---|---|---|
| page.page | integer | ja | 0 | Seitennummer |
| page.size | integer | ja | 30 | Seitengröße |
| channel | string[] | ja | Channel |
Response Object
{
id: string
title: string
description: string
assets: Asset[]
}
Venue
Basis URL
https://copilot-office.de/$KUNDE/public/api/venues
Liste
https://copilot-office.de/$KUNDE/public/api/venues
| Parameter | Typ | Optional | Default | Beschreibung |
|---|---|---|---|---|
| page.page | integer | ja | 0 | Seitennummer |
| page.size | integer | ja | 30 | Seitengröße |
| channel | string[] | ja | Channel |
By ID
https://copilot-office.de/$KUNDE/public/api/venues/{VENUE_ID}
Response Object
{
id: string
title: string
description: string
web: string
address: Address
rooms: Room[]
assets: Asset[]
}
Room
{
id: string
name: string
}