Updated on 2023-09-14 GMT+08:00

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.

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

Access token issued to a user to bear its identity and permissions.

For details about the permissions required by the token, see Actions.

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.

NOTE:

The value is a UTC time in the YYYY-MM-DDTHH:mm:ss.ssssssZ format, for example, 2023-06-28T08:56:33.710000Z. For details about the date and timestamp formats, see ISO-8601.

data

String

Content of the metadata file.

Example Request

Request for querying a metadata file

GET https://iam.myhuaweicloud.eu/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