Overview • Festivals • Artists • Locations • Events • Images • Links • Places • Tags
- Documentation:
Markdown
,HTML
- Database:
SQL Query Scripts
- Server Application:
golang
- Deployment:
bash
To use the API you need to provide an API key via a custom header or a JWT with your requests authorization header:
Api-Key:<api-key>
Authorization: Bearer <jwt>
The FestivalsAPI supports the HTTP GET
, POST
, PATCH
and DELETE
methods.
name
The name parameter expects a simple string.name=^[A-Za-z0-9_.]+$
ids
The ids parameter expects numbers separated by a comma.ids=1,2,37
include
The include parameter expects the name(s) of the relationship you want the response to include.include=rel1,rel2,rel3
Requests that are handled gracefully by the server will always return a top-level object
with at least either thedata
orerror
field. Thedata
field will always contain an array.
If the request returns any objects they will be in that array,
{
"data": [
{OBJECT},
{OBJECT},
{OBJECT}
]
}
otherwise, an empty array is returned. This is not true for the status API.
{
"data": []
}
If the request specified to include relationships the objects are contained in theincluded
field.
Included relationships will only work if the request returns only one object.
{
"data": [
{OBJECT}
],
"included": {
"relationship-1": [
{OBJECT},
{OBJECT},
{OBJECT}
],
"relationship-2": [
{OBJECT}
]
}
}
The error
field will always contain a string with the error message.
{
"error": "An error occured"
}
- GET
/info
- GET
/version
- POST
/update
- GET
/health
- GET
/log
- GET
/log/trace
- GET, POST
/festivals
optionalname,ids
query parameter - GET, PATCH, DELETE
/festivals/{objectID}
- GET
/festivals/{objectID}/{image|links|place|tags|events}
- POST, DELETE
/festivals/{objectID}/{image|links|place|tags|events}/{resourceID}
- GET, POST
/artists
- GET, PATCH, DELETE
/artists/{objectID}
- GET
/artists/{objectID}/{image|links|tags}
- POST, DELETE
/artists/{objectID}/{image|links|tags}/{resourceID}
- GET, POST
/locations
- GET, PATCH, DELETE
/locations/{objectID}
- GET
/locations/{objectID}/{image|links|place}
- POST, DELETE
/locations/{objectID}/{image|links|place}/{resourceID}
- GET, POST
/events
- GET, PATCH, DELETE
/events/{objectID}
- GET
/events/{objectID}/{image|artist|location}
- POST, DELETE
/events/{objectID}/{image|artist|location}/{resourceID}
- GET, POST
/images
- GET, PATCH, DELETE
/images/{objectID}
- GET, POST
/links
- GET, PATCH, DELETE
/links/{objectID}
- GET, POST
/places
- GET, PATCH, DELETE
/places/{objectID}
- GET, POST
/tags
- GET, PATCH, DELETE
/tags/{objectID}
Determine the state of the server.
Info object
{
"BuildTime": string,
"GitRef": string,
"Version": string
}
- Authorization: JWT
- Returns
- Returns the info object
- Codes
200
/40x
/50x
data
orerror
field
- Authorization: JWT
- Returns
- The version of the server application.
- Codes
200
/40x
/50x
- server version as a string
text/plain
Updates to the newest release on github and restarts the service.
- Authorization: JWT
- Returns
- The version of the server application.
- Codes
202
/40x
/50x
- server version as a string
text/plain
- Authorization: JWT
- Returns
- Always returns HTTP status code 200
- Code
200
- empty
text/plain
Returns the service log.
-
Authorization: JWT
-
Returns
- Returns a string
- Codes
200
/40x
/50x
- empty or
text/plain
Returns the service trace log.
-
Authorization: JWT
-
Returns
- Returns a string
- Codes
200
/40x
/50x
- empty or
text/plain
A simple object that represents a festival.
{
"festival_id": integer,
"festival_version": string,
"festival_is_valid": boolean,
"festival_name": string,
"festival_start": integer,
"festival_end": integer,
"festival_description": string
}
Get all festivals.
-
Authorization: API Key
-
Query Parameter:
name
: Filter result by name
ids
: Filter result by IDs -
Examples:
GET https://localhost:8080/festivals
GET https://localhost:8080/festivals?name=Stemmwe
GET https://localhost:8080/festivals?ids=1,8,56
-
Returns
- Returns the festivals
- Codes
200
/40x
/50x
data
orerror
field
Create a new festival
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/festivals
BODY: {OBJECT}
-
Returns
- Returns the created festival on success.
- Codes
201
/40x
/50x
data
orerror
field
Get the festival with the given objectID
.
-
Authorization: API Key
-
Query Parameter:
include
: Include relationships {image
|links
|place
|tags
|events
}
Note: You need to specify the relationship not the associated object type. -
Examples:
GET https://localhost:8080/festivals/1
GET https://localhost:8080/festivals/1?include=links,place
-
Returns
- Returns the festival on success.
- Codes
201
/40x
/50x
data
orerror
field
Update the festival with the given objectID
.
-
Authorization: JWT
-
Examples:
PATCH https://localhost:8080/festivals/1
BODY:{OBJECT}
-
Returns
- Returns the updated festival on success.
- Codes
201
/40x
/50x
data
orerror
field
Delete the festival with the given objectID
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/festivals/1
-
Returns
- Returns no object.
- Codes
204
/40x
/50x
data
orerror
field
Get the objects that are described by the {relationship}
.
-
Authorization: API Key
-
Examples:
GET https://localhost:8080/festivals/1/image
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns the objects described by the relationship
- Codes
20x
/40x
/50x
data
orerror
field
Adds the object with the given {resourceID}
to the relationship for the festival with the given {objectID}
.
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/festivals/1/image/1
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns no object.
- Codes
200
/40x
/50x
data
orerror
field
Removes the object with the given {resourceID}
from the relationship for the festival with the given{objectID}
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/festivals/1/image/1
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns no object.
- Codes
200
/40x
/50x
data
orerror
field
A simple object that represents an artist.
{
"artist_id": integer,
"artist_version": string,
"artist_name": string,
"artist_description": string
}
Get all artists.
-
Authorization: API Key
-
Query Parameter:
name
: Filter result by name
ids
: Filter result by IDs -
Examples:
GET https://localhost:8080/artists
GET https://localhost:8080/artists?name=Beatl
GET https://localhost:8080/artists?ids=1,8,56
-
Returns
- Returns the artists
- Codes
200
/40x
/50x
data
orerror
field
Create a new artist
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/artists
BODY: {OBJECT}
-
Returns
- Returns the created artist on success.
- Codes
201
/40x
/50x
data
orerror
field
Get the artist with the given objectID
.
-
Authorization: API Key
-
Query Parameter:
include
: Include relationships {image
|links
|tags
}
Note: You need to specify the relationship not the associated object type. -
Examples:
GET https://localhost:8080/artists/1
GET https://localhost:8080/artists/1?include=image,tags
-
Returns
- Returns the artist on success.
- Codes
201
/40x
/50x
data
orerror
field
Update the artist with the given objectID
.
-
Authorization: JWT
-
Examples:
PATCH https://localhost:8080/artists/1
BODY:{OBJECT}
-
Returns
- Returns the updated artist on success.
- Codes
201
/40x
/50x
data
orerror
field
Delete the artist with the given objectID
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/artists/1
-
Returns
- Returns no object.
- Codes
204
/40x
/50x
data
orerror
field
Get the objects that are described by the {relationship}
.
-
Authorization: API Key
-
Examples:
GET https://localhost:8080/artists/1/image
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns the objects described by the relationship
- Codes
20x
/40x
/50x
data
orerror
field
Adds the object with the given{resourceID}
to the relationship for the artist with the given{objectID}
.
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/artists/1/image/1
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns no object.
- Codes
200
/40x
/50x
data
orerror
field
Removes the object with the given{resourceID}
from the relationship for the artist with the given{objectID}
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/artists/1/image/1
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns no object.
- Codes
200
/40x
/50x
data
orerror
field
A simple object that represents a location.
{
"location_id": integer,
"location_version": string,
"location_name": string,
"location_description": string,
"location_accessible": boolean,
"location_openair": boolean
}
Get all locations.
-
Authorization: API Key
-
Query Parameter:
name
: Filter result by name
ids
: Filter result by IDs -
Examples:
GET https://localhost:8080/locations
GET https://localhost:8080/locations?name=Beatl
GET https://localhost:8080/locations?ids=1,8,56
-
Returns
- Returns the locations
- Codes
200
/40x
/50x
data
orerror
field
Create a new location
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/locations
BODY: {OBJECT}
-
Returns
- Returns the created location on success.
- Codes
201
/40x
/50x
data
orerror
field
Get the location with the given objectID
.
-
Authorization: API Key
-
Query Parameter:
include
: Include relationships {image
|links
|place
}
Note: You need to specify the relationship not the associated object type. -
Examples:
GET https://localhost:8080/locations/1
GET https://localhost:8080/locations/1?include=image,place
-
Returns
- Returns the location on success.
- Codes
201
/40x
/50x
data
orerror
field
Update the location with the given objectID
.
-
Authorization: JWT
-
Examples:
PATCH https://localhost:8080/locations/1
BODY:{OBJECT}
-
Returns
- Returns the updated location on success.
- Codes
201
/40x
/50x
data
orerror
field
Delete the location with the given objectID
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/locations/1
-
Returns
- Returns no object.
- Codes
204
/40x
/50x
data
orerror
field
Get the objects that are described by the{relationship}
.
-
Authorization: API Key
-
Examples:
GET https://localhost:8080/locations/1/image
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns the objects described by the relationship
- Codes
20x
/40x
/50x
data
orerror
field
Adds the object with the given{resourceID}
to the relationship for the location with the given{objectID}
.
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/locations/1/image/1
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns no object.
- Codes
200
/40x
/50x
data
orerror
field
Removes the object with the given{resourceID}
from the relationship for the location with the given{objectID}
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/locations/1/image/1
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns no object.
- Codes
200
/40x
/50x
data
orerror
field
A simple object that represents an event.
{
"event_id": integer,
"event_version": string,
"event_name": string,
"event_description": string,
"event_type": integer,
"event_start": integer,
"event_end": integer
}
Get all events.
-
Authorization: API Key
-
Query Parameter:
ids
: Filter result by IDs -
Examples:
GET https://localhost:8080/events
GET https://localhost:8080/events?ids=1,8,56
-
Returns
- Returns the locations
- Codes
200
/40x
/50x
data
orerror
field
Create a new event
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/events
BODY: {OBJECT}
-
Returns
- Returns the created event on success.
- Codes
201
/40x
/50x
data
orerror
field
Get the event with the given objectID
.
-
Authorization: API Key
-
Query Parameter:
include
: Include relationships {image
|artist
|location
}
Note: You need to specify the relationship not the associated object type. -
Examples:
GET https://localhost:8080/events/1
GET https://localhost:8080/events/1?include=image,artist,location
-
Returns
- Returns the event on success.
- Codes
201
/40x
/50x
data
orerror
field
Update the event with the given objectID
.
-
Authorization: JWT
-
Examples:
PATCH https://localhost:8080/events/1
BODY:{OBJECT}
-
Returns
- Returns the updated event on success.
- Codes
201
/40x
/50x
data
orerror
field
Delete the event with the given objectID
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/events/1
-
Returns
- Returns no object.
- Codes
204
/40x
/50x
data
orerror
field
Get the objects that are described by the{relationship}
.
-
Authorization: API Key
-
Examples:
GET https://localhost:8080/events/1/artist
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns the objects described by the relationship
- Codes
20x
/40x
/50x
data
orerror
field
Adds the object with the given{resourceID}
to the relationship for the event with the given{objectID}
.
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/events/1/artist/1
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns no object.
- Codes
200
/40x
/50x
data
orerror
field
Removes the object with the given{resourceID}
from the relationship for the event with the given{objectID}
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/events/1/artist/1
Note: You need to specify the relationship not the associated object type. -
Returns
- Returns no object.
- Codes
200
/40x
/50x
data
orerror
field
A simple object that represents an image.
{
"image_id": integer,
"image_hash": string,
"image_comment": string,
"image_ref": string
}
Get all images.
-
Authorization: API Key
-
Query Parameter:
ids
: Filter result by IDs -
Examples:
GET https://localhost:8080/images
GET https://localhost:8080/images?ids=1,8,56
-
Returns
- Returns the images
- Codes
200
/40x
/50x
data
orerror
field
Create a new image
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/images
BODY: {OBJECT}
-
Returns
- Returns the created image on success.
- Codes
201
/40x
/50x
data
orerror
field
Get the image with the given objectID
.
-
Authorization: API Key
-
Examples:
GET https://localhost:8080/images/1
-
Returns
- Returns the image on success.
- Codes
201
/40x
/50x
data
orerror
field
Update the image with the given objectID
.
-
Authorization: JWT
-
Examples:
PATCH https://localhost:8080/images/1
BODY:{OBJECT}
-
Returns
- Returns the updated image on success.
- Codes
201
/40x
/50x
data
orerror
field
Delete the image with the given objectID
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/images/1
-
Returns
- Returns no object.
- Codes
204
/40x
/50x
data
orerror
field
A simple object that represents a link.
{
"link_id": integer,
"link_version": string,
"link_url": string,
"link_service": integer
}
Service type is identified by an integer:
EVTServiceTypeWebsite = 0,
EVTServiceTypeEmail = 1,
EVTServiceTypePhone = 2,
EVTServiceTypeYoutubeProfile = 8,
EVTServiceTypeYoutubeVideo = 3,
EVTServiceTypeYoutubePlaylist = 9,
EVTServiceTypeYoutubeMusicPlaylist = 10,
EVTServiceTypeSoundcloudProfile = 4,
EVTServiceTypeBandcampProfile = 5,
EVTServiceTypeBandcampTrack = 11,
EVTServiceTypeHearthisProfile = 6,
EVTServiceTypeHearthisEmbededTrack = 12,
EVTServiceTypeFacebookProfile = 13,
EVTServiceTypeInstagramProfile = 14,
EVTServiceTypeSpotifyProfile = 15,
EVTServiceTypeAppleMusicStoreReferer = 16,
EVTServiceTypeAppleMusicArtistID = 17,
EVTServiceTypeShazamProfile = 18,
EVTServiceTypeDeezerProfile = 19,
EVTServiceTypeTwitterProfile = 20,
EVTServiceTypeTripadvisorProfile = 21,
/// An unknown link.
EVTServiceTypeUnknown = 7
Get all links.
-
Authorization: API Key
-
Query Parameter:
ids
: Filter result by IDs -
Examples:
GET https://localhost:8080/locations
GET https://localhost:8080/locations?ids=1,8,56
-
Returns
- Returns the locations
- Codes
200
/40x
/50x
data
orerror
field
Create a new link
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/links
BODY: {OBJECT}
-
Returns
- Returns the created image on success.
- Codes
201
/40x
/50x
data
orerror
field
Get the link with the given objectID
.
-
Authorization: API Key
-
Examples:
GET https://localhost:8080/links/1
-
Returns
- Returns the link on success.
- Codes
201
/40x
/50x
data
orerror
field
Update the link with the given objectID
.
-
Authorization: JWT
-
Examples:
PATCH https://localhost:8080/links/1
BODY:{OBJECT}
-
Returns
- Returns the updated link on success.
- Codes
201
/40x
/50x
data
orerror
field
Delete the link with the given objectID
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/links/1
-
Returns
- Returns no object.
- Codes
204
/40x
/50x
data
orerror
field
A simple object that represents a place.
{
"place_id": integer,
"place_version": string,
"place_street": string,
"place_zip": string,
"place_town": string,
"place_street_addition": string,
"place_country": string,
"place_lat": float32.
"place_lon": float32,
"place_description": string
}
Get all places.
-
Authorization: API Key
-
Query Parameter:
ids
: Filter result by IDs -
Examples:
GET https://localhost:8080/places
GET https://localhost:8080/places?ids=1,8,56
-
Returns
- Returns the places
- Codes
200
/40x
/50x
data
orerror
field
Create a new place
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/places
BODY: {OBJECT}
-
Returns
- Returns the created place on success.
- Codes
201
/40x
/50x
data
orerror
field
Get the place with the given objectID
.
-
Authorization: API Key
-
Examples:
GET https://localhost:8080/places/1
-
Returns
- Returns the place on success.
- Codes
201
/40x
/50x
data
orerror
field
Update the place with the given objectID
.
-
Authorization: JWT
-
Examples:
PATCH https://localhost:8080/places/1
BODY:{OBJECT}
-
Returns
- Returns the updated place on success.
- Codes
201
/40x
/50x
data
orerror
field
Delete the place with the given objectID
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/places/1
-
Returns
- Returns no object.
- Codes
204
/40x
/50x
data
orerror
field
A simple object that represents a tag.
{
"tag_id": integer,
"tag_name": string
}
Get all tags.
-
Authorization: API Key
-
Query Parameter:
name
: Filter result by name
ids
: Filter result by IDs -
Examples:
GET https://localhost:8080/tags
GET https://localhost:8080/tags?name=rock
GET https://localhost:8080/tags?ids=1,8,56
-
Returns
- Returns the tags
- Codes
200
/40x
/50x
data
orerror
field
Create a new tag
-
Authorization: JWT
-
Examples:
POST https://localhost:8080/tags
BODY: {OBJECT}
-
Returns
- Returns the created tag on success.
- Codes
201
/40x
/50x
data
orerror
field
Get the tag with the given objectID
.
-
Authorization: API Key
-
Examples:
GET https://localhost:8080/tags/1
-
Returns
- Returns the tag on success.
- Codes
201
/40x
/50x
data
orerror
field
Update the tag with the given objectID
.
-
Authorization: JWT
-
Examples:
PATCH https://localhost:8080/tags/1
BODY:{OBJECT}
-
Returns
- Returns the updated tag on success.
- Codes
201
/40x
/50x
data
orerror
field
Delete the tag with the given objectID
.
-
Authorization: JWT
-
Examples:
DELETE https://localhost:8080/tags/1
-
Returns
- Returns no object.
- Codes
204
/40x
/50x
data
orerror
field