Public Api: Dokumentation: Unterschied zwischen den Versionen
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
| Zeile 153: | Zeile 153: | ||
youtube: string |
youtube: string |
||
miscLinks: { url: string }[] |
miscLinks: { url: string }[] |
||
| − | genres: |
+ | genres: Genre[] |
description: string |
description: string |
||
hearingAssistance: boolean |
hearingAssistance: boolean |
||
| Zeile 160: | Zeile 160: | ||
entrance: localtime |
entrance: localtime |
||
start: localtime |
start: localtime |
||
| − | cast: |
+ | cast: Cast[] |
| − | venue: |
+ | venue: Venue |
| − | tickets: |
+ | tickets: Tickets |
| − | tour: |
+ | tour: Tour |
remark: string |
remark: string |
||
publication: { startAt: instant } |
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: any |
||
| + | } |
||
| + | |||
| + | === 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[] |
||
} |
} |
||
| Zeile 335: | Zeile 395: | ||
web: string |
web: string |
||
address: Address |
address: Address |
||
| − | rooms: |
+ | rooms: Room[] |
assets: Asset[] |
assets: Asset[] |
||
| + | } |
||
| + | === Room === |
||
| + | { |
||
| + | id: string |
||
| + | name: string |
||
} |
} |
||
Version vom 5. März 2020, 17:30 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.
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
youtube: string
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<string, string>
subtitle: Map<string, string>
state: 'CONFIRMED' | 'CANCELLED'
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: any
}
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
}