GetTask - View batch tasks

Updated at:

Use OpenAPI to view batch tasks.

Applicable editions

Central edition, Region edition

Endpoint and authorization information

  • Get the endpoint: Replace {domain} in the API request syntax.

  • Get a personal access token.

  • Get organizationId: Required for Central edition only. Go to the Basic Information page in the Organization Management console to obtain your organization ID.

Product

Resource

Required permission

Artifact Repository

Batch tasks

Read-only

Request syntax

Central edition

GET https://{domain}/oapi/v1/packages/organizations/{organizationId}/tasks/{id}

Region edition

GET https://{domain}/oapi/v1/packages/tasks/{id}

Request headers

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

Personal access token.

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

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

Organization ID.

xxxxxxxx

id

integer

path

Yes

Task ID. See the return value of the DeleteArtifact - Delete a single artifact API.

123456

Request examples

Central edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/packages/organizations/xxxxxxxx/tasks/123456' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'GET' \
  'https://{domain}/oapi/v1/packages/tasks/123456' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

object

Batch task.

action

string

Action. REPO_DEL: delete repository, REPO_RES: restore repository, MODULE_DEL: delete artifact, MODULE_RES: restore artifact.

MODULE_DEL

data

string

Object information.

module id

description

string

Description.

Delete artifacts such as abc

gmtCreate

integer

Task creation time.

1728557118000

id

integer

Task ID.

123456

repoId

string

Repository ID.

flow_generic_repo

repoType

string

Repository type.

GENERIC

status

string

Task status. INIT: initialization, RUNNING: running, SUCCESS: success, FAILED: failed.

RUNNING

Response example

{
    "action": "MODULE_DEL",
    "data": "module id",
    "description": "Delete artifacts such as abc",
    "gmtCreate": 1728557118000,
    "id": 123456,
    "repoId": "flow_generic_repo",
    "repoType": "GENERIC",
    "status": "RUNNING"
}

Error codes

Visit the Error Code Center to view API-related error codes.