Resource: certificate
The SSL certificate used on the HTTPS port
http://{device}/api/npm.https/1.0/certificate
{ "expires_at": integer, "fingerprint": { "algorithm": string, "value": string }, "issuer": distingushed_name, "key": { "algorithm": string, "size": integer }, "pem": string, "subject": distingushed_name, "valid_at": integer }
Property Name | Type | Description | Notes |
---|---|---|---|
certificate | <object> | The SSL certificate used on the HTTPS port | Required properties: [issuer, subject, valid_at, expires_at, fingerprint, key, pem]; |
certificate.expires_at | <integer> | Time at which the certificate expires, in Unix epoch seconds | |
certificate.fingerprint | <object> | Certificate fingerprint information | Required properties: [algorithm, value]; |
certificate.fingerprint.algorithm | <string> | The algorithm used to calculate the fingerprint | |
certificate.fingerprint.value | <string> | Fingerprint value | |
certificate.issuer | <distingushed_name> | Distinguished name information | |
certificate.key | <object> | Certificate key information | Required properties: [algorithm, size]; |
certificate.key.algorithm | <string> | The algorithm used to generate the key | |
certificate.key.size | <integer> | The size (number of bits) of the key | |
certificate.pem | <string> | The certificate, in PEM format | |
certificate.subject | <distingushed_name> | Distinguished name information | |
certificate.valid_at | <integer> | Time at which the certificate becomes valid, in Unix epoch seconds |
Links
certificate: generate
Generate a new self-signed certificate and private key. This replaces the current certificate.
POST http://{device}/api/npm.https/1.0/certificate/generateRequest Body
Provide a distingushed_name data object.
Response BodyReturns a certificate data object.
certificate: get
GET http://{device}/api/npm.https/1.0/certificateResponse Body
Returns a certificate data object.
certificate: import
Import a new certificate and private key
POST http://{device}/api/npm.https/1.0/certificate/importRequest Body
Provide a request body with the following structure:
{ "passphrase": string, "pem": any }
Property Name | Type | Description | Notes |
---|---|---|---|
certificate.links.import.request | <object> | Import request format | Required properties: [pem]; |
certificate.links.import.request. passphrase |
<string> | Optional passphrase to decrypt private key | Optional; |
certificate.links.import.request.pem | <any> | Certificate and private key to import, in PEM format |
Returns a certificate data object.
Resource: http
HTTP configuration
http://{device}/api/npm.https/1.0/http
{ "available_ports": [ { "max": integer, "min": integer } ], "mode": string, "port": integer }
Property Name | Type | Description | Notes |
---|---|---|---|
http | <object> | HTTP configuration | Required properties: [mode, port]; |
http.available_ports | <array of <object>> | Port ranges HTTP may be configured to use | Read-only; Optional; |
http.available_ports[items] | <object> | A contiguous range of port values | Read-only; Required properties: [min, max]; |
http.available_ports[items].max | <integer> | Maximum port value in this range | Read-only; |
http.available_ports[items].min | <integer> | Minimum port value in this range | Read-only; |
http.mode | <string> | Mode of the HTTP port | Values: enabled, disabled, redirect_to_https; |
http.port | <integer> | Port HTTP is listening on (if not disabled) |
Links
Resource: https
HTTPS configuration
http://{device}/api/npm.https/1.0/https
{ "available_ports": [ { "max": integer, "min": integer } ], "available_ssl_protocols": [ string ], "port": integer, "ssl_ciphers": string, "ssl_protocols": [ string ] }
Property Name | Type | Description | Notes |
---|---|---|---|
https | <object> | HTTPS configuration | Required properties: [port, ssl_protocols, ssl_ciphers]; |
https.available_ports | <array of <object>> | Port ranges HTTPS may be configured to use | Read-only; Optional; |
https.available_ports[items] | <object> | A contiguous range of port values | Read-only; Required properties: [min, max]; |
https.available_ports[items].max | <integer> | Maximum port value in this range | Read-only; |
https.available_ports[items].min | <integer> | Minimum port value in this range | Read-only; |
https.available_ssl_protocols | <array of <string>> | The SSL protocols available to use | Optional; |
https.available_ssl_protocols[items] | <string> | ||
https.port | <integer> | Port HTTPS is listening on | |
https.ssl_ciphers | <string> | The SSL cipher string to use | |
https.ssl_protocols | <array of <string>> | The SSL protocols to enable. Each list item must be one of the values in the available_ssl_protocols list. | |
https.ssl_protocols[items] | <string> |
Links
Type: distingushed_name
Distinguished name information
{ "common_name": string, "country": string, "email": string, "locality": string, "organization": string, "organizational_unit": string, "state": string }
Property Name | Type | Description | Notes |
---|---|---|---|
distingushed_name | <object> | Distinguished name information | |
distingushed_name.common_name | <string> | Common name (CN) | Optional; |
distingushed_name.country | <string> | Country code (C) | Optional; |
distingushed_name.email | <string> | Email address | Optional; |
distingushed_name.locality | <string> | Locality (L) | Optional; |
distingushed_name.organization | <string> | Organization name (O) | Optional; |
distingushed_name.organizational_unit | <string> | Organization unit name (OU) | Optional; |
distingushed_name.state | <string> | State or province name (ST) | Optional; |