Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
curl --request GET \
--url https://{controlPlaneURL}/api/svc/v1/personal-access-tokens/{name} \
--header 'Authorization: Bearer <token>'
{
"data": {
"id": "<string>",
"name": "<string>",
"type": "<string>",
"tenantName": "<string>",
"manifest": {
"name": "<string>",
"type": "virtual-account",
"expiration_date": "<string>",
"permissions": [
{
"resource_fqn": "<string>",
"resource_type": "<string>",
"role_id": "<string>"
}
],
"auto_rotate": {
"auto_rotate_interval": 360,
"grace_period": 30,
"notification_target": {
"type": "email",
"notification_channel": "<string>",
"to_emails": [
"<string>"
]
}
},
"secret_fqn": "<string>"
},
"createdBySubject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"jwts": [
{
"id": "<string>",
"subjectType": "<string>",
"subjectId": "<string>",
"metadata": {},
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"createdBy": "<string>"
},
"token": "<string>",
"created": true
}
Get an existing Personal Access Token by name, if it doesn’t exist, it will create a new one and return the PAT data along with a fresh token.
curl --request GET \
--url https://{controlPlaneURL}/api/svc/v1/personal-access-tokens/{name} \
--header 'Authorization: Bearer <token>'
{
"data": {
"id": "<string>",
"name": "<string>",
"type": "<string>",
"tenantName": "<string>",
"manifest": {
"name": "<string>",
"type": "virtual-account",
"expiration_date": "<string>",
"permissions": [
{
"resource_fqn": "<string>",
"resource_type": "<string>",
"role_id": "<string>"
}
],
"auto_rotate": {
"auto_rotate_interval": 360,
"grace_period": 30,
"notification_target": {
"type": "email",
"notification_channel": "<string>",
"to_emails": [
"<string>"
]
}
},
"secret_fqn": "<string>"
},
"createdBySubject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"isExpired": true,
"jwts": [
{
"id": "<string>",
"subjectType": "<string>",
"subjectId": "<string>",
"metadata": {},
"expiry": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"createdBy": "<string>"
},
"token": "<string>",
"created": true
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Was this page helpful?