From 6fc30199fee68e33195d6059fccd75d58083dbe2 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Wed, 6 May 2015 15:44:24 -0700 Subject: [PATCH] Add documentation for client version header Add documentation for Docker-Distribution-API-Version header required by clients closes #99 Signed-off-by: Derek McGowan (github: dmcgowan) --- docs/spec/api.md | 5 +++++ docs/spec/api.md.tmpl | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/docs/spec/api.md b/docs/spec/api.md index 9c905e24d..cc447fba9 100644 --- a/docs/spec/api.md +++ b/docs/spec/api.md @@ -233,6 +233,11 @@ If `404 Not Found` response status, or other unexpected status, is returned, the client should proceed with the assumption that the registry does not implement V2 of the API. +When a `200 OK` or `401 Unauthorized` response is returned, the +"Docker-Distribution-API-Version" header should be set to "registry/2.0". +Clients may require this header value to determine if the endpoint serves this +API. When this header is omitted, clients may fallback to an older API version. + ### Pulling An Image An "image" is a combination of a JSON manifest and individual layer files. The diff --git a/docs/spec/api.md.tmpl b/docs/spec/api.md.tmpl index 53d9a42a7..6f89c7d5c 100644 --- a/docs/spec/api.md.tmpl +++ b/docs/spec/api.md.tmpl @@ -233,6 +233,11 @@ If `404 Not Found` response status, or other unexpected status, is returned, the client should proceed with the assumption that the registry does not implement V2 of the API. +When a `200 OK` or `401 Unauthorized` response is returned, the +"Docker-Distribution-API-Version" header should be set to "registry/2.0". +Clients may require this header value to determine if the endpoint serves this +API. When this header is omitted, clients may fallback to an older API version. + ### Pulling An Image An "image" is a combination of a JSON manifest and individual layer files. The