@@ -559,6 +559,42 @@ The tags MUST be in lexical order.
559559
560560When using the ` last ` query parameter, the ` n ` parameter is OPTIONAL.
561561
562+ Registries MAY support an enhanced tag listing experience when clients pass an ` Accept ` header value of
563+ ` application/vnd.oci.image.index.v1+json ` . If a registry supports this mode, they MUST support these additional query parameters:
564+ * ` sort_by ` - allowed values are ` created_at ` , ` name `
565+ * ` sort_order ` - allowed values are ` asc ` and ` desc `
566+ * ` artifact_type ` - Artifact types to include in response, can be specified multiple times. If not set, do not return artifacts.
567+
568+ The ` last ` query parameter MUST contain a value consistent with the specified ` sort_by ` .
569+
570+ The response MUST be a json body in the following format:
571+ ``` json
572+ {
573+ "schemaVersion" : 2 ,
574+ "mediaType" : " application/vnd.oci.image.index.v1+json" ,
575+ "manifests" : [
576+ {
577+ "mediaType" : " application/vnd.oci.image.manifest.v1+json" ,
578+ "size" : 1234 ,
579+ "digest" : " sha256:a1a1a1..." ,
580+ "annotations" : {
581+ "org.opencontainers.image.created" : " 2022-01-01T14:42:55Z" ,
582+ "org.opencontainers.image.ref.name" : " <tag1>"
583+ }
584+ },
585+ {
586+ "mediaType" : " application/vnd.oci.image.manifest.v1+json" ,
587+ "size" : 1234 ,
588+ "digest" : " sha256:a2a2a2..." ,
589+ "annotations" : {
590+ "org.opencontainers.image.created" : " 2022-01-01T07:21:33Z" ,
591+ "org.opencontainers.image.ref.name" : " <tag2>"
592+ }
593+ }
594+ ]
595+ }
596+ ```
597+
562598_ Implementers note:_
563599Previous versions of this specification did not include the ` Link ` header.
564600Clients depending on the number of tags returned matching ` n ` may prematurely stop pagination on registries using the ` Link ` header.
0 commit comments