Associating a Project with a Repository
Function
This API is used to associate a project with a repository.
Calling Method
For details, see Calling APIs.
URI
POST /cloudartifact/v5/maven/project/repository
Request Parameters
Parameter | Mandatory | Type | Description |
|---|---|---|---|
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 |
ids | No | Array of strings | Definition tab_id set. tab_id is used to mark a pair of Maven repositories (release and snapshot). Constraints A maximum of 100 tab_ids. Range N/A. Default value None |
Response Parameters
Status code: 200
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 | Object | Definition Response of the request. The return value varies according to the API. Range The value range varies according to the API. |
Example Requests
This API is used to associate a project with a repository.
https://artifact.example.myhuaweicloud.com/cloudartifact/v5/maven/project/repository
{
"project_id" : "e2ee90487d6349dd944a5767225f6f55",
"ids" : [ "5a775fdcb14f4431b6c0015618140bc3_tab_maven2_23", "5a775fdcb14f4431b6c0015618140bc3_tab_maven2_120", "5a775fdcb14f4431b6c0015618140bc3_tab_maven2_201" ]
} Example Responses
Status code: 200
OK
{
"status" : "success",
"trace_id" : "143006-1701220262276-256",
"result" : null
} Status Codes
Status Code | Description |
|---|---|
200 | OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

