Creating a Maven Repository
Function
Create a Maven repository.
URI
POST /cloudartifact/v5/maven/repositories
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_name |
No |
String |
Repository name. |
format |
No |
String |
Repository type. |
description |
No |
String |
Repository description. |
release |
No |
String |
Release repository name. |
snapshot |
No |
String |
Snapshot repository name. |
includes_pattern |
No |
String |
Path. |
share_right |
No |
String |
Shared permission. |
project_id |
No |
String |
Project ID. |
type |
No |
String |
Repository type, local repository, and virtual repository. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
status |
String |
Result status. |
trace_id |
String |
Request ID. |
result |
String |
Returned result of the request. The return value varies according to the API. |
Example Requests
Create a Maven repository.
https://artifact.cn-south-1.myhuaweicloud.com/cloudartifact/v5/maven/repositories { "repository_name" : "testmaven", "format" : "maven2", "description" : "", "release" : "testmaven", "snapshot" : "testmaven", "includes_pattern" : "**/*", "share_right" : "PROJECT", "project_id" : "e2ee90487d6349dd944a5767225f6f55", "type" : "hosted" }
Example Responses
Status code: 200
OK
{ "status" : "success", "trace_id" : "143002-1701175135227-77", "result" : { "release" : "cn-north-7_5a775fdcb14f4431b6c0015618140bc3_maven_1_201", "snapshot" : "cn-north-7_5a775fdcb14f4431b6c0015618140bc3_maven_2_201" } }
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot