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

ActionurlMethodContent Type
get team details/api/team/list-private/{teamName}GET
Add user to team/api/team/rolePOSTapplication/json
Delete a single Role/api/team/role/{roleId}DELETE

The code example below demonstrates:

  1. Liting the details of a team named dataisbeautiful. Showing one user named spez in the team.
  2. Successfully adding the VIEWER role for user guest to the team dataisbeautiful.
  3. Failing to add a role for a user to a team because the user is already assigned a role.
  4. Listing the details of a team named dataisbeautiful. Showing two members in the team, spez and guest.
  5. Deleting the role linking guest to the team. Using the roleId.
  6. 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.

Calling REST API from kdb