Updated on 2026-09-23 GMT+08:00

Obtaining the Config Information of an Image

Function

This API is used to obtain the image config information.

Calling Method

For details, see Calling APIs.

Authorization Information

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

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    swr:repo:getRepoTagConfig

    Read

    repo *

    -

    -

    -

URI

GET /v2/manage/namespaces/{namespace}/repos/{repository}/tags/{tag}/config

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

namespace

Yes

String

Organization name Enter 1 to 64 characters, starting with a lowercase letter and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. Periods, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed.

repository

Yes

String

Image repository name. The name contains 1 to 128 characters, starting and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), slashes (/), underscores (_), and hyphens (-) are allowed. Periods, slashes, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. If the parameter value contains a slash (/), replace it with a dollar sign ($) before sending the request.

tag

Yes

String

Image tag

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

-

String

Example Requests

GET https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/tags/{tag}/config

Example Responses

Status code: 200

'{\"architecture\":\"amd64\",\"config\":{\"Hostname\":\"\",\"Domainname\":\"\",\"User\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":[\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"],\"Cmd\":null,\"Image\":\"sha256:46707487451662e1e73783dbc15652f47aa970d670097c3ba5d3a8b258217695\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"OnBuild\":null,\"Labels\":null},\"container\":\"8d7f5bb14f04a5133af46d3b5386eb22db0d2ac6759ca14a29da78ce6de51131\",\"container_config\":{\"Hostname\":\"8d7f5bb14f04\",\"Domainname\":\"\",\"User\":\"\",\"AttachStdin\":false,\"AttachStdout\":false,\"AttachStderr\":false,\"Tty\":false,\"OpenStdin\":false,\"StdinOnce\":false,\"Env\":[\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"],\"Cmd\":[\"/bin/sh\",\"-c\",\"#(nop) ADD file:b21f345b5228b34cf0cf1840b6ad34f82ef8a67dcca48579cb4e850b61210ac2 in ./ \"],\"Image\":\"sha256:46707487451662e1e73783dbc15652f47aa970d670097c3ba5d3a8b258217695\",\"Volumes\":null,\"WorkingDir\":\"\",\"Entrypoint\":null,\"OnBuild\":null,\"Labels\":{}},\"created\":\"2026-06-15T11:34:56.576176011Z\",\"docker_version\":\"17.06.1-ce-rc1\",\"history\":[{\"created\":\"2026-06-15T11:34:51.570414484Z\",\"created_by\":\"/bin/sh -c #(nop) ADD file:390bb274680b554bff52c464573e152bb99affac2dcf15a7db920e3a19120911 in ./ \"},{\"created\":\"2026-06-15T11:34:54.400891407Z\",\"created_by\":\"/bin/sh -c #(nop) ADD file:b35aec1b4701f41f8e34c937f9a7e183789697154484a859d0c2fd5ff6421e41 in ./ \"},{\"created\":\"2026-06-15T11:34:56.576176011Z\",\"created_by\":\"/bin/sh -c #(nop) ADD file:b21f345b5228b34cf0cf1840b6ad34f82ef8a67dcca48579cb4e850b61210ac2 in ./ \"}],\"os\":\"linux\",\"rootfs\":{\"type\":\"layers\",\"diff_ids\":[\"sha256:19492fcceac65df11eb6cf171166925eae8ff69a398c4056fba48af07d4dff97\",\"sha256:cb9e8787a9bbdaf932cff30cacdc8d14f297b9dab22dd2cc96f2401540048bb9\",\"sha256:0654966eb0203f59f34b66d77b99bedfa8c87094532ce4e6d0ece3ac317dfaf3\"]}}'

Status Codes

Status Code

Description

200

The image config information has been queried.

400

Request error.

401

Authentication failed.

403

Access denied.

404

Resource not found.

500

Internal error.

Error Codes

See Error Codes.