API
Last updated
Last updated
The Steadybit Web API allows interfacing with the platform. We follow the principle that every feature available at UI also is available via API.
In order to access the API, you need to have Access Token.
In order to use the API you need to create an API access token. API access tokens are managed by the admin and team owners.
API token management can be found in Settings → API Access Tokens.
We differentiate between team tokens and admin tokens.
Team Tokens are bound to a team and can be used to access all experiments of a team.
Admin Tokens have access to management APIs to manage e.g. teams or environments. Admin tokens are only available to the admin user.
You can create a new token via the platform's user interface. Go to Settings → API Access Tokens.
Once you created a new API access token, you can't see it again. Make sure to save it at a safe place!
On-Prem customers have also the possibility to create an Admin Token via internal APIs.
Create Admin Token via CLI
To generate a new admin token in your On-Prem Platform via CLI, first ssh into the platform server. Afterward, run the following command:
The token will be printed to the console.
[On-Prem] Create Admin Token via HTTP API
To generate a new admin token in your On-Prem Platform via HTTP API, first ssh into the platform server. Afterward, you can run curl:
This end point is only accessible for On-Prem customers and only from localhost. It can not be accessed from outside your server.
We provide a OpenApi 3.0 Specification for the API as well as an interactive documentation. In case you are using our on-prem variant you can access it at http://<your-installation-url>/api/spec
.
This is how you can create an experiment (json is supported as well):
The Location
header of the response indicates the url of the newly created experiment:
You can then run the experiment:
In case you want to generate the structs, you should add this parameter to your configuration file:
Here an example configuration to generate a go client with net/http:
And then in your golang file: