ListHostAuthenticationTokens
client.runners.configurations.hostAuthenticationTokens.list(HostAuthenticationTokenListParams { token, pageSize, filter, pagination } params, RequestOptionsoptions?): TokensPage<HostAuthenticationToken { id, expiresAt, host, 6 more } >
POST/gitpod.v1.RunnerConfigurationService/ListHostAuthenticationTokens
Lists host authentication tokens with optional filtering.
Use this method to:
- View all tokens
- Filter by runner or user
- Monitor token status
Examples
-
List all tokens:
Shows all tokens with pagination.
pagination: pageSize: 20 -
Filter by runner:
Lists tokens for a specific runner.
filter: runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20
ListHostAuthenticationTokens
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const hostAuthenticationToken of client.runners.configurations.hostAuthenticationTokens.list(
{
filter: { runnerId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68' },
pagination: { pageSize: 20 },
},
)) {
console.log(hostAuthenticationToken.id);
}{
"pagination": {
"nextToken": "nextToken"
},
"tokens": [
{
"id": "id",
"expiresAt": "2019-12-27T18:11:19.117Z",
"host": "host",
"integrationId": "integrationId",
"runnerId": "runnerId",
"scopes": [
"string"
],
"source": "HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED",
"subject": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"userId": "userId"
}
]
}Returns Examples
{
"pagination": {
"nextToken": "nextToken"
},
"tokens": [
{
"id": "id",
"expiresAt": "2019-12-27T18:11:19.117Z",
"host": "host",
"integrationId": "integrationId",
"runnerId": "runnerId",
"scopes": [
"string"
],
"source": "HOST_AUTHENTICATION_TOKEN_SOURCE_UNSPECIFIED",
"subject": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"principal": "PRINCIPAL_UNSPECIFIED"
},
"userId": "userId"
}
]
}