Querying Node Certificates

Function

This API is used to query the application and device certificates on an edge node.

URI

GET /v2/{project_id}/edgemgr/nodes/{node_id}/certs

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

node_id

Yes

Node ID.

Request

None

Response

Table 2 Parameters in the response body

Parameter

Type

Description

count

Integer

Number of application and device certificates associated with a node.

node_certs

Array of Table 3 objects

Certificate list on the node.

Table 3 node_cert

Parameter

Type

Description

id

String

Certificate ID.

name

String

Certificate name.

description

String

Certificate description.

created_at

Timestamp

Time when the certificate is created.

node_id

String

Node ID.

type

String

Certificate type. The options are as follows:

  • system: A system certificate is created by default when a node is registered.
  • application: Application certificate.
  • device: Device certificate.

serial_num

String

Certificate SN.

Example Request

None

Example Response

{
    "count": 3,
    "node_certs": [
        {
            "description": "test device cert",
            "created_at": "2020-03-31T14:52:25.405025+08:00",
            "serial_num": null,
            "node_id": "f66bfc52-db62-4701-b93d-50843262cbfb",
            "type": "device",
            "id": "104344d9-3e76-4ddc-8a90-ac601d812251",
            "name": "device-cert"
        },
        {
            "description": "",
            "created_at": "2020-03-31T07:32:36.992162+08:00",
            "serial_num": "",
            "node_id": "f66bfc52-db62-4701-b93d-50843262cbfb",
            "type": "system",
            "id": "54c66dbf-d0e9-4c25-8843-146199e434ea",
            "name": "sys-cert"
        },
        {
            "description": "test application cert",
            "created_at": "2020-03-31T14:50:28.544569+08:00",
            "serial_num": null,
            "node_id": "f66bfc52-db62-4701-b93d-50843262cbfb",
            "type": "application",
            "id": "65e8cb68-5b5d-4777-984c-94d16b39753a",
            "name": "app-cert"
        }
    ]
}

Error Codes

For details, see Error Codes.