Updated on 2023-11-23 GMT+08:00

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 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

node_id

Yes

String

Node ID.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Maximum number of records that can be returned.

offset

No

Integer

Offset. The records after this offset will be queried.

Request

Table 3 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format).

The default value application/json is recommended.

X-Auth-Token

Yes

String

User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response

Response parameters

Table 4 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 5 objects

Certificate list on the node.

Table 5 node_cert

Parameter

Type

Description

id

String

Certificate ID.

name

String

Certificate name.

description

String

Certificate description.

created_at

String

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 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.