To authenticate with the API, either a staff user or an API user is needed.
Send an http request to api/auth/key
with key
(auth key) and password
as POST parameters to get your access token:
curl -i -H "Accept:application/json" "<HOST>/api/auth/key" -d "key=<auth key>&password=<password>"
Send an http request to api/auth/sid
with sid
and password
as POST parameters to get your access token:
curl -i -H "Accept:application/json" "<HOST>/api/auth/sid" -d "sid=<sid>&password=<password>"
To make an authenticated call, the retrieved access_token has to be send along every request
This can be done by header (recommended):
curl <...> --header "access-token: <access token>"
or as a GET parameter:
curl <...> "<url>&access-token=m5j3jSydPVHyj_OaGvnm5mqqWaJhVJMU"
GET-Parameters:
- sid: Staff SID
Response: Detailed information about the requested staff entry
GET-Parameters:
- sid: Staff SID
Response: List of all access keys the user has access rights to
GET-Parameters:
- sid: Staff SID
- accessKey: Key of access right to read, first part or whole
Response: Boolean if the user is permitted a specific action or not
No parameters api/base-category/keys is deprecated and will be removed soon!
Response: Array of all sections. Structure BaseCategory::name => BaseCategory::key