Public Api: Dokumentation: Unterschied zwischen den Versionen

Aus co*pilot Wiki
Zur Navigation springen Zur Suche springen
 
(8 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 4: Zeile 4:
 
Die API ist unter <code><nowiki>https://copilot-office.de/$KUNDE/public/api</nowiki></code> zu erreichen.
 
Die API ist unter <code><nowiki>https://copilot-office.de/$KUNDE/public/api</nowiki></code> zu erreichen.
   
== Query Parameter Typen ==
+
== Content-Type ==
  +
Sämtliche Daten werden im JSON Format ausgegeben.
  +
  +
== Datentypen ==
   
 
=== string ===
 
=== string ===
Zeile 14: Zeile 17:
 
=== integer ===
 
=== integer ===
 
Beispiel: <code>?page.page=2&page.size=30</code>.
 
Beispiel: <code>?page.page=2&page.size=30</code>.
  +
  +
=== float ===
  +
Beispiel: <code>3.14</code>.
   
 
=== localdate ===
 
=== localdate ===
 
Datumsangaben erfolgen im ISO 8601 Format. Beispiel: <code>?from=2019-06-13</code>.
 
Datumsangaben erfolgen im ISO 8601 Format. Beispiel: <code>?from=2019-06-13</code>.
  +
  +
=== localtime ===
  +
Zeitangaben erfolgen im ISO 8601 Format. Beispiel: <code>23:59:59</code>.
  +
  +
=== locale ===
  +
Angabe des Ländercodes im ISO 3166-1 alpha-2 Format. Beispiel: <code>DE</code>.
   
 
=== Arrays ===
 
=== Arrays ===
Zeile 33: Zeile 45:
 
== Channel ==
 
== 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.
 
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 =
 
= API =
  +
  +
== Assets / Dateianhänge ==
  +
  +
=== Basis URL ===
  +
<code><nowiki>https://copilot-office.de/$KUNDE/public/api/assets</nowiki></code>
  +
  +
=== By ID ===
  +
<code><nowiki>https://copilot-office.de/$KUNDE/public/api/assets/{ASSET_ID}</nowiki></code>
  +
  +
=== Download ===
  +
<code><nowiki>https://copilot-office.de/$KUNDE/public/api/assets/{ASSET_ID}/download</nowiki></code>
   
 
== Events ==
 
== Events ==
Zeile 90: Zeile 142:
 
=== By ID ===
 
=== By ID ===
 
<code><nowiki>https://copilot-office.de/$KUNDE/public/api/events/{EVENT_ID}</nowiki></code>
 
<code><nowiki>https://copilot-office.de/$KUNDE/public/api/events/{EVENT_ID}</nowiki></code>
  +
  +
=== 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 ==
 
== Künstler ==
Zeile 127: Zeile 266:
 
=== By ID ===
 
=== By ID ===
 
<code><nowiki>https://copilot-office.de/$KUNDE/public/api/artists/{ARTIST_ID}</nowiki></code>
 
<code><nowiki>https://copilot-office.de/$KUNDE/public/api/artists/{ARTIST_ID}</nowiki></code>
  +
  +
=== 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 ===
 
=== Events ===
Zeile 190: Zeile 345:
 
|Channel
 
|Channel
 
|}
 
|}
  +
  +
=== Response Object ===
  +
{
  +
id: string
  +
title: string
  +
description: string
  +
assets: Asset[]
  +
}
   
 
== Venue ==
 
== Venue ==
Zeile 226: Zeile 389:
 
=== By ID ===
 
=== By ID ===
 
<code><nowiki>https://copilot-office.de/$KUNDE/public/api/venues/{VENUE_ID}</nowiki></code>
 
<code><nowiki>https://copilot-office.de/$KUNDE/public/api/venues/{VENUE_ID}</nowiki></code>
  +
  +
=== Response Object ===
  +
{
  +
id: string
  +
title: string
  +
description: string
  +
web: string
  +
address: Address
  +
rooms: Room[]
  +
assets: Asset[]
  +
}
  +
=== Room ===
  +
{
  +
id: string
  +
name: string
  +
}

Aktuelle Version vom 28. Juli 2020, 16: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/

Query Parameter
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

Query Parameter
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

Query Parameter
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

Query Parameter
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

Query Parameter
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
}