Mint a fleet token (plaintext shown once)
POST
/ssh/tokens
const url = 'https://pki.example.com/api/v1/ssh/tokens';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","userCaId":"example","hostCaId":"example","opSet":["sign-host"],"zone":"example","allowedPrincipals":["example"],"maxValidForSeconds":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://pki.example.com/api/v1/ssh/tokens \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "userCaId": "example", "hostCaId": "example", "opSet": [ "sign-host" ], "zone": "example", "allowedPrincipals": [ "example" ], "maxValidForSeconds": 1 }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
userCaId
string
hostCaId
string
opSet
required
Array<string>
zone
string
allowedPrincipals
Array<string>
maxValidForSeconds
integer
key
additional properties
any
Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
key
additional properties
any
Example generated
{}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
key
additional properties
any
key
additional properties
any
Example generated
{ "error": { "code": "example", "message": "example" }}Default Response
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
key
additional properties
any
key
additional properties
any
Example generated
{ "error": { "code": "example", "message": "example" }}