Querying a Metadata File

Function

This API is provided for the administrator to query the metadata file imported to IAM for an identity provider.

The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.

URI

GET /v3-ext/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id}/metadata

Table 1 URI parameters

Parameter

Mandatory

Type

Description

idp_id

Yes

String

Identity provider name.

protocol_id

Yes

String

Protocol ID.

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Fill application/json;charset=utf8 in this field.

X-Auth-Token

Yes

String

Token with Security Administrator permissions.

Response Parameters

Table 3 Parameters in the response body

Parameter

Type

Description

id

String

Metadata file ID.

idp_id

String

Identity provider name.

entity_id

String

Value of entityID field in the metadata file.

protocol_id

String

Protocol ID.

domain_id

String

Account ID.

xaccount_type

String

Account source. This parameter is left blank by default.

update_time

String

Time when the metadata file is imported or updated.

data

String

Content of the metadata file.

Example Request

GET https://iam.myhuaweicloud.com/v3-ext/OS-FEDERATION/identity_providers/{idp_id}/protocols/{protocol_id}/metadata

Example Response

Status code: 200

The request is successful.

{
    "domain_id": "d78cbac186b744899480f25bd022f468",
    "update_time": "2020-02-12T13:26:25.000000",
    "data": "<md:EntityDescript...",
    "idp_id": "ACME",
    "protocol_id": "saml",
    "id": "11354739a6c940bc899fd9070ed1036d",
    "entity_id": "https://idp.test.com/idp/shibboleth",
    "xaccount_type": ""
}

Status Codes

Status Code

Description

200

The request is successful.

400

Invalid parameters.

401

Authentication failed.

403

Access denied.

500

Internal server error.

Error Codes

None