Updated on 2025-12-05 GMT+08:00

Editing a Repository

Function

This API is used to edit a repository.

Calling Method

For details, see Calling APIs.

URI

PUT /cloudartifact/v5/repositories/tab/{tab_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

tab_id

Yes

String

Definition:

tab_id, ID of a pair of Maven repositories (release and snapshot).

Constraints

N/A.

Range

N/A.

Default value

N/A.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

repo_name

Yes

String

Definition

Repository name.

Constraints

String length: 1–20 characters.

Range

N/A.

Default value

None

includes_pattern

Yes

String

Definition

Include Patterns.

Constraints

Maximum length: 512 characters.

Range

N/A.

Default value

None

project_id

No

String

Definition

Project ID, which can be obtained by calling an API or from the console. For details about how to obtain the project ID, see Obtaining a Project ID (CloudArtifact_api_0015.xml).

Constraints

The value contains 32 characters. Only letters and digits are supported.

Range

N/A.

Default value

None

description

No

String

Definition

Repository description.

Constraints

Maximum length: 200 characters.

Range

N/A.

Default value

None

snapshot

No

String

Definition

Snapshot repository name.

Constraints

String length: 1–20 characters.

Range

N/A.

Default value

None

release

No

String

Definition

Release repository name.

Constraints

String length: 1–20 characters.

Range

N/A.

Default value

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

status

String

Definition

Request status.

Range

success: The request is successful.

error: The request fails.

trace_id

String

Definition

Request ID, which uniquely identifies the current request.

Range

A string of digits and hyphens (-).

result

MavenTabRepo object

Definition

Repository information.

Range

N/A.

Table 4 MavenTabRepo

Parameter

Type

Description

release

String

Definition

Release repository name.

Range

N/A.

snapshot

String

Definition

Snapshot repository name.

Range

N/A.

Example Requests

This API is used to edit a Maven repository.

https://artifact.example.myhuaweicloud.com/cloudartifact/v5/repositories/tab/{tab_id}

{
  "repo_name" : "testmaven",
  "description" : "12",
  "includes_pattern" : "**/*",
  "release" : "testmaven",
  "snapshot" : "testmaven"
}

Example Responses

Status code: 200

OK

{
  "status" : "success",
  "trace_id" : "143002-1701175397265-80",
  "result" : {
    "release" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_maven_1_201",
    "snapshot" : "xx-xxxxx-x_5a775fdcb14f4431b6c0015618140bc3_maven_2_201"
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.