Skip to Content
OpenETL
ReferenceAPIAccess Service

Create key

The response has the key itself, which the API never returns again.

POST
/v1/principals/{principal}/keys

The response has the key itself, which the API never returns again.

Path Parameters

principal*string

The principal id.

Request Body

application/json
  1. body
parent?string

principals/{principal}

expireTime?string

Unset: the key doesn't expire.

Formatdate-time

Response Body

OK

application/json
  1. response
key?

An API key. Calls send it as Authorization: Bearer KEY.

secret?string
Example Request
curl -X POST 'http://localhost:8080/v1/principals/string/keys' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "key": {    "name": "string",    "prefix": "string",    "expireTime": "2019-08-24T14:15:22Z",    "createTime": "2019-08-24T14:15:22Z",    "lastUsedTime": "2019-08-24T14:15:22Z"  },  "secret": "string"}