Generate Self-Signed Certificate
The /files/tls/<id>/certificate/generate URL generates a new self-signed device certificate for the specific TLS context.
URL
/api/v1/files/tls/<id>/certificate/generate
HTTP Method
POST
Supported Request JSON attributes:
Parameter |
Type |
Description |
---|---|---|
subjectName |
String |
Subject name [CN] of the generated certificate. Default = <empty>. |
organizationalUnit |
String |
Organizational unit [OU] of the generated certificate. Default = <empty>. |
companyName |
String |
Company name [O] of the generated certificate. Default = <empty>. |
localityName |
String |
Locality of city name [L] of the generated certificate. Default = <empty>. |
state |
String |
State [ST] of the generated certificate. Default = <empty>. |
countryCode |
String |
Country code [C] of the generated certificate. Default = <empty>. |
Supported Responses
■ | 200 OK |
■ | 400 Bad request – provided certificate file is wrong (e.g. not in PEM format) |
■ | 409 Conflict – private key can’t be loaded due to current device state (e.g. redundant board is synchronizing). |
Example
■ | Request: |
POST /api/v1/files/tls/2/certificate/generate HTTP/1.1 Host: 10.4.219.229 Content-Type: application/json { "subjectName": "lync-gw.company.com" }
■ | Response: |
HTTP/1.1 200 OK Content-Type: application/json { "description": "Self-signed certificate was successfully generated" }