The caller's API tokens.
GET
/api/v1/tokens
const url = 'https://example.com/api/v1/tokens';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/tokensResponses
Section titled “Responses”Media typeapplication/json
Array<object>
object
id
required
string
name
required
string
prefix
required
Non-secret prefix to recognise the token, e.g. kbn_pat_0192f3a1.
string
role
required
string
project
string | null
environment
string | null
expires_at
integer | null format: int64
last_used_at
integer | null format: int64
revoked
required
boolean
created_at
required
integer format: int64
Examplegenerated
[ { "id": "example", "name": "example", "prefix": "example", "role": "example", "project": "example", "environment": "example", "expires_at": 1, "last_used_at": 1, "revoked": true, "created_at": 1 }]