Introduction

    API Endpoint

        https://api.barlijst.net/
                

De barlijst API allows you to communicate with barlijst.net through REST.

To use the API, you need to generate an API token in your account and include it as a Bearer header in your request.

POST Request webtoken


# Here is a curl example
curl -X POST \
 -H "Content-Type: application/json" \
 -H "Authorization: Basic [base64_encoded_string]" \
 -d '
 {
    "test": "blah"
 }
 ' \
 "https://api.barlijst.net/token"
                

Request a access token with basic auth:
https://api.barlijst.net/token



Result example :

{
    "access_token": "your.personal.token",
    "expires_at": 1739820479
}
                

REQUEST ATTRIBUTES

Name Type Optional Description
read-only bool Yes If this is a read-only token. Default: false

GET Test API


# Here is a curl example
curl -X GET \
 -H "Content-Type: application/json" \
 -H "Authorization: Bearer [your JSON web token]" \
 "https://api.barlijst.net/test"
                

You can test your API token with this endpoint:
https://api.barlijst.net/test



Result example :

{
    "status": "success"
}
                

GET List all groups


# Here is a curl example
curl -X GET \
 -H "Content-Type: application/json" \
 -H "Authorization: Bearer [your JSON web token]" \
 "https://api.barlijst.net/groups"
                

List all groups available in the barlijst
https://api.barlijst.net/groups



Result example :

[
    {
        "identifier": "uuid",
        "name": "example"
    }
]
                

Response codes

The barlijst API uses the following response codes:

Code Reason Description
200 OK GET request succeeded.
201 Created Resource is created using a POST request. The response contains an empty body.
204 No content PUT, PATCH or DELETE request succeeded. The response contains an empty body.
400 Bad Request The API version or URL is invalid.
401 Unauthorized There is something wrong with your authentication.
403 Forbidden You don’t have the necessary permissions to perform an operation.
404 Not Found A resource was not found.
405 Method Not Allowed You’re using an HTTP method on a resource which does not support it.
406 Not Acceptable One or more required parameters are missing in the request.
408 Request Timeout The request gets a timeout.
409 Conflict Modification is not permitted at the moment.
422 Unprocessable Entity The request was well-formed but was unable to be followed due to semantic errors.
429 Too Many Requests The rate limit is exceeded.
500 Internal Server Error There is a server error.
501 Not Implemented The endpoint is not implemented.