Skip to content
Ona Docs

CreateRunnerLogsToken

client.runners.createLogsToken(RunnerCreateLogsTokenParams { runnerId } body, RequestOptionsoptions?): RunnerCreateLogsTokenResponse { accessToken }
POST/gitpod.v1.RunnerService/CreateRunnerLogsToken

Creates an access token for runner logs and debug information.

Generated tokens are valid for one hour and provide runner-specific access permissions. The token is scoped to a specific runner and can be used to access support bundles.

Examples

  • Generate runner logs token:

    runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
ParametersExpand Collapse
body: RunnerCreateLogsTokenParams { runnerId }
runnerId?: string

runner_id specifies the runner for which the logs token should be created.

+required

formatuuid
ReturnsExpand Collapse
RunnerCreateLogsTokenResponse { accessToken }
accessToken: string

access_token is the token that can be used to access the logs and support bundle of the runner

CreateRunnerLogsToken

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const response = await client.runners.createLogsToken({
  runnerId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
});

console.log(response.accessToken);
{
  "accessToken": "accessToken"
}
Returns Examples
{
  "accessToken": "accessToken"
}