Updated on 2025-10-30 GMT+08:00

Generating a Temporary Login Command (Enhanced)

Description

Generate a temporary login command using the value of X-Swr-Dockerlogin in the response header and the value of host in the response body.

Constraints

None

API Calling

For details, see Calling APIs.

Authorization Information

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

URI

POST /v2/manage/utils/authorizationtoken

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). The value can be:

application/json;charset=utf-8

application/json

X-Auth-Token

Yes

String

User token.

The token can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 2 Response header parameters

Parameter

Type

Description

X-Swr-Dockerlogin

String

Docker login command, for example, docker login -u bearertoken@OWFPUKBXI -p 6f0779072********f921b7f33.

x-swr-expireat

String

Expiration time of the login command, for example, 2024-12-26T11:22:50.769Z.

Table 3 Response body parameter

Parameter

Type

Description

auths

Map<String,AuthInfo>

Authentication information.

Table 4 AuthInfo

Parameter

Type

Description

auth

String

Base64-encoded authentication information.

Example Request

POST https://{endpoint}/v2/manage/utils/authorizationtoken

Example Response

Status code: 200

Creation succeeded.

{
  "auths" : {
    "swr.xxx" : {
      "auth" : "Y24tbm9ydGg******hhMTgzMGVmN2RhZjJm"
    }
  }
}

Status Codes

Status Codes

Description

200

Creation succeeded.

400

Request error.

401

Authentication failed.

500

Internal error.

Error Codes

For details, see Error Codes.