Help Center/ CodeArts Artifact/ API Reference/ API/ Repository Capacity (Release Repos)/ Querying the Storage Capacity in a Project
Updated on 2025-09-08 GMT+08:00

Querying the Storage Capacity in a Project

Function

Query the storage capacity in a project.

Calling Method

For details, see Calling APIs.

URI

GET /devreposerver/v5/{project_id}/storage

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID, which uniquely identifies a CodeArts Req project. The value is the same as that of project_id in the URL https://{host}/cloudartifact/project/{project_id}/repository on the list page of self-hosted repos.

Constraints:

String length: 32 characters.

Value range:

N/A

Default value:

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

parent_id

No

String

Definition:

parent_id.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

status

String

Definition:

Request status.

Value range:

success: The request is successful.

error: The request fails.

trace_id

String

Definition:

Request ID, which uniquely identifies the current request.

Value range:

A string of digits and hyphens (-).

result

StorageInfoDOV5 object

Definition:

Storage capacity information.

Value range:

N/A

Table 4 StorageInfoDOV5

Parameter

Type

Description

used_space_length

Long

Definition:

Used space (in bytes).

Value range:

N/A

used_space

String

Definition:

Used space (with a unit).

Value range:

N/A

files_count

Long

Definition:

Number of files.

Value range:

N/A

Example Requests

Query the storage capacity in a project.

https://{URL}/devreposerver/v5/f132b62084774001b84c294c0eef27f2/storage

Example Responses

Status code: 200

OK

{
  "status" : "success",
  "trace_id" : "d35d637cf19846b497dbdb3e2771072b",
  "result" : {
    "used_space_length" : 363,
    "used_space" : "363.0B",
    "files_count" : 2
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.