Code Monkey home page Code Monkey logo

Comments (2)

yuwaMSFT2 avatar yuwaMSFT2 commented on July 18, 2024

Repository APIs

List repositories:

GET /acr/v1/_catalog

Success:
Status: 200
Body:
{
"repositories": [
"mytest",
"mytest/subtest",
"mytest/subtest/sub2",
"testimage1",
"testimage2"
]
}

Delete repository:

DELETE /acr/v1/{repository}

Success:
Status: 202
Body:
{
"manifestsDeleted": [
"sha256:9fa82f24cbb11b6b80d5c88e0e10c3306707d97ff862a3018f22f9b49cef303a",
"sha256:c6328a5b98b858e9a71cc58da093432692d9b7994c30e6253a1d5d38ff28d458"
],
"tagsDeleted": [
"2",
"latest",
"windows"
]
}

Fail:
Status: 404
Body:
{
"errors": [
{
"code": "NAME_UNKNOWN",
"message": "repository name not known to registry",
"detail": {
"name": "erwerwer"
}
}
]
}

Get/Update repository attributes:

GET/PATCH /acr/v1/{repository}
***GET:

Success:
Status: 200
Body:
{
"registry": "yuwatest12-msft.azurecr-test.io",
"imagename": "testimage1",
"manifestcount": 4,
"tagcount": 2,
"changeableattributes": {
"deleteenabled": true,
"writeenabled": true,
"readenabled": true,
"listenabled": true
}
}

***PATCH:

Success:
Status: 204

List repository metadata:

GET /acr/v1/{repository}/_metadata

Success:
Status: 200
Body:
{
"registry": "yuwatest12-msft.azurecr-test.io",
"imagename": "testimage1",
"metadata": [
"mytest",
"mytest2"
]
}

Fail:
Status: 404
Body:
{
"errors": [
{
"code": "NAME_UNKNOWN",
"message": "repository name not known to registry"
}
]
}

Get/Set/Delete repository metadata:

GET/PUT/DELETE /acr/v1/{repository}/_metadata/{name}

***GET:

Success:
Status: 200

***PUT:

Success:
Status: 201

***Delete:

Success:
Status: 202

Tag APIs

List tags:

GET /acr/v1/{repository}/_tags

Success:
Status: 200
Body:
{
"registry": "yuwatest12-msft.azurecr-test.io",
"imageName": "testimage1",
"tags": [
{
"name": "azurecli",
"digest": "sha256:1bce822ce3c234b07c4036ead05c464e7972a565b63779c37d0efd25b69d188a",
"createdtime": "2017-12-15T21:42:44Z",
"lastupdatetime": "2017-12-15T21:42:44Z",
"signaturerecord": "{signer: [email protected]}",
"changeableattributes": {
"deleteenabled": true,
"writeenabled": true,
"readenabled": false,
"listenabled": true
}
},
{
"name": "latest",
"digest": "sha256:1bce822ce3c234b07c4036ead05c464e7972a565b63779c37d0efd25b69d188a",
"createdtime": "2017-12-15T21:42:48.2943219Z",
"lastupdatetime": "2017-12-15T21:42:48.2943219Z",
"changeableattributes": {
"deleteenabled": true,
"writeenabled": true,
"readenabled": true,
"listenabled": true
}
}
]
}

Delete tag:

DELETE /acr/v1/{repository}/_tags/{tag}

Success:
Status: 202

Get/Update tag attributes:

GET/PATCH /acr/v1/{repository}/_tags/{tag}
***GET:

Success
Status: 200
Body:
{
"registry": "yuwatest12-msft.azurecr-test.io",
"imageName": "testimage1",
"tags": [
{
"name": "azurecli",
"digest": "sha256:1bce822ce3c234b07c4036ead05c464e7972a565b63779c37d0efd25b69d188a",
"createdtime": "2017-12-15T21:42:44Z",
"lastupdatetime": "2017-12-15T21:42:44Z",
"signaturerecord": "{signer: [email protected]}",
"changeableattributes": {
"deleteenabled": true,
"writeenabled": true,
"readenabled": false,
"listenabled": true
}
}
]
}

***PATCH

Success
Status: 204

List tag metadata:

_GET /acr/v1/{repository}/_tags/{tag}/metadata

Success:
Status: 200
Body:
{
"registry": "yuwatest12-msft.azurecr-test.io",
"imageName": "testimage1",
"tagName": "azurecli",
"metadata": [
"description"
]
}

Get/Set/Delete tag metadata:

GET/PUT/DELETE /acr/v1/{repository}/_tags/{tag}/_metadata/{name}
***GET

Success
Status: 200
Body: this is a test

***PUT

Success
Status: 201

***DELETE

Success
Status: 202

Manifest APIs

List manifests:

GET /acr/v1/{repository}/_manifests

Success:
Status: 200
Body:
{
"registry": "yuwatest12-msft.azurecr-test.io",
"imagename": "testimage1",
"manifests": [
{
"digest": "sha256:1bce822ce3c234b07c4036ead05c464e7972a565b63779c37d0efd25b69d188a",
"lastupdatetime": "2017-12-15T21:42:43.3144771Z",
"architecture": "amd64",
"os": "linux",
"mediatype": "application/vnd.docker.distribution.manifest.v2+json",
"changeableattributes": {
"deleteenabled": true,
"writeenabled": true,
"readenabled": true,
"listenabled": true
}
},
{
"digest": "sha256:343054fdce616fc428094e2f6d3b97c6ae62f82fe9f8e54b0b1937e8a0297e68",
"lastupdatetime": "2017-11-13T23:58:50Z",
"architecture": "amd64",
"mediatype": "application/vnd.docker.distribution.manifest.v1+json",
"changeableattributes": {
"deleteenabled": true,
"writeenabled": true,
"readenabled": true,
"listenabled": true
}
},
{
"digest": "sha256:9fa82f24cbb11b6b80d5c88e0e10c3306707d97ff862a3018f22f9b49cef303a",
"lastupdatetime": "2017-11-16T20:02:08Z",
"mediatype": "application/vnd.docker.distribution.manifest.v2+json",
"changeableattributes": {
"deleteenabled": true,
"writeenabled": true,
"readenabled": true,
"listenabled": true
}
},
{
"digest": "sha256:c6328a5b98b858e9a71cc58da093432692d9b7994c30e6253a1d5d38ff28d458",
"lastupdatetime": "2017-11-13T23:24:41Z",
"architecture": "amd64",
"os": "linux",
"mediatype": "application/vnd.docker.distribution.manifest.v2+json",
"changeableattributes": {
"deleteenabled": true,
"writeenabled": true,
"readenabled": true,
"listenabled": true
}
}
]
}

Get/Update manifest attributes:

GET/PATCH /acr/v1/{repository}/_manifests/{digest}
***GET:

Success:
Status: 200
Body:
{
"data": {
"registry": "string",
"imagename": "string",
"manifests": [
{
"digest": "string",
"lastupdateTime": "string",
"architecture": "string",
"os": "string",
"mediatype": "string",
"references": [
{
"digest": "string",
"architecture": "string",
"os": "string"
}
],
"tags": [
"string"
],
"changeableattributes": {
"deleteenabled": true,
"writeenabled": true,
"listenabled": true,
"readenabled": true
}
}
]
}
}

***PATCH

Success:
Status: 204

List manifest metadata:

GET /acr/v1/{repository}/_manifests/{digest}/_metadata

Success
Status: 200
Body:
{
"registry": "yuwatest12-msft.azurecr-test.io",
"imagename": "testimage1",
"digest": "sha256:343054fdce616fc428094e2f6d3b97c6ae62f82fe9f8e54b0b1937e8a0297e68",
"metadata": [
"metadata2",
"testmetadata1"
]
}

Get/Set/Delete manifest metadata:

GET/PUT/DELETE /acr/v1/{repository}/_manifests/{digest}/_metadata/{name}
***GET

Success:
Status: 200
Body: test content

***PUT

Success:
Status: 201

***DELETE

Success:
Status: 202

from acr.

sajayantony avatar sajayantony commented on July 18, 2024

Would recommend submitting a readme and swagger as a PR so we can review individual elements there.
/cc @SteveLas

from acr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.