From 83afa41419ad43d2322de90595b91d47ade7fb87 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 15 Aug 2016 11:53:12 +0200 Subject: [PATCH] Add X-Registry-Auth header to service API docs The service create/update endpoints support passing registry-authentication information, but this was not documented. This adds the missing information about passing a X-Registry-Auth header. Signed-off-by: Sebastiaan van Stijn Upstream-commit: bde35ef18a408a297b960c439dc029cfb5e15464 Component: engine --- .../reference/api/docker_remote_api_v1.24.md | 29 +++++++++++++++++-- .../reference/api/docker_remote_api_v1.25.md | 29 +++++++++++++++++-- 2 files changed, 52 insertions(+), 6 deletions(-) diff --git a/components/engine/docs/reference/api/docker_remote_api_v1.24.md b/components/engine/docs/reference/api/docker_remote_api_v1.24.md index 9e1bd5375b..2756ecf4f5 100644 --- a/components/engine/docs/reference/api/docker_remote_api_v1.24.md +++ b/components/engine/docs/reference/api/docker_remote_api_v1.24.md @@ -4403,7 +4403,10 @@ List services `POST /services/create` -Create a service +Create a service. When using this endpoint to create a service using a private +repository from the registry, the `X-Registry-Auth` header must be used to +include a base64-encoded AuthConfig object. Refer to the [create an +image](#create-an-image) section for more details. **Example request**: @@ -4563,6 +4566,14 @@ JSON Parameters: of: `"Ports": { "/: {}" }` - **VirtualIPs** +**Request Headers**: + +- **Content-type** – Set to `"application/json"`. +- **X-Registry-Auth** – base64-encoded AuthConfig object, containing either + login information, or a token. Refer to the [create an image](#create-an-image) + section for more details. + + ### Remove a service @@ -4667,11 +4678,16 @@ Return information on the service `id`. `POST /services/(id or name)/update` -Update the service `id`. +Update a service. When using this endpoint to create a service using a +private repository from the registry, the `X-Registry-Auth` header can be used +to update the authentication information for that is stored for the service. +The header contains a base64-encoded AuthConfig object. Refer to the [create an +image](#create-an-image) section for more details. **Example request**: - POST /services/1cb4dnqcyx6m66g2t538x3rxha/update HTTP/1.1 + POST /services/1cb4dnqcyx6m66g2t538x3rxha/update?version=23 HTTP/1.1 + Content-Type: application/json { "Name": "top", @@ -4780,6 +4796,13 @@ Update the service `id`. - **version** – The version number of the service object being updated. This is required to avoid conflicting writes. +**Request Headers**: + +- **Content-type** – Set to `"application/json"`. +- **X-Registry-Auth** – base64-encoded AuthConfig object, containing either + login information, or a token. Refer to the [create an image](#create-an-image) + section for more details. + **Status codes**: - **200** – no error diff --git a/components/engine/docs/reference/api/docker_remote_api_v1.25.md b/components/engine/docs/reference/api/docker_remote_api_v1.25.md index e1ff26f123..4948bd4359 100644 --- a/components/engine/docs/reference/api/docker_remote_api_v1.25.md +++ b/components/engine/docs/reference/api/docker_remote_api_v1.25.md @@ -4428,7 +4428,10 @@ List services `POST /services/create` -Create a service +Create a service. When using this endpoint to create a service using a private +repository from the registry, the `X-Registry-Auth` header must be used to +include a base64-encoded AuthConfig object. Refer to the [create an +image](#create-an-image) section for more details. **Example request**: @@ -4588,6 +4591,14 @@ JSON Parameters: of: `"Ports": { "/: {}" }` - **VirtualIPs** +**Request Headers**: + +- **Content-type** – Set to `"application/json"`. +- **X-Registry-Auth** – base64-encoded AuthConfig object, containing either + login information, or a token. Refer to the [create an image](#create-an-image) + section for more details. + + ### Remove a service @@ -4692,11 +4703,16 @@ Return information on the service `id`. `POST /services/(id or name)/update` -Update the service `id`. +Update a service. When using this endpoint to create a service using a +private repository from the registry, the `X-Registry-Auth` header can be used +to update the authentication information for that is stored for the service. +The header contains a base64-encoded AuthConfig object. Refer to the [create an +image](#create-an-image) section for more details. **Example request**: - POST /services/1cb4dnqcyx6m66g2t538x3rxha/update HTTP/1.1 + POST /services/1cb4dnqcyx6m66g2t538x3rxha/update?version=23 HTTP/1.1 + Content-Type: application/json { "Name": "top", @@ -4805,6 +4821,13 @@ Update the service `id`. - **version** – The version number of the service object being updated. This is required to avoid conflicting writes. +**Request Headers**: + +- **Content-type** – Set to `"application/json"`. +- **X-Registry-Auth** – base64-encoded AuthConfig object, containing either + login information, or a token. Refer to the [create an image](#create-an-image) + section for more details. + **Status codes**: - **200** – no error