If your account has the API feature enabled you can access our API for interacting with Seconds in various ways.
It for example provides an interface for uploading your components files, letting you hook Seconds into a custom build system not natively supported by Seconds.
The API uses JWT-tokens for authentication.
Getting your token
In to get a JWT-token you need to provide your username and password to the
Using curl the call would look like this:
curl -X POST https://seconds.debricked.com/api/login_check -d _username=YOUR_USERNAME -d _password=YOUR_PASSWORD
If successful, the response will contain your token:
The token has a lifetime of about an hour. If the JWT-token is invalid, such as if the token has expired, a
401 status code will be returned. You should therefore implement a way of automatically getting a new token every time you receive a
401 status code from any API call.
Using your token
When you have your token you need to pass it to the
Authorization HTTP header with the value
Bearer YOUR_VERY_LONG_TOKEN on each API call.
Contact our technical support at firstname.lastname@example.org