You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 18, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: manifest-referrers-api.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,24 +22,24 @@ GET /v2/_ext/oci-artifacts/v1-rc1/{repository}/manifests/{digest}/referrers?n=10
22
22
GET /v2/_ext/oci-artifacts/v1-rc1/net-monitor/manifests/sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b/referrers?n=10
23
23
```
24
24
25
-
The `/referrers` API MAY provide for filtering of referenceTypes. Artifact clients MUST account for [distribution-spec][oci-distribution-spec] implementations that MAY NOT support filtering. Artifact clients MUST revert to client side filtering to determine which referenceTypes they will process.
25
+
The `/referrers` API MAY provide for filtering of `artifactTypes`. Artifact clients MUST account for [distribution-spec][oci-distribution-spec] implementations that MAY NOT support filtering. Artifact clients MUST revert to client side filtering to determine which `artifactTypes` they will process.
26
26
27
27
### Request Artifacts of a specific media type
28
28
29
29
**template:**
30
30
```rest
31
-
GET /v2/_ext/oci-artifacts/v1-rc1/{repository}/manifests/{digest}/referrers?n=10&referenceType={referenceType}
31
+
GET /v2/_ext/oci-artifacts/v1-rc1/{repository}/manifests/{digest}/referrers?n=10&artifactType={artifactType}
32
32
```
33
33
34
34
**expanded example:**
35
35
36
36
```rest
37
-
GET /v2/_ext/oci-artifacts/v1-rc1/net-monitor/manifests/sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b/references?n=10&referenceType=application/vnd.oci.notary.v2
37
+
GET /v2/_ext/oci-artifacts/v1-rc1/net-monitor/manifests/sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b/referrers?n=10&artifactType=application/vnd.oci.notary.v2
38
38
```
39
39
40
40
### Artifact Referrers API results
41
41
42
-
[distribution-spec][oci-distribution-spec] implementations MAY implement `referenceType` filtering. Some artifacts types including Notary v2 signatures, may return multiple signatures of the same `referenceType`. To avoid an artifact client from having to retrieve each manifest, just to determine if it's the specific artifact needed to continue processing, the `/referrers` API will return a collection of manifests, including the annotations within each manifest. By providing manifests, as opposed to manifest descriptors, a specific artifact client can find the relevant properties they need to determine which artifact to retrieve. For example, Notary v2 MAY use an annotation: `"org.cncf.notary.v2.signature.subject": "wabbit-networks.io"`, which the client could use to determine which signature to pull from the registry. Using annotations, clients can reduce round trips and the data returned to determine which artifacts the specific client may require reducing network traffic and API calls.
42
+
[distribution-spec][oci-distribution-spec] implementations MAY implement `artifactType` filtering. Some artifacts types including Notary v2 signatures, may return multiple signatures of the same `artifactType`. To avoid an artifact client from having to retrieve each manifest, just to determine if it's the specific artifact needed to continue processing, the `/referrers` API will return a collection of manifests, including the annotations within each manifest. By providing manifests, as opposed to manifest descriptors, a specific artifact client can find the relevant properties they need to determine which artifact to retrieve. For example, Notary v2 MAY use an annotation: `"org.cncf.notary.v2.signature.subject": "wabbit-networks.io"`, which the client could use to determine which signature to pull from the registry. Using annotations, clients can reduce round trips and the data returned to determine which artifacts the specific client may require reducing network traffic and API calls.
43
43
44
44
This paged result MUST return the following elements:
45
45
@@ -101,8 +101,7 @@ As an example, Notary v2 manifests use annotations to determine which Notary v2
0 commit comments