Help Center/ CodeArts Repo/ API Reference/ APIs/ V4/ Repository/ Viewing the Repository Import Task List of the Current User
Updated on 2026-01-27 GMT+08:00

Viewing the Repository Import Task List of the Current User

Function

This API is used to view the repository import task list of the current user.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

codeartsrepo:repository:getRepository

Read

-

-

-

-

URI

GET https://{hostURL}/v4/user/repository-import-records

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition

Offset, which starts from 0.

Value range:

0~2147483647

Default value:

0

limit

No

Integer

Definition

Number of returned records.

Value range:

1~100

Default value:

20

state

No

String

Definition:

Status.

Value range:

  • finished: The import is successful.

  • fail: The import fails.

  • importing: Importing.

Enumeration values:

  • finished

  • fail

  • importing

source_type

No

String

Definition:

Import source.

Value range:

  • gitee

  • self_managed_gitlab

  • gitlab

  • github

  • git

  • svn

  • coding

  • bitbucket

  • gerrit

  • codeup

Enumeration values:

  • gitee

  • self_managed_gitlab

  • gitlab

  • github

  • git

  • svn

  • coding

  • bitbucket

  • gerrit

  • codeup

created_after

No

String

Definition:

Filter those imported after the time.

created_before

No

String

Definition:

Filter those imported before the time.

finished_after

No

String

Definition:

Filter those imported and completed after the time.

finished_before

No

String

Definition:

Filter those imported and completed before the time.

search

No

String

Definition:

This API is used to search for repositories.

order_by

No

String

Definition:

Sorting order.

Value range:

  • created_at: Import time.

  • source_repo_name: Source repository path.

  • size: Source repository capacity.

Enumeration values:

  • created_at

  • source_repo_name

  • size

sort

No

String

Definition:

Return sorting.

  • asc: Ascending order.

  • desc: Descending order.

Default value:

desc

Enumeration values:

  • asc

  • desc

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token.

Constraints

N/A

Range

1–100,000 characters.

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response header parameters

Parameter

Type

Description

X-Total

String

Total number of results of the current request.

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of RepositoryImportRecordDto objects

Repository import task list of the current user.

Table 5 RepositoryImportRecordDto

Parameter

Type

Description

id

Integer

Definition:

Primary key ID.

Value range:

1~2147483647

state

String

Definition:

Rule name.

Constraints:

N/A.

Value range:

  • finished: The import is successful.

  • fail: The import fails.

  • importing: Importing.

Default value:

N/A.

Enumeration values:

  • **finished**: The import is successful.

  • **fail**: The import fails.

  • **importing**: Importing.

repository

RepositorySimpleDto object

Definition:

Repository information.

origin_full_name

String

Definition:

Source repository URL.

source_url

String

Definition:

Source repository address.

source_type

String

Definition:

Import source.

Value range:

  • gitee

  • self_managed_gitlab

  • gitlab

  • github

  • git

  • svn

  • coding

  • bitbucket

  • gerrit

  • codeup

Enumeration values:

  • gitee

  • self_managed_gitlab

  • gitlab

  • github

  • git

  • svn

  • coding

  • bitbucket

  • gerrit

  • codeup

created_at

String

Definition:

Import time.

finished_at

String

Definition:

Time when the import is complete.

repository_size

Double

Definition:

Source repository capacity.

Value range:

0.0~30720.0

error_message

String

Definition:

Failure cause.

target_full_name

String

Definition:

Repository path.

target_project_id

String

Definition:

Project ID.

Table 6 RepositorySimpleDto

Parameter

Type

Description

id

Integer

Definition:

Repository ID.

Value range:

1~2147483647

description

String

Definition:

Repository description.

name

String

Definition:

Repository name.

name_with_namespace

String

Definition:

Repository full name.

path

String

Definition:

Repository path.

path_with_namespace

String

Definition:

Complete repository path.

created_at

String

Definition:

Creation time.

updated_at

String

Definition:

Update time.

archived

Boolean

Definition:

Archived or not.

ssh_url_to_repo

String

Definition:

Repository SSH address.

http_url_to_repo

String

Definition:

HTTP address of the repository.

project_id

String

Definition:

Repository project ID.

project_name

String

Definition:

Repository project name.

develop_mode

String

Definition:

Repository development mode.

Value range:

  • normal

  • CR

Enumeration values:

  • normal

  • CR

moderation_result

Boolean

Definition:

Review status.

Example Requests

None

Example Responses

Status code: 200

Repository import task list of the current user.

[ {
  "id" : 2623,
  "state" : "finished",
  "repository" : {
    "id" : 2112032644,
    "description" : "Description.",
    "name" : "007test",
    "name_with_namespace" : "3fba70fab5864b40bb759b5466f34e87 / 007test",
    "path" : "007test",
    "path_with_namespace" : "3fba70fab5864b40bb759b5466f34e87/007test",
    "created_at" : "2025-05-26T10:54:37.000+08:00",
    "updated_at" : "2025-05-26T10:54:37.000+08:00",
    "archived" : false,
    "ssh_url_to_repo" : "git@example.com:3fba70fab5864b40bb759b5466f34e87/007test.git",
    "http_url_to_repo" : "https://example.com/3fba70fab5864b40bb759b5466f34e87/007test.git",
    "project_id" : "3fba70fab5864b40bb759b5466f34e87",
    "project_name" : "Scrum0520north7",
    "develop_mode" : "normal",
    "moderation_result" : true
  },
  "origin_full_name" : "3fba70fab5864b40bb759b5466f34e87/007",
  "source_url" : "https://example.com/3fba70fab5864b40bb759b5466f34e87/007.git",
  "source_type" : "git",
  "created_at" : "2025-05-26T10:54:37.000+08:00",
  "finished_at" : "2025-05-26T10:54:39.000+08:00",
  "repository_size" : 0,
  "target_full_name" : "Scrum0520north7/007test",
  "target_project_id" : "3fba70fab5864b40bb759b5466f34e87"
} ]

Status Codes

Status Code

Description

200

Repository import task list of the current user.

Error Codes

See Error Codes.