List all portal tokens
GET /api/portal/tokens
GET /api/portal/tokensInteractive request editor loads with JavaScript.
In: header
Query Parameters
The unique identifier of the portal instance.
^[a-zA-Z0-9-_.]+$1 <= length <= 256"default"Index to order the portal tokens by.
"created_at"Value in
- "created_at"
- "updated_at"
- "expires_at"
Order to list the resources by. The sorting index follows the configuration of order_by.
"desc"Value in
- "asc"
- "desc"
Number of resources listed per page. Used together with page. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valuePage number of the listed resources. Used together with page_size. For example, when there are 13 resources in total, if the query parameters are page=1&page_size=10, the GET response will show the route total as 13 and display 10 resources in the first page. If the query parameters are page=2&page_size=10, the GET response will show the route total as 13 and display 3 resources in the second page.
int321 <= valueCondition to search resources by.
Response Body
application/json
application/json
curl -X GET "$API_BASE_URL/api/portal/tokens?search=version%253Dv2"Successfully retrieved the paginated list of portal tokens.
{
"total": 1,
"list": [
{
"id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
"name": "my-portal-token",
"portal_id": "bd58fce2-b6cc-4d2d-a53c-6ce11b19c101",
"created_at": 1742288232,
"updated_at": 1742288235,
"expires_at": 1752288235,
"last_used_at": 1742288235
}
]
}Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
GET /api/portal/tokens
List all portal tokens
IAM Action: portal:GetPortalToken, Resource: arn:api7:portal:portal/%s/token/*
Parameters
portal_id(query, string, optional): The unique identifier of the portal instance.order_by(query, string, optional): Index to order the portal tokens by.direction(query, string, optional): Order to list the resources by. The sorting index follows the configuration oforder_by.page_size(query, integer, optional): Number of resources listed per page. Used together withpage. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.page(query, integer, optional): Page number of the listed resources. Used together withpage_size. For example, when there are 13 resources in total, if the query parameters arepage=1&page_size=10, the GET response will show the routetotalas13and display 10 resources in the first page. If the query parameters arepage=2&page_size=10, the GET response will show the routetotalas13and display 3 resources in the second page.search(query, string, optional): Condition to search resources by.
Responses
200: Successfully retrieved the paginated list of portal tokens.- allOf variant 1
list(array, optional): An array of resources.total(integer, optional): Total number of objects.- allOf variant 2
list(array, optional): An array of portal tokens.list[].id(string, optional): The portal token ID.list[].name(string, optional): The portal token name.list[].portal_id(string, optional): The portal ID that this token belongs to.list[].created_at(integer, optional): The time when a portal token is created.list[].updated_at(integer, optional): The time when a portal token is updated.list[].expires_at(integer, optional): The expiration timestamp of the portal token.0means the token will not expire.list[].last_used_at(integer, optional): The last time when the portal token is used.400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.value(object, optional): The specific resource.error_msg(string, optional): The error message.
cURL
curl -X GET '$API_BASE_URL/api/portal/tokens'