Skip to content
This repository was archived by the owner on Jul 18, 2023. It is now read-only.

Commit 303a5e1

Browse files
committed
Fix references to artifactType in the /referrers api
Signed-off-by: Steve Lasker <[email protected]>
1 parent 6e25079 commit 303a5e1

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

manifest-referrers-api.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@ GET /v2/_ext/oci-artifacts/v1-rc1/{repository}/manifests/{digest}/referrers?n=10
2222
GET /v2/_ext/oci-artifacts/v1-rc1/net-monitor/manifests/sha256:3c3a4604a545cdc127456d94e421cd355bca5b528f4a9c1905b15da2eb4a4c6b/referrers?n=10
2323
```
2424

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.
2626

2727
### Request Artifacts of a specific media type
2828

2929
**template:**
3030
```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}
3232
```
3333

3434
**expanded example:**
3535

3636
```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
3838
```
3939

4040
### Artifact Referrers API results
4141

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.
4343

4444
This paged result MUST return the following elements:
4545

@@ -101,8 +101,7 @@ As an example, Notary v2 manifests use annotations to determine which Notary v2
101101
}
102102
],
103103
"@nextLink": "{opaqueUrl}"
104-
}
105-
```
104+
}```
106105

107106
[oci.artifact.manifest-spec]: ./artifact-manifest-spec.md
108107
[oci.artifact.manifest-spec-manifests]: ./artifact-manifest-spec.md#oci-artifact-manifest-properties

0 commit comments

Comments
 (0)