ListArtifacts - List artifact information
Retrieves artifact information from a repository.
|
Applicable editions |
Central edition, Region edition |
Endpoints 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 |
Read-only |
Request syntax
Central edition
GET https://{domain}/oapi/v1/packages/organizations/{organizationId}/repositories/{repoId}/artifacts
Region edition
GET https://{domain}/oapi/v1/packages/repositories/{repoId}/artifacts
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 |
|
repoId |
string |
path |
Yes |
Repository ID. |
my-repo |
|
repoType |
string |
query |
Yes |
Repository type. Valid values: GENERIC, DOCKER, MAVEN, NPM, NUGET, PYPI. |
MAVEN |
|
page |
integer |
query |
No |
Page number. |
|
|
perPage |
integer |
query |
No |
Number of items per page. Default: 10. |
10 |
|
search |
string |
query |
No |
Search by package name. |
junit |
|
orderBy |
string |
query |
No |
Sort field. Valid values: latestUpdate (most recent update time), gmtDownload (most recent download time). Default: latestUpdate. |
latestUpdate |
|
sort |
string |
query |
No |
Sort direction. Valid values: asc (ascending), desc (descending). Default: desc. |
desc |
Request examples
Central edition
curl -X 'GET' \
'https://{domain}/oapi/v1/packages/organizations/xxxxxxxx/repositories/my-repo/artifacts?repoType=MAVEN&page=&perPage=10&search=junit&orderBy=latestUpdate&sort=desc' \
-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/my-repo/artifacts?repoType=MAVEN&page=&perPage=10&search=junit&orderBy=latestUpdate&sort=desc' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
array |
||
| - |
object |
Module information. |
|
|
downloadCount |
integer |
Download count. |
100 |
|
gmtDownload |
integer |
Most recent download time. |
1728557118000 |
|
id |
integer |
Artifact ID. |
123456 |
|
latestUpdate |
integer |
Most recent update time. |
1728557118000 |
|
module |
string |
Module name. |
mypackage |
|
organization |
string |
Organization information. |
com.aliyun |
|
repositoryId |
string |
Repository ID. |
my_repo |
| versions |
array |
List of versions. |
|
| - |
object |
||
|
createTime |
integer |
Creation time. |
1728557118000 |
|
creator |
string |
Creator. |
xxxx |
|
gmtDownload |
integer |
Most recent download time. |
1728557118000 |
|
id |
integer |
Artifact version ID. |
123456 |
|
modifier |
string |
Modifier. |
xxx |
|
updateTime |
integer |
Modification time. |
1728557118000 |
|
version |
string |
Version number. |
1.4 |
Response example
[
{
"downloadCount": 100,
"gmtDownload": 1728557118000,
"id": 123456,
"latestUpdate": 1728557118000,
"module": "mypackage",
"organization": "com.aliyun",
"repositoryId": "my_repo",
"versions": [
{
"createTime": 1728557118000,
"creator": "xxxx",
"gmtDownload": 1728557118000,
"id": 123456,
"modifier": "xxx",
"updateTime": 1728557118000,
"version": "1.4"
}
]
}
]
Error codes
Visit the Error Code Center to view error codes related to this API.