Authentication
Authenticate the session using the endpoints below. If user management is enabled, authentication is required for most API calls; do this initially to include the token in other requests.
Authenticate
Send username and password to authenticate the session. Put the returned token in the authorization header of all other API requests.
Authorization: Bearer <token>
curl 'http://{{your_prep_ip_address}}/api/v2/authenticate' \
--request POST \
--header 'Authorization: Bearer <token>' \
--data '{
"username": "string",
"password": "string"
}'Response
The login was successful
Check authentication
Use this endpoint to check if the authentication is valid. A 200 response means the token is valid.
curl 'http://{{your_prep_ip_address}}/api/v2/authenticate/check-authentication' \
--header 'Authorization: Bearer <token>'Response
A valid token exists
Renew authentication
Use this endpoint to renew the authentication token.
curl 'http://{{your_prep_ip_address}}/api/v2/authenticate/renew-token' \
--request POST \
--header 'Authorization: Bearer <token>' \
--data '{
"username": "string",
"password": "string"
}'Response
The token was renewed successfully
Logout
Use this endpoint to end a session and invalidate the token.
curl 'http://{{your_prep_ip_address}}/api/v2/authenticate' \
--request DELETE \
--header 'Authorization: Bearer <token>'Response
The user was logged out successfully