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
Enumeration of the endpoints provided on this registry (as not all "OPTIONAL" endpoints may be present in all registries)
68
68
69
+
### Component: `tag-history`
70
+
71
+
This component is for endpoints relating to tag history operations on a repository.
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).
74
+
75
+
Tag history MAY be retrieved with a standard `GET` as follows.
76
+
77
+
```HTTP
78
+
GET /v2/<name>/_oci/tag-history/<tag>
79
+
```
80
+
81
+
`<name>` is the namespace of the repository, and `<tag>` is the name of the tag whose history is being queried.
82
+
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.
85
+
86
+
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).
114
+
115
+
Each descriptor object in the response MUST include the following properties:
116
+
117
+
-**`mediaType`***string*, REQUIRED
118
+
119
+
The media type of the manifest this tag pointed to at that point in time.
120
+
121
+
-**`size`***integer*, REQUIRED
122
+
123
+
The size in bytes of the manifest.
124
+
125
+
-**`digest`***string*, REQUIRED
126
+
127
+
The digest of the manifest, in the form `<algorithm>:<encoded>`.
128
+
129
+
-**`annotations`***map of strings*, REQUIRED
130
+
131
+
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.
152
+
153
+
##### Pagination Example
154
+
155
+
To fetch the first page of up to 10 results:
156
+
157
+
```HTTP
158
+
GET /v2/<name>/_oci/tag-history/<tag>?n=10
159
+
```
160
+
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:
162
+
163
+
```HTTP
164
+
GET /v2/<name>/_oci/tag-history/<tag>?n=10&before=2026-04-03T02%3A01%3A00Z
165
+
```
166
+
167
+
When the returned array contains fewer entries than `n` (or is empty), the client has reached the end of the history.
168
+
69
169
## Code representations
70
170
71
171
Golang structures for these JSON structures is available at [`github.com/opencontainers/distribution-spec/specs-go/v1/extensions`](https://github.com/opencontainers/distribution-spec/tree/main/specs-go/v1/extensions/)
0 commit comments