Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Mint token on a lease

Mints a lease token for the data plane, bound to the current generation.

Mints a lease token for the data plane, bound to the current generation. Hand it to a process that must not hold the Access key.

  • Path POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:mintToken
  • Scope sandboxes:exec
  • Effect write — a successful call changes state.
  • Collection leases

#Request

FieldTypeWhat it is
namestringThe name of the lease. Required.
scopesTokenScope[]What the token admits. Required. One of guest, ports, cdp, computer.
ttldurationAt most 1 hour and never past the lease's expire_time.

#Response

FieldTypeWhat it is
tokenstringThe lease token; sent as a bearer token to the data plane. Never returned again.
generationint64The lease generation the token is bound to.
expire_timetimestampWhen the token stops verifying.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/leases/lease:mintToken" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scopes":["guest"]}'