PersonalAccessToken
Example Request
curl https://api.planningcenteronline.com/api/v2/personal_access_tokens
Example Object
{
"type": "PersonalAccessToken",
"id": "1",
"attributes": {
"created_at": "2000-01-01T12:00:00Z",
"last_used_on": "2000-01-01",
"name": "string",
"revoked_at": "2000-01-01T12:00:00Z"
},
"relationships": {
"person": {
"data": {
"type": "Person",
"id": "1"
}
}
}
}
Attributes
| Name | Type | Description |
|---|---|---|
created_at |
date_time |
|
id |
primary_key |
|
last_used_on |
date |
The day this token was last used to make an api request, or |
name |
string |
|
revoked_at |
date_time |
When the token was revoked, or |
Relationships
| Name | Type | Association Type | Note |
|---|---|---|---|
| person | Person | to_one |
Can Include
| Parameter | Value | Description | Assignable |
|---|---|---|---|
| include | person | include associated person |
create and update |
Order By
| Parameter | Value | Type | Description |
|---|---|---|---|
| order | created_at | string | prefix with a hyphen (-created_at) to reverse the order |
| order | last_used_on | string | prefix with a hyphen (-lastusedon) to reverse the order |
| order | name | string | prefix with a hyphen (-name) to reverse the order |
| order | person | string | prefix with a hyphen (-person) to reverse the order |
| order | revoked_at | string | prefix with a hyphen (-revoked_at) to reverse the order |
Pagination
| Name | Parameter | Type | Description |
|---|---|---|---|
| per_page | per_page | integer | how many records to return per page (min=1, max=100, default=25) |
| offset | offset | integer | get results from given offset |
Endpoints
Listing
| HTTP Method | Endpoint |
|---|---|
| GET | /api/v2/personal_access_tokens |
Reading
| HTTP Method | Endpoint |
|---|---|
| GET | /api/v2/personal_access_tokens/{id} |
Actions
| HTTP Method | Endpoint | Description |
|---|---|---|
| POST | /api/v2/personal_access_tokens/{personal_access_token_id}/revoke |
Revokes a personal access token |
Takes no payload, and is available to both organization administrators and the owner of the personal access token. |
||
Associations
| HTTP Method | Endpoint | Returns | Details | Filter By |
|---|---|---|---|---|
| GET | /api/v2/personal_access_tokens/{personal_access_token_id}/person |
Person |
Belongs To
| HTTP Method | Endpoint | Association | Details | Filter By |
|---|---|---|---|---|
| GET | /api/v2/personal_access_tokens |
Organization |
|