Updated on 2026-01-29 GMT+08:00

Query the Server Certificate

Function

This API is used by an application to query a server certificate on the platform.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

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

    iotda:servercertificate:query

    Read

    -

    g:EnterpriseProjectId

    -

    -

URI

GET /v5/iot/{project_id}/server-certificates/{server_certificate_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Parameter description: project ID. For details, see Obtaining a Project ID.

server_certificate_id

Yes

String

Parameter description: server certificate ID, which is unique and allocated by the platform.

Value: The value can contain up to 24 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Instance-Id

No

String

Parameter description: instance ID. Unique identifier of each instance in the physical multi-tenant scenario. Mandatory for professional editions and recommended in other cases. Log in to the IoTDA console and choose Overview in the navigation pane to view the instance ID. For details, see Viewing Instance Details.

Response Parameters

Status code: 201

Table 3 Response body parameters

Parameter

Type

Description

server_certificate_id

String

Unique ID.

common_name

String

Parameter description: common name of the certificate.

certificate_pem

String

Parameter description: certificate content, in PEM format.

effective_date

String

Time when the certificate starts to take effect. The value is in the format of yyyyMMdd'T'HHmmss'Z', for example, 20151212T121212Z.

expiry_date

String

Time when the certificate expires. The value is in the format of yyyyMMdd'T'HHmmss'Z', for example, 20151212T121212Z.

certificate_owner

String

Certificate owner.

certificate_issuer

String

Certificate issuer.

Example Requests

Queries the server certificate details.

GET https://{endpoint}/v5/iot/{project_id}/server-certificates/{server_certificate_id}

Example Responses

Status code: 201

Created

{
  "server_certificate_id" : "60f8c49169d4840337930a4b",
  "common_name" : "iotda",
  "certificate_pem" : "-----BEGINCERTIFICATE-----\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qjIO5nMJJuCMzdcoAU8N9KwkgXD+GLR9fYLEoEmq5CrhgaGDsCi85vCs\nmWhj5z8r5TG207xpmvH2KT447dnG+chMBE594ma85dCv+0mCDrqNToElipgT8+rY\nAYVClnIt3kbsTg1vSRNHadd+TpgRVxJZBF0fHcCAyc/2f3UJgPYNWShIetHM6BdI\n3fZ4H+eeHPjagm5kzmffli1cUv2/N+1hKUvcI4uFCqEwZRFtp90RyIbxUfQwi+Cs\nXVnwV+BZS5qD9bTcfxZMXhuVRwO/5xWYMYPN1uY=\n-----END CERTIFICATE-----",
  "effective_date" : "20251212T121212Z",
  "expiry_date" : "20301212T121212Z",
  "certificate_owner" : "CN=Huawei Cloud Core Network Product CA, O=Huawei, C=CN",
  "certificate_issuer" : "CN=Huawei Cloud Core Network Product CA, O=Huawei, C=CN"
}

Status Codes

Status Code

Description

201

Created

400

Bad Request

401

Unauthorized

404

Not Found

403

Forbidden

500

Internal Server Error

Error Codes

See Error Codes.