GetPipelineJobStepLog - Retrieve the logs of a pipeline job step

Updated at:

Retrieves the logs of a pipeline job step.

Applicable editions

Central edition, Region edition

Endpoints and authorization information

  • Obtain an endpoint: Replace {domain} in the request syntax.
  • Obtain a personal access token.
  • Obtain the organizationId: Required only for the Central edition. Go to the Basic Information page in the Tenant Management console to obtain the organization ID.

Product

Resource

Required permission

Pipeline

Pipeline run job

Read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/flow/organizations/{organizationId}/pipelines/{pipelineId}/pipelineRuns/{pipelineRunId}/jobs/{jobId}/step/log

Region edition

GET https://{domain}/oapi/v1/flow/pipelines/{pipelineId}/pipelineRuns/{pipelineRunId}/jobs/{jobId}/step/log

Request header

Parameter

Type

Required

Description

Example

x-yunxiao-token

string

Yes

The personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Position

Required

Description

Example

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

The ID of the organization.

5ebbc0228123212b59xxxxx

pipelineId

string

path

Yes

The ID of the pipeline.

123

pipelineRunId

string

path

Yes

The ID of the pipeline run. Call the ListPipelineRuns operation to get this ID.

1

jobId

string

path

Yes

The ID of the pipeline run job. Call the GetPipelineRun operation to get this ID.

1

stepIndex

integer

query

Yes

The index of the step. Call the GetPipelineJobSteps operation to get this index.

1

offset

integer

query

Yes

The starting position of the log.

1

limit

integer

query

Yes

The length of the log.

1

buildId

integer

query

Yes

The ID of the build. Call the GetPipelineJobSteps operation to get this ID.

1

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/flow/organizations/5ebbc0228123212b59xxxxx/pipelines/123/pipelineRuns/1/jobs/1/step/log?stepIndex=1&offset=1&limit=1&buildId=1' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/flow/pipelines/123/pipelineRuns/1/jobs/1/step/log?stepIndex=1&offset=1&limit=1&buildId=1' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example

-

object

last

integer

1

logs

string

The content of the log.

success

more

boolean

Whether more logs are available.

true

Response example

{
    "last": 1,
    "logs": "success",
    "more": true
}

Error codes

For API error codes, see the Error Code Center.