Creating a Node Certificate
Function
This API is used to create application and device certificates for an edge node.
URI
POST /v2/{project_id}/edgemgr/nodes/{node_id}/certs
| 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
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Certificate name. |
| description | No | String | Certificate description. The value contains a maximum of 255 characters. The following characters are not allowed: ^~#$%&*<>()[]{}'"\ |
| type | Yes | String | Certificate type. The options are as follows:
|
Response
| 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:
|
| serial_num | String | Certificate SN. |
| ca | String | Root certificate. |
| certificate | String | Certificate. |
| private_key | String | Private key. |
| package | String | Base64-encoded character string. This value is obtained after Base64 encoding is performed on the .tar.gz package of the certificate, root certificate, and private key. |
Example Request
{
"name": "app-cert",
"description": "",
"type": "application"
} Example Response
{
"id": "243931b3-2651-4147-becc-d4215c8c2296",
"name": "app-cert",
"description": "",
"created_at": "2020-09-22T17:55:41.577635881Z",
"node_id": "9ebd8efb-9fdd-44a1-abda-9cdbc287a867",
"type": "application",
"serial_num": "",
"ca": "",
"certificate": "",
"private_key": "",
"package": ""
} Error Codes
For details, see Error Codes.
Last Article: Querying Node Certificates
Next Article: Deleting a Node Certificate
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.