Send a request with basic auth.
{
"username": "username",
"password": "password"
}
To make any API request, include the token received from a successful login as the value of the key x-access-token
in the header of the request.
{
"data": {
"token": "sampleToken$eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.ey..."
"isAdmin": true
},
"error": "",
"message": "Login success"
}
Headers should include content-type
andx-access-token
. All responses should have the form:
{
"data": "content of response",
"msg": "message on success",
"error": "message on error"
}
Definition GET /shows
Response 200 OK
on success
Definition GET /shows/<id>
Response 200 OK
on success
Definition POST /shows
Arguments
"enTitle":string
"cnTitle":string
"durationMins":integer
Response
201 Created
on success400 Bad request
on invalid input
{
"id": "61d5ac4958b919489f458d9f",
"enTitle": "English",
"cnTitle": "中文",
"durationMins": 120
}
Definition PUT /shows/<id>
Arguments
"id":integer
"enTitle":string
"cnTitle":string
"durationMins":integer
Response
201 Created
on success404 Not found
400 Bad request
on invalid input or id
Definition DELETE /shows/<id>
Response
204 No content
on success404 Not found
400 Bad request
on invalid id
Definition GET /sessions
Response 200 OK
on success
Definition GET /sessions/<id>
Response 200 OK
on success
Definition GET /sessions?show_id=<id>
Response 200 OK
on success
Definition POST /shows
Arguments
"dateTime":string
must be in ISO8601 format (see below)"eventId":string
"showId":string
must correspond to some show id
Response
201 Created
on success400 Bad request
on invalid input
{
"dateTime": "2012-01-01T23:30:00+02:00",
"eventId": "first",
"showId": "61d5ac4958b919489f458d9f"
}
Definition PUT /shows/<id>
Arguments
"dateTime":string
"eventId":string
"showId":string
"isPlaying":bool
"rooms":list
Response
201 Created
on success404 Not found
400 Bad request
on invalid input or id
{
"isPlaying": true,
"rooms": [
{
"title": "Round Table",
"url": "new_url",
"isUnlocked": true
},
{
"title": "Cashier Counter",
"url": "another_new_url",
"isUnlocked": false
}
]
}
Definition DELETE /shows/<id>
Response
204 No content
on success404 Not found
400 Bad request
on invalid id