Lists artifact repositories and their details for the current user.
|
Applicable editions |
Central edition, Region edition |
Endpoint and authorization information
-
Get the endpoint: Replace {domain} in the API request syntax.
-
Get organizationId: Required only for the Central edition. Go to the Basic Information page in the Organization Management console to obtain your organization ID.
|
Product |
Resource |
Required permission |
|
Artifact Repository |
Artifact Repository |
Read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/packages/organizations/{organizationId}/repositories
Region edition
GET https://{domain}/oapi/v1/packages/repositories
Request headers
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
Personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
organizationId |
string |
path |
|
Organization ID. |
xxxxxxxx |
|
repoTypes |
string |
query |
No |
Repository type. Valid values: GENERIC, DOCKER, MAVEN, NPM, NUGET. Separate multiple types with commas. |
MAVEN |
|
repoCategories |
string |
query |
No |
Repository mode. Valid values: Hybrid, Local, Proxy, ProxyCache, Group. Separate multiple modes with commas. |
Hybrid |
|
perPage |
integer |
query |
No |
Number of items per page. Default: 8. |
|
|
page |
integer |
query |
No |
Page number. |
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/packages/organizations/xxxxxxxx/repositories?repoTypes=MAVEN&repoCategories=Hybrid&perPage={perPage}&page={page}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region edition
curl -X 'GET' \
'https://{domain}/oapi/v1/packages/repositories?repoTypes=MAVEN&repoCategories=Hybrid&perPage={perPage}&page={page}' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
array |
||
| - |
object |
Artifact repository. |
|
|
accessLevel |
string |
Visibility. PRIVATE: accessible only by repository members. INTERNAL: accessible by all organization members. |
PRIVATE |
|
latestUpdate |
string |
Last updated timestamp. |
1729064771000 |
|
repoCategory |
string |
Repository mode. |
Hybrid |
|
repoDesc |
string |
Repository description. |
Artifacts built by pipelines |
|
repoDescriptor |
string |
Repository descriptor file. |
{"enableMaxVersionPerArtifact":false,"hybridDescriptor":{"cacheExpireTime":-1,"fuseTime":180000,"metaCacheExpireTime":1800,"proxies":[]},"isOverwriteArtifact":"N","maxVersionPerArtifact":-1,"versionStrategy":"CUSTOM"} |
|
repoId |
string |
Repository ID. |
flow_generic_repo |
|
repoName |
string |
Repository name. |
Pipeline artifact repository |
|
repoType |
string |
Repository type. |
GENERIC |
|
star |
boolean |
Whether the repository is starred. |
false |
Response example
[
{
"accessLevel": "PRIVATE",
"latestUpdate": "1729064771000",
"repoCategory": "Hybrid",
"repoDesc": "Artifacts built by pipelines",
"repoDescriptor": "{\"enableMaxVersionPerArtifact\":false,\"hybridDescriptor\":{\"cacheExpireTime\":-1,\"fuseTime\":180000,\"metaCacheExpireTime\":1800,\"proxies\":[]},\"isOverwriteArtifact\":\"N\",\"maxVersionPerArtifact\":-1,\"versionStrategy\":\"CUSTOM\"}",
"repoId": "flow_generic_repo",
"repoName": "Pipeline artifact repository",
"repoType": "GENERIC",
"star": false
}
]
Error codes
For API error codes, see the Error Code Center.