Skip to main content
POST
Make a vault's connect token
Takes a managing key (oc_key_...) or a signed-in session. See the Quickstart for the connect command these tokens go into. Makes the vault’s connect token and returns it once. A token made earlier stops at once. Agents already connected stay connected.
Availability: OneCLI Cloud and self-hosted.

Authorizations

Authorization
string
header
required

A managing key (oc_key_...), an older API key (oc_...), or a signed-in session.

Headers

Idempotency-Key
string

Not accepted on this call. Sending it is 400 bad_request.

Required string length: 1 - 255

Path Parameters

id
string
required

The vault's id.

Required string length: 1 - 64

Response

The new connect token, with the token itself shown once.

createdAt
string | null
required

ISO 8601. When it was made. null: it is off.

enabled
boolean
required

Whether the vault's connect command works.

lastUsedAt
string | null
required

ISO 8601, to the minute. When it last connected an agent. null: never, or it is off.

connectToken
string
required

The connect token itself (oc_connect_...). Shown here once. Put it in the connect command now: it cannot be read again.

Example:

"oc_connect_exampleexampl_example"