Keys

List all keys

GEThttps://api-testnet.truvera.io/keys
Query parameters
Response

A paged array of keys

Body
ipsarray of string
aliasnullable string

The alias of the API key

Example: "My API"
key*string
created*string
expires*string
Request
const response = await fetch('https://api-testnet.truvera.io/keys', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "ips": [
      "text"
    ],
    "alias": "My API",
    "key": "text",
    "created": "text",
    "expires": "text"
  }
]

Create a key

POSThttps://api-testnet.truvera.io/keys
Body

Key metadata

ipsarray of string
aliasnullable string

A human-readable name for the key

Example: "My Key"
Response

Key has been created

Body
ipsarray of string
aliasnullable string

The alias of the API key

Example: "My API"
key*string
created*string
expires*string
jwt*string
Request
const response = await fetch('https://api-testnet.truvera.io/keys', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "ips": [
    "text"
  ],
  "alias": "My API",
  "key": "text",
  "created": "text",
  "expires": "text",
  "jwt": "text"
}

Delete a key

DELETEhttps://api-testnet.truvera.io/keys/{publicKey}
Path parameters
publicKey*string

A public key

Response

Key has been deleted

Body
revokedboolean
Request
const response = await fetch('https://api-testnet.truvera.io/keys/{publicKey}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
{
  "revoked": false
}

Update a key

PATCHhttps://api-testnet.truvera.io/keys/{publicKey}
Path parameters
publicKey*string

A public key

Body

Key metadata

ipsarray of string
aliasnullable string

A human-readable name for the key

Example: "My Key"
Response

Key has been updated

Body
ipsarray of string
aliasnullable string

The alias of the API key

Example: "My API"
key*string
created*string
expires*string
Request
const response = await fetch('https://api-testnet.truvera.io/keys/{publicKey}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "ips": [
    "text"
  ],
  "alias": "My API",
  "key": "text",
  "created": "text",
  "expires": "text"
}

Certs internal route, not for typical usage. Generates a temporary key

POSThttps://api-testnet.truvera.io/keys/temporary-key
Authorization
Body

Selected team id

selectedTeamIdinteger
isTestmodeboolean
Response

Temporary key has been created

Body
keystring
selectedTeamIdinteger
Request
const response = await fetch('https://api-testnet.truvera.io/keys/temporary-key', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "key": "text",
  "selectedTeamId": 0
}

Last updated