System Settings API.
Created Mar 27, 2024 at 07:12 PM

Overview

Resources

Settings: Get System Settings

Get System Settings.

GET https://{device}/api/npm.system_settings/1.0/settings
Authorization

This request requires authorization.

Response Body

On success, the server returns a response body with the following structure:

  • JSON
{
  "local_time": string,
  "timezone": string,
  "http": {
    "port": number,
    "disabled": string
  },
  "ntp_servers": {
    "items": [
      {
        "order": number,
        "ipaddr": string,
        "encryption": string,
        "index": number
      }
    ]
  },
  "https": {
    "port": number,
    "ssl_protocols": string,
    "ssl_ciphers": string,
    "disabled": string
  },
  "licenses": {
    "items": [
      {
        "featurekey": string,
        "status": string,
        "description": string,
        "serial_number": string,
        "scope": string,
        "install_method": string,
        "key": string,
        "host": string
      }
    ]
  }
}

Example:
{
  "http": {
    "disabled": true, 
    "port": 80
  }, 
  "ntp_servers": {
    "items": [
      {
        "encryption": "NONE", 
        "ipaddr": "10.38.130.25", 
        "order": 1, 
        "index": 0
      }, 
      {
        "encryption": "MD5", 
        "ipaddr": "10.38.128.29", 
        "order": 2, 
        "index": 2001
      }, 
      {
        "encryption": "SHA1", 
        "ipaddr": "10.38.128.30", 
        "order": 3, 
        "index": 2002
      }
    ]
  }, 
  "local_time": "1588195616", 
  "https": {
    "disabled": false, 
    "ssl_ciphers": "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH", 
    "port": 443, 
    "ssl_protocols": "TLSv1.2"
  }, 
  "licenses": {
    "items": [
      {
        "status": "Valid", 
        "description": "Unlimited", 
        "install_method": "factory", 
        "host": "uihost", 
        "key": "LK1-VLAB-0000-0000-1-DE6E-948E-A21B", 
        "serial_number": "Z59VM0009E364", 
        "scope": "feature", 
        "featurekey": "VLAB"
      }
    ]
  }, 
  "timezone": "America/New_York"
}
Property Name Type Description Notes
SystemSettings <object> System Settings.
SystemSettings.local_time <string> System local time (unix epoch).
SystemSettings.timezone <string> System time zone.
SystemSettings.http <object> HTTP Settings.
SystemSettings.http.port <number> HTTP port.
SystemSettings.http.disabled <string> Is HTTP disabled.
SystemSettings.ntp_servers <object> NTP servers.
SystemSettings.ntp_servers.items <array of <object>> NTP servers.
SystemSettings.ntp_servers.items
[SettingsNTP]
<object> NTP Server. Optional
SystemSettings.ntp_servers.items
[SettingsNTP].order
<number> Server order.
SystemSettings.ntp_servers.items
[SettingsNTP].ipaddr
<string> IP address of the NTP server.
SystemSettings.ntp_servers.items
[SettingsNTP].encryption
<string> Encryption. Values: NONE, MD5, SHA1
SystemSettings.ntp_servers.items
[SettingsNTP].index
<number> Index (between 0 and 65536).
SystemSettings.https <object> HTTPS Settings.
SystemSettings.https.port <number> HTTPS port.
SystemSettings.https.ssl_protocols <string> SSL Protocols.
SystemSettings.https.ssl_ciphers <string> SSL ciphers.
SystemSettings.https.disabled <string> IS HTTPS disabled.
SystemSettings.licenses <object> Licenses.
SystemSettings.licenses.items <array of <object>> Licenses.
SystemSettings.licenses.items
[SettingsLicense]
<object> License. Optional
SystemSettings.licenses.items
[SettingsLicense].featurekey
<string> Feature key.
SystemSettings.licenses.items
[SettingsLicense].status
<string> Status (Active, OK, Invalid, etc.)
SystemSettings.licenses.items
[SettingsLicense].description
<string> Description.
SystemSettings.licenses.items
[SettingsLicense].serial_number
<string> Serial number.
SystemSettings.licenses.items
[SettingsLicense].scope
<string> Scope.
SystemSettings.licenses.items
[SettingsLicense].install_method
<string> Installation method.
SystemSettings.licenses.items
[SettingsLicense].key
<string> Key.
SystemSettings.licenses.items
[SettingsLicense].host
<string> Module host name.

Error Codes

In the event that an error occurs while processing a request, the server will respond with appropriate HTTP status code and additional information in the response body:

{
     "error_id":   "{error identifier}",
     "error_text": "{error description}",
     "error_info": {error specific data structure, optional}
}

The table below lists the possible errors and the associated HTTP status codes that may returned.

Error ID HTTP Status Comments
INTERNAL_ERROR 500 Internal server error.
AUTH_REQUIRED 401 The requested resource requires authentication.
AUTH_INVALID_CREDENTIALS 401 Invalid username and/or password.
AUTH_INVALID_SESSION 401 Session ID is invalid.
AUTH_EXPIRED_PASSWORD 403 The password must be changed. Access only to password change resources.
AUTH_DISABLED_ACCOUNT 403 Account is either temporarily or permanently disabled.
AUTH_FORBIDDEN 403 User is not authorized to access the requested resource.
AUTH_INVALID_TOKEN 401 OAuth access token is invalid.
AUTH_EXPIRED_TOKEN 401 OAuth access token is expired.
AUTH_INVALID_CODE 401 OAuth access code is invalid.
AUTH_EXPIRED_CODE 401 OAuth access code is expired.
RESOURCE_NOT_FOUND 404 Requested resource was not found.
HTTP_INVALID_METHOD 405 Requested method is not available for this resource.
HTTP_INVALID_HEADER 400 An HTTP header was malformed.
REQUEST_INVALID_INPUT 400 Malformed input structure.
URI_INVALID_PARAMETER 400 URI parameter is not supported or malformed.
URI_MISSING_PARAMETER 400 Missing required parameter.