/api/v1/tenants/{tenantId}/tokens (POST)
POST
/api/v1/tenants/{tenantId}/tokens
const url = 'https://example.com/api/v1/tenants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tokens';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","permissions":["example"],"serverIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"fileGlobs":["example"],"allowedNetworks":["example"],"expiresInDays":1,"service":false}'};
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://example.com/api/v1/tenants/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tokens \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "permissions": [ "example" ], "serverIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "fileGlobs": [ "example" ], "allowedNetworks": [ "example" ], "expiresInDays": 1, "service": false }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”tenantId
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
permissions
required
Array<string>
serverIds
required
Array<string> | null
fileGlobs
required
Array<string> | null
allowedNetworks
required
Array<string> | null
expiresInDays
required
null | integer | string format: int32
service
boolean
Responses
Section titled “Responses”OK