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
Request parameters
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. |
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:
|
Example request
{ "name": "app-cert", "description": "", "type": "application" }
Response
Response parameters
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. Before use, decode it into a .tar.gz package using Base64. |
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot