HTTP API
Key Configuration
A MASTER_API_KEY can be specified as part of the Admin Configuration. We recommend using an online UUID generator.
- Note
- Available in Enterprise edition.
API REST Calls
CURL Examples
The simplest example is a call for which no authentication is required. For example:
Fetching CSV SQL Query Results
To authenticate calls as using HTTP basic authentication either:
- Pass the username:password of a selected user
- Pass the username api_key with the password MASTER_API_KEY as set in Admin Configuration
Setting User Permissions via API
Action | url | Method | Content Type |
---|---|---|---|
get team details | /api/team/list-private/{teamName} | GET | |
Add user to team | /api/team/role | POST | application/json |
Delete a single Role | /api/team/role/{roleId} | DELETE |
The code example below demonstrates:
- Liting the details of a team named
dataisbeautiful
. Showing one user namedspez
in the team. - Successfully adding the VIEWER role for user
guest
to the team dataisbeautiful. - Failing to add a role for a user to a team because the user is already assigned a role.
- Listing the details of a team named dataisbeautiful. Showing two members in the team,
spez and guest
. - Deleting the role linking guest to the team. Using the
roleId
. - Liting the details of a team named dataisbeautiful. Showing one user named spez in the team.
Setting Data Connections via API
Some users will dynamically spin up database instances on new cloud machines throughout the day and may want token_get_all
make these accessible in Pulse. The upsert-conns REST API can be used to upsert new connections.
As you can see below, each line sent is a separate server in the format:
name@host:port:username:password
where only host:port are compulsory.
The result returned is one line per server entry sent. Saying whether the server was updated/saved or unchanged. If there is an error, e.g. an incorrect format is sent, that will also be reported.