Skip to content

Commit

Permalink
Merge pull request #380 from imjasonh/filters-applied
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjohnsonjr authored Feb 8, 2023
2 parents f298409 + e66aadc commit acfc11d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ The `Link` header MUST be set according to [RFC5988](https://www.rfc-editor.org/

The registry SHOULD support filtering on `artifactType`.
To fetch the list of referrers with a filter, perform a `GET` request to a path in the following format: `/v2/<name>/referrers/<digest>?artifactType=<mediaType>` <sup>[end-12b](#endpoints)</sup>.
If filtering is requested and applied, the response MUST include an annotation (`org.opencontainers.referrers.filtersApplied`) denoting that an `artifactType` filter was applied.
If multiple filters are applied, the annotation MUST contain a comma separated list of applied filters.
If filtering is requested and applied, the response MUST include a header `OCI-Filters-Applied: artifactType` denoting that an `artifactType` filter was applied.
If multiple filters are applied, the header MUST contain a comma separated list of applied filters.

Example request with filtering:

Expand All @@ -582,6 +582,7 @@ GET /v2/<name>/referrers/<digest>?artifactType=application/vnd.example.sbom.v1
Example response with filtering:

```json
OCI-Filters-Applied: artifactType
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.index.v1+json",
Expand All @@ -597,9 +598,6 @@ Example response with filtering:
}
}
],
"annotations": {
"org.opencontainers.referrers.filtersApplied": "artifactType"
}
}
```

Expand Down

0 comments on commit acfc11d

Please sign in to comment.