API Key Commands

CREATE APIKEY USER

The CREATE APIKEY USER command creates a new APIKEY associated to a specific username and with a mnemonic name. The RESTRICTION option is currently unused and an expiration date can be set using the EXPIRATION parameter.

It returns a String with the new APIKEY.

Syntax

CREATE APIKEY USER **username** NAME **key_name** [RESTRICTION **restriction_type**] [EXPIRATION **expiration_date**]

Privileges

USERADMIN

LIST APIKEYS

The LIST APIKEYS command retrieves all the APIKEYS created on the server. The USER parameter can be used to filter the result further.

It returns a Rowset with the following columns:

  • username: user name
  • key: API KEY
  • name: mnemonic name
  • creation_date: API KEY creation date and time
  • expiration_date: API KEY expiration date and time (if any)
  • restriction: always 0 in this version

Syntax

LIST APIKEYS [USER username]

Privileges

USERADMIN

LIST MY APIKEYS

The LIST MY APIKEYS command returns a list of all the APIKEYs associated with the username used in the current connection.

It returns a Rowset with the following columns:

  • username: user name
  • key: API KEY
  • name: mnemonic name
  • creation_date: API KEY creation date and time
  • expiration_date: API KEY expiration date and time (if any)
  • restriction: always 0 in this version

Syntax

LIST APIKEYS [USER username]

Privileges

USERADMIN

SET APIKEY

The SET KEY command sets or updates a keyname to a specific keyvalue. Once set, the server immediately uses the updated value (and automatically distributes it on the cluster).

It returns OK string or error value (see SCSP protocol).

Syntax

SET KEY keyname TO keyvalue

Privileges

SETTINGS

REMOVE APIKEY

The REMOVE APIKEY command permanently removes an APIKEY from the server.

It returns OK string or error value (see SCSP protocol).

Syntax

REMOVE APIKEY key

Privileges

USERADMIN