To enable users to programatically perform CRUD operations on organizations and SLIs, Os and As we have implemented m2m (machine to machine) authentication. You need to be authenticated in order to access it, i.e. by logging into slaOS on the frontend.
Create token flow
Once logged in, use the javascript provided below to create the token. You can copy and paste this javascript in the browser console and run it.
This token can be used to access the slaOS APIs programmatically. On our end, the machine will be identified with the id of the user that obtained the token.
Note that the token has an expiry date of one year.
The token is then added in the API request headers with the value Authorization: Bearer <token>
Your token carries many privileges, so be sure to keep them secure! Do not share your token in publicly accessible areas such as GitHub, client-side code, and so forth.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.