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
Copy file name to clipboardExpand all lines: extensions/_oci.md
+49-7Lines changed: 49 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ Content-Type: application/json
70
70
71
71
This component is for endpoints relating to tag history operations on a repository.
72
72
73
-
This endpoint returns the history of a tag, listing each manifest the tag has pointed to over time, in descending order by creation timestamp (newest first).
73
+
This endpoint returns the history of a tag, listing each manifest the tag has pointed to over time and each time the tag was deleted, in descending order by history entry timestamp (newest first).
74
74
75
75
Tag history MAY be retrieved with a standard `GET` as follows.
76
76
@@ -81,7 +81,12 @@ GET /v2/<name>/_oci/tag-history/<tag>
81
81
`<name>` is the namespace of the repository, and `<tag>` is the name of the tag whose history is being queried.
82
82
83
83
A successful request MUST return a `200 OK` response code.
84
-
If the tag or repository does not exist, the registry MUST return a `404 Not Found` response code.
84
+
If the repository does not exist, the registry MUST return a `404 Not Found` response code.
85
+
If the tag has no history, the registry MUST return a `404 Not Found` response code.
86
+
Tag history SHOULD remain queryable after the tag is deleted.
87
+
Deleted manifests MUST NOT be removed from tag history.
88
+
History entries for deleted manifests MUST continue to include the descriptor fields recorded when the tag was assigned to the manifest.
89
+
Tag history MAY be deleted after the repository is deleted.
85
90
86
91
Upon success, the response body MUST be a JSON array of descriptor objects in the following format:
Results MUST be sorted in descending order by the `org.opencontainers.tag.created` annotation value (i.e. the most recently created entry appears first).
127
+
Results MUST be sorted in descending order by the history entry timestamp, which is either the `org.opencontainers.tag.created` annotation value or the `org.opencontainers.tag.deleted` annotation value (i.e. the most recent entry appears first).
128
+
129
+
Each descriptor object in the response MUST be either a manifest descriptor or a delete marker.
114
130
115
-
Each descriptor object in the response MUST include the following properties:
131
+
Manifest descriptors MUST include the following properties:
116
132
117
133
-**`mediaType`***string*, REQUIRED
118
134
@@ -134,6 +150,32 @@ Each descriptor object in the response MUST include the following properties:
134
150
135
151
The RFC 3339 timestamp at which the tag was assigned to this manifest. Used as the sort key and as the cursor for time-based pagination.
136
152
153
+
Delete markers MUST be represented by the OCI empty descriptor and MUST include the following properties:
154
+
155
+
-**`mediaType`***string*, REQUIRED
156
+
157
+
MUST be `application/vnd.oci.empty.v1+json`.
158
+
159
+
-**`digest`***string*, REQUIRED
160
+
161
+
MUST be `sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a`.
162
+
163
+
-**`size`***integer*, REQUIRED
164
+
165
+
MUST be `2`.
166
+
167
+
-**`data`***string*, REQUIRED
168
+
169
+
MUST be `e30=`.
170
+
171
+
-**`annotations`***map of strings*, REQUIRED
172
+
173
+
Annotations associated with the historical tag entry. MUST include:
When provided, only entries whose `org.opencontainers.tag.created` value is strictly less than (i.e. older than) `before` will be returned.
151
-
This is used for time-based pagination: pass the `org.opencontainers.tag.created` value of the last entry returned in the previous response to retrieve the next page.
192
+
When provided, only entries whose history entry timestamp is strictly less than (i.e. older than) `before` will be returned.
193
+
This is used for time-based pagination: pass the `org.opencontainers.tag.created`or `org.opencontainers.tag.deleted`value of the last entry returned in the previous response to retrieve the next page.
152
194
153
195
##### Pagination Example
154
196
@@ -158,7 +200,7 @@ To fetch the first page of up to 10 results:
158
200
GET /v2/<name>/_oci/tag-history/<tag>?n=10
159
201
```
160
202
161
-
To fetch the next page, pass the `org.opencontainers.tag.created` value of the last result from the prior response as the `before` parameter:
203
+
To fetch the next page, pass the history entry timestamp of the last result from the prior response as the `before` parameter:
162
204
163
205
```HTTP
164
206
GET /v2/<name>/_oci/tag-history/<tag>?n=10&before=2026-04-03T02%3A01%3A00Z
0 commit comments