System Basics

The Atlas Core API can help you manage the basics of your system

Power Management

You can shutdown or reboot your system from the API. Please take care when calling to do so, as you will not be warned or prompted to confirm.

Shutdown the system

Call to /system/shutdown to shutdown the system

Request Object

+ URL
  /api/v2/system/shutdown

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, and an empty object.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {}

Reboot the system

Call to /system/reboot to reboot the system

Request Object

+ URL
  /api/v2/system/reboot

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, and an empty object.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {}

Reload the Application on the system

Call to /system/reload to reload the application services controlling the system

Request Object

+ URL
  /api/v2/system/reload

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, and an empty object.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {}

System Information

The Atlas Core API can send you basic information about your system as well

View OS info

Call to /system/os to view the system os info

Request Object

+ URL
  /api/v2/system/os

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, and an object of OS info.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "uname": "Linux greed 4.19.0-11-amd64 #1 SMP Debian 4.19.132-1 (2020-08-27) x86_64 GNU/Linux\n",
    "endianness": "LE",
    "hostname": "greed",
    "loadavg": [
      1.72802734375,
      2.02880859375,
      1.9091796875
    ],
    "uptime": 353381,
    "freemem": 721566171136,
    "totalmem": 811619762176,
    "type": "Linux",
    "release": "4.19.0-11-amd64",
    "arch": "x64",
    "platform": "linux",
    "cpus": [
      {
        "model": "Intel(R) Xeon(R) CPU E5-2643 v2 @ 3.50GHz",
        "speed": 1200,
        "times": {
          "user": 45588300,
          "nice": 2320,
          "sys": 13156720,
          "idle": 287495770,
          "irq": 0
        }
      },
      {
        "model": "Intel(R) Xeon(R) CPU E5-2643 v2 @ 3.50GHz",
        "speed": 1200,
        "times": {
          "user": 46573530,
          "nice": 2070,
          "sys": 13218660,
          "idle": 285941750,
          "irq": 0
        }
      },
      {
        "model": "Intel(R) Xeon(R) CPU E5-2643 v2 @ 3.50GHz",
        "speed": 1200,
        "times": {
          "user": 47808640,
          "nice": 710,
          "sys": 13336870,
          "idle": 284482000,
          "irq": 0
        }
      },
    ],
    "networkInterfaces": {
      "lo": [
        {
          "address": "127.0.0.1",
          "netmask": "255.0.0.0",
          "family": "IPv4",
          "mac": "00:00:00:00:00:00",
          "internal": true,
          "cidr": "127.0.0.1/8"
        },
        {
          "address": "::1",
          "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
          "family": "IPv6",
          "mac": "00:00:00:00:00:00",
          "internal": true,
          "cidr": "::1/128",
          "scopeid": 0
        }
      ],
      "mgmt0": [
        {
          "address": "192.168.7.76",
          "netmask": "255.255.255.0",
          "family": "IPv4",
          "mac": "00:25:90:fa:51:22",
          "internal": false,
          "cidr": "192.168.7.76/24"
        },
        {
          "address": "fe80::225:90ff:fefa:5122",
          "netmask": "ffff:ffff:ffff:ffff::",
          "family": "IPv6",
          "mac": "00:25:90:fa:51:22",
          "internal": false,
          "cidr": "fe80::225:90ff:fefa:5122/64",
          "scopeid": 2
        }
      ],
      "bond0": [
        {
          "address": "10.40.1.76",
          "netmask": "255.255.255.0",
          "family": "IPv4",
          "mac": "00:07:43:38:54:20",
          "internal": false,
          "cidr": "10.40.1.76/24"
        },
        {
          "address": "fe80::207:43ff:fe38:5420",
          "netmask": "ffff:ffff:ffff:ffff::",
          "family": "IPv6",
          "mac": "00:07:43:38:54:20",
          "internal": false,
          "cidr": "fe80::207:43ff:fe38:5420/64",
          "scopeid": 8
        }
      ],
    }
  }

System Log

You can also view entries from syslog

View System Log

Call to /system/log to view the system log

Request Object

+ URL
  /api/v2/system/log

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, a large string of system information.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  "6,3,2020-09-21T11:40:35.288267-07:00,greed,lodestar.js[13714]:         \"strict-transport-security\": \"max-age=15552000; includeSubDomains\",\n6,3,2020-09-21T11:40:35.288366-07:00,greed,lodestar.js[13714]:         \"x-download-options\": \"noopen\",\n6,3,2020-09-21T11:40:35.288459-07:00,greed,lodestar.js[13714]:         \"x-content-type-options\": \"nosniff\",\n6,3,2020-09-21T11:40:35.288552-07:00,greed,lodestar.js[13714]:         \"x-xss-protection\": \"1; mode=block\",\n6,3,2020-09-21T11:40:35.288646-07:00,greed,lodestar.js[13714]:         \"content-type\": \"application/json; charset=utf-8\",\n6,3,2020-09-21T11:40:35.288738-07:00,greed,lodestar.js[13714]:         \"content-length\": \"895\",\n6,3,2020-09-21T11:40:35.288839-07:00,greed,lodestar.js[13714]:         \"etag\": \"W/\\\"37f-Y937KZB4AFUWT/s9tCq6xEe/Eps\\\"\"\n6,3,2020-09-21T11:40:35.288941-07:00,greed,lodestar.js[13714]:       }\n6,3,2020-09-21T11:40:35.289035-07:00,greed,lodestar.js[13714]:     }\n6,3,2020-09-21T11:40:35.289164-07:00,greed,lodestar.js[13714]:     responseTime: 115\n6,3,2020-09-21T11:40:35.289347-07:00,greed,lodestar.js[13714]: [1600713635287] INFO  (13714 on greed): Logging this API request to disk {\"0\":\"/api/v2/authorization/token\"}\n6,3,2020-09-21T11:40:35.328199-07:00,greed,lodestar.js[13714]: [1600713635327] INFO  (13714 on greed): [null - 34] [{\"id\":1,\"hostid\":\"09e3b2bd\",\"username\":\"open\",\"token_name\":\"od-token-Sat_Sep_12_2020\",\"enabled\":true,\"systemAuth\":false,,\"createdAt\":\"2020-09-12T21:07:50.141Z\",\"updatedAt\":\"2020-09-12T21:07:50.141Z\",\"expiresAt\":\"1600549670138\"},{\"id\":2,\"hostid\":\"09e3b2bd\",\"username\":\"open\",\"token_name\":\"od-token-Mon_Sep_21_2020\",\"enabled\":true,\"systemAuth\":false,,\"createdAt\":\"2020-09-21T18:40:35.117Z\",\"updatedAt\":\"2020-09-21T18:40:35.117Z\",\"expiresAt\":\"1601318435112\"}]\n6,3,2020-09-21T11:40:35.329314-07:00,greed,lodestar.js[13714]: [1600713635328] INFO  (13714 on greed): request completed\n6,3,2020-09-21T11:40:35.329486-07:00,greed,lodestar.js[13714]:     req: {\n6,3,2020-09-21T11:40:35.329590-07:00,greed,lodestar.js[13714]:       \"id\": 14,\n6,3,2020-09-21T11:40:35.329685-07:00,greed,lodestar.js[13714]:       \"method\": \"GET\",\n6,3,2020-09-21T11:40:35.329819-07:00,greed,lodestar.js[13714]:       \"url\": \"/api/v2/authorization/token\",\n6,3,2020-09-21T11:40:35.329919-07:00,greed,lodestar.js[13714]:       \"headers\": {\n6,3,2020-09-21T11:40:35.330013-07:00,greed,lodestar.js[13714]:         \"token\": \"[Redacted]\",\n6,3,2020-09-21T11:40:35.330101-07:00,greed,lodestar.js[13714]:         \"host\": \"localhost:1337\",\n6,3,2020-09-21T11:40:35.330290-07:00,greed,lodestar.js[13714]:         \"connection\": \"close\"\n6,3,2020-09-21T11:40:35.330437-07:00,greed,lodestar.js[13714]:       }\n6,3,2020-09-21T11:40:35.330538-07:00,greed,lodestar.js[13714]:     }\n6,3,2020-09-21T11:40:35.330634-07:00,greed,lodestar.js[13714]:     res: {\n6,3,2020-09-21T11:40:35.330728-07:00,greed,lodestar.js[13714]:       \"statusCode\": 200,\n6,3,2020-09-21T11:40:35.330824-07:00,greed,lodestar.js[13714]:       \"headers\": {\n6,3,2020-09-21T11:40:35.330947-07:00,greed,lodestar.js[13714]:         \"access-control-allow-origin\": \"*\",\n6,3,2020-09-21T11:40:35.331047-07:00,greed,lodestar.js[13714]:         \"x-dns-prefetch-control\": \"off\",\n6,3,2020-09-21T11:40:35.331140-07:00,greed,lodestar.js[13714]:         \"x-frame-options\": \"SAMEORIGIN\",\n6,3,2020-09-21T11:40:35.331232-07:00,greed,lodestar.js[13714]:         \"strict-transport-security\": \"max-age=15552000; includeSubDomains\",\n6,3,2020-09-21T11:40:35.331325-07:00,greed,lodestar.js[13714]:         \"x-download-options\": \"noopen\",\n6,3,2020-09-21T11:40:35.331419-07:00,greed,lodestar.js[13714]:         \"x-content-type-options\": \"nosniff\",\n6,3,2020-09-21T11:40:35.331512-07:00,greed,lodestar.js[13714]:         \"x-xss-protection\": \"1; mode=block\",\n6,3,2020-09-21T11:40:35.331637-07:00,greed,lodestar.js[13714]:         \"content-type\": \"application/json; charset=utf-8\",\n6,3,2020-09-21T11:40:35.331735-07:00,greed,lodestar.js[13714]:         \"content-length\": \"895\",\n6,3,2020-09-21T11:40:35.331829-07:00,greed,lodestar.js[13714]:         \"etag\": \"W/\\\"37f-Y937KZB4AFUWT/s9tCq6xEe/Eps\\\"\"\n6,3,2020-09-21T11:40:35.331921-07:00,greed,lodestar.js[13714]:       }\n6,3,2020-09-21T11:40:35.332019-07:00,greed,lodestar.js[13714]:     }\n6,3,2020-09-21T11:40:35.332112-07:00,greed,lodestar.js[13714]:     responseTime: 114\n6,3,2020-09-21T11:40:35.332260-07:00,greed,lodestar.js[13714]: [1600713635331] INFO  (13714 on greed): Logging this API request to disk {\"0\":\"/api/v2/authorization/token\"}\n6,3,2020-09-21T11:40:43.502805-07:00,greed,systemd[1]: Starting Collect ipmitool sensor metrics for prometheus-node-exporter...\n6,3,2020-09-21T11:40:45.389745-07:00,greed,systemd[1]: prometheus-node-exporter-ipmitool-sensor.service: Succeeded.\n6,3,2020-09-21T11:40:45.390328-07:00,greed,systemd[1]: Started Collect ipmitool sensor metrics for prometheus-node-exporter.\n6,3,2020-09-21T11:40:47.665291-07:00,greed,systemd[1]: Starting Atlas Cleanup Service...\n6,3,2020-09-21T11:40:47.665506-07:00,greed,systemd[1]: Stopping OpenDrives Probe Service...\n6,3,2020-09-21T11:40:47.665594-07:00,greed,systemd[1]: Stopping Atlas Module Manager...\n6,3,2020-09-21T11:40:47.665700-07:00,greed,systemd[1]: Stopping Single Pane of Glass for all your OpenDrives Systems...\n6,3,2020-09-21T11:40:47.665898-07:00,greed,systemd[1]: Stopping OpenDrives Notification Service...\n6,3,2020-09-21T11:40:47.666427-07:00,greed,recon.js[13715]: {\"level\":30,\"time\":1600713647665,\"pid\":13715,\"hostname\":\"greed\",\"msg\":\"Stopped fs_usage\"}\n6,3,2020-09-21T11:40:47.666528-07:00,greed,recon.js[13715]: {\"level\":30,\"time\":1600713647666,\"pid\":13715,\"hostname\":\"greed\",\"msg\":\"Stopped network_client\"}\n3,3,2020-09-21T11:40:47.666987-07:00,greed,systemd[3752]: kp-duty.service: Failed to execute command: Permission denied\n6,3,2020-09-21T11:40:47.667079-07:00,greed,recon.js[13715]: {\"level\":30,\"time\":1600713647666,\"pid\":13715,\"hostname\":\"greed\",\"msg\":\"Stopped network_interface\"}\n6,3,2020-09-21T11:40:47.667122-07:00,greed,recon.js[13715]: {\"level\":30,\"time\":1600713647666,\"pid\":13715,\"hostname\":\"greed\",\"msg\":\"Stopped pool_iops\"}\n6,3,2020-09-21T11:40:47.667162-07:00,greed,recon.js[13715]: {\"level\":30,\"time\":1600713647666,\"pid\":13715,\"hostname\":\"greed\",\"msg\":\"Stopped pool_usage\"}\n6,3,2020-09-21T11:40:47.667200-07:00,greed,recon.js[13715]: {\"level\":30,\"time\":1600713647666,\"pid\":13715,\"hostname\":\"greed\",\"msg\":\"Stopped status_disk\"}\n6,3,2020-09-21T11:40:47.667291-07:00,greed,recon.js[13715]: {\"level\":30,\"time\":1600713647666,\"pid\":13715,\"hostname\":\"greed\",\"msg\":\"Stopped status_ha\"}\n6,3,2020-09-21T11:40:47.667333-07:00,greed,recon.js[13715]: {\"level\":30,\"time\":1600713647666,\"pid\":13715,\"hostname\":\"greed\",\"msg\":\"Stopped status_pool\"}\n6,3,2020-09-21T11:40:47.667372-07:00,greed,recon.js[13715]: {\"level\":30,\"time\":1600713647666,\"pid\":13715,\"hostname\":\"greed\",\"msg\":\"Stopped status_sensor\"}\n3,3,2020-09-21T11:40:47.667482-07:00,greed,systemd[3752]: kp-duty.service: Failed at step EXEC spawning /usr/share/kp-duty/app/bin/kp-duty.js: Permission denied\n5,3,2020-09-21T11:40:47.674310-07:00,greed,systemd[1]: kp-duty.service:"

View Remote Log Configurations

Call to /system/rsyslog/conf to view the configuration of /etc/rsyslog.conf.

Request Object

+ URL
  /api/v2/system/rsyslog/conf

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, a string containing the raw configuration contents.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "raw": "module(load=\"imuxsock\") # provides support for local system logging\nmodule(load=\"imklog\")   # provides kernel logging support\nmodule(load=\"omprog\")   # provides support for forwarding messages to programs\nmodule(load=\"imudp\")\n​input(type=\"imudp\" port=\"514\")\nmodule(load=\"imtcp\")\n​input(type=\"imtcp\" port=\"514\")\n\n$template odtemplate,\"%syslogpriority%,%syslogfacility%,%TIMESTAMP:::date-rfc3339%,%HOSTNAME%,%syslogtag%%msg%\\n\"\n$ActionFileDefaultTemplate odtemplate\n$FileOwner root\n$FileGroup adm\n$FileCreateMode 0640\n$DirCreateMode 0755\n$Umask 0022\n$WorkDirectory /var/spool/rsyslog\n$IncludeConfig /etc/rsyslog.d/*.conf\nauth,authpriv.*\t\t\t/var/log/auth.log\n*.*;auth,authpriv.none\t\t-/var/log/syslog\ncron.*\t\t\t\t/var/log/cron.log\ndaemon.*\t\t\t-/var/log/daemon.log\nkern.*\t\t\t\t-/var/log/kern.log\nlpr.*\t\t\t\t-/var/log/lpr.log\nmail.*\t\t\t\t-/var/log/mail.log\nuser.*\t\t\t\t-/var/log/user.log\nmail.info\t\t\t-/var/log/mail.info\nmail.warn\t\t\t-/var/log/mail.warn\nmail.err\t\t\t/var/log/mail.err\n*.=debug;\\\n\tauth,authpriv.none;\\\n\tnews.none;mail.none\t-/var/log/debug\n*.=info;*.=notice;*.=warn;\\\n\tauth,authpriv.none;\\\n\tcron,daemon.none;\\\n\tmail,news.none\t\t-/var/log/messages\n*.emerg\t\t\t\t:omusrmsg:*\n\n\n*.*\t\t\t@@192.168.7.62:514\n*.emerg\t\t\t@192.168.7.62:5555"
  }

Set Remote Log Configurations

Call to /system/rsyslog/conf to set the configuration of /etc/rsyslog.conf, including the raw configuration in the Body.

Request Object

+ URL
  /api/v2/system/rsyslog/conf

+ Method
  POST

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "raw": "module(load=\"imuxsock\") # provides support for local system logging\nmodule(load=\"imjournal\") # provides support to systemd journal\n\nmodule(load=\"imudp\") # provides support for udp syslog reception\n​input(type=\"imudp\" port=\"514\")\nmodule(load=\"imtcp\") # provides support for tcp syslog reception\n​input(type=\"imtcp\" port=\"514\")\n\nmodule(load=\"imklog\")   # provides kernel logging support\nmodule(load=\"omprog\")   # provides support for forwarding messages to programs\n$template odtemplate,\"%syslogpriority%,%syslogfacility%,%TIMESTAMP:::date-rfc3339%,%HOSTNAME%,%syslogtag%%msg%\\n\"\n$ActionFileDefaultTemplate odtemplate\n$FileOwner root\n$FileGroup adm\n$FileCreateMode 0640\n$DirCreateMode 0755\n$Umask 0022\n$WorkDirectory /var/spool/rsyslog\n$IncludeConfig /etc/rsyslog.d/*.conf\nauth,authpriv.*\t\t\t/var/log/auth.log\n*.*;auth,authpriv.none\t\t-/var/log/syslog\ncron.*\t\t\t\t/var/log/cron.log\ndaemon.*\t\t\t-/var/log/daemon.log\nkern.*\t\t\t\t-/var/log/kern.log\nlpr.*\t\t\t\t-/var/log/lpr.log\nmail.*\t\t\t\t-/var/log/mail.log\nuser.*\t\t\t\t-/var/log/user.log\nmail.info\t\t\t-/var/log/mail.info\nmail.warn\t\t\t-/var/log/mail.warn\nmail.err\t\t\t/var/log/mail.err\n*.=debug;\\\n\tauth,authpriv.none;\\\n\tnews.none;mail.none\t-/var/log/debug\n*.=info;*.=notice;*.=warn;\\\n\tauth,authpriv.none;\\\n\tcron,daemon.none;\\\n\tmail,news.none\t\t-/var/log/messages\n*.emerg\t\t\t\t:omusrmsg:*"
  }

Response Object

Sending this should get you back a valid response, a string containing the raw configuration contents that have been saved.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "raw": "module(load=\"imuxsock\") # provides support for local system logging\nmodule(load=\"imjournal\") # provides support to systemd journal\n\nmodule(load=\"imudp\") # provides support for udp syslog reception\n​input(type=\"imudp\" port=\"514\")\nmodule(load=\"imtcp\") # provides support for tcp syslog reception\n​input(type=\"imtcp\" port=\"514\")\n\nmodule(load=\"imklog\")   # provides kernel logging support\nmodule(load=\"omprog\")   # provides support for forwarding messages to programs\n$template odtemplate,\"%syslogpriority%,%syslogfacility%,%TIMESTAMP:::date-rfc3339%,%HOSTNAME%,%syslogtag%%msg%\\n\"\n$ActionFileDefaultTemplate odtemplate\n$FileOwner root\n$FileGroup adm\n$FileCreateMode 0640\n$DirCreateMode 0755\n$Umask 0022\n$WorkDirectory /var/spool/rsyslog\n$IncludeConfig /etc/rsyslog.d/*.conf\nauth,authpriv.*\t\t\t/var/log/auth.log\n*.*;auth,authpriv.none\t\t-/var/log/syslog\ncron.*\t\t\t\t/var/log/cron.log\ndaemon.*\t\t\t-/var/log/daemon.log\nkern.*\t\t\t\t-/var/log/kern.log\nlpr.*\t\t\t\t-/var/log/lpr.log\nmail.*\t\t\t\t-/var/log/mail.log\nuser.*\t\t\t\t-/var/log/user.log\nmail.info\t\t\t-/var/log/mail.info\nmail.warn\t\t\t-/var/log/mail.warn\nmail.err\t\t\t/var/log/mail.err\n*.=debug;\\\n\tauth,authpriv.none;\\\n\tnews.none;mail.none\t-/var/log/debug\n*.=info;*.=notice;*.=warn;\\\n\tauth,authpriv.none;\\\n\tcron,daemon.none;\\\n\tmail,news.none\t\t-/var/log/messages\n*.emerg\t\t\t\t:omusrmsg:*"
  }

List Remote Log Destinations

Call to /system/rsyslog/remote_destination to list the remote log destinations configured on your system.

Request Object

+ URL
  /api/v2/system/rsyslog/remote_destination

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, an object containing an array of the raw remote log destinations, and an array of parsed objects containing the raw configuration of the remote log destination, the actual destination address, facility, severity, and protocol.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "raw": [
        "*.*\t\t\t@@192.168.7.62:514",
        "auth.*\t\t\t@192.168.7.62:5555",
        "*.emerg\t\t\t@192.168.7.62:5555"
    ],
    "parsed": [
        {
            "raw": "*.*\t\t\t@@192.168.7.62:514",
            "destination": "192.168.7.62:514",
            "facility": "*",
            "severity": "*",
            "protocol": "tcp"
        },
        {
            "raw": "auth.*\t\t\t@192.168.7.62:5555",
            "destination": "192.168.7.62:5555",
            "facility": "auth",
            "severity": "*",
            "protocol": "udp"
        },
        {
            "raw": "*.emerg\t\t\t@192.168.7.62:5555",
            "destination": "192.168.7.62:5555",
            "facility": "*",
            "severity": "emerg",
            "protocol": "udp"
        }
    ]
  }

Add Remote Log Destination

Call to /system/rsyslog/remote_destination/create to add a new remote log destination configured on your system. A valid IPv4 address is required for 'destination', and its port will default to 514 if not specified. Both 'facility' and 'severity' will default to All (*), and protocol will default to tcp;

Request Object

+ URL
  /api/v2/system/rsyslog/remote_destination/create

+ Method
  POST

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "destination": "192.168.7.62",
    "facility": "auth",
    "severity": "emerg",
    "protocol": "udp"
  }

Response Object

Sending this should get you back a valid response, a string containing the raw configuration contents that have been saved.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "raw": "module(load=\"imuxsock\") # provides support for local system logging\nmodule(load=\"imklog\")   # provides kernel logging support\nmodule(load=\"omprog\")   # provides support for forwarding messages to programs\nmodule(load=\"imudp\")\n​input(type=\"imudp\" port=\"514\")\nmodule(load=\"imtcp\")\n​input(type=\"imtcp\" port=\"514\")\n\n$template odtemplate,\"%syslogpriority%,%syslogfacility%,%TIMESTAMP:::date-rfc3339%,%HOSTNAME%,%syslogtag%%msg%\\n\"\n$ActionFileDefaultTemplate odtemplate\n$FileOwner root\n$FileGroup adm\n$FileCreateMode 0640\n$DirCreateMode 0755\n$Umask 0022\n$WorkDirectory /var/spool/rsyslog\n$IncludeConfig /etc/rsyslog.d/*.conf\nauth,authpriv.*\t\t\t/var/log/auth.log\n*.*;auth,authpriv.none\t\t-/var/log/syslog\ncron.*\t\t\t\t/var/log/cron.log\ndaemon.*\t\t\t-/var/log/daemon.log\nkern.*\t\t\t\t-/var/log/kern.log\nlpr.*\t\t\t\t-/var/log/lpr.log\nmail.*\t\t\t\t-/var/log/mail.log\nuser.*\t\t\t\t-/var/log/user.log\nmail.info\t\t\t-/var/log/mail.info\nmail.warn\t\t\t-/var/log/mail.warn\nmail.err\t\t\t/var/log/mail.err\n*.=debug;\\\n\tauth,authpriv.none;\\\n\tnews.none;mail.none\t-/var/log/debug\n*.=info;*.=notice;*.=warn;\\\n\tauth,authpriv.none;\\\n\tcron,daemon.none;\\\n\tmail,news.none\t\t-/var/log/messages\n*.emerg\t\t\t\t:omusrmsg:*\n\n\n*.*\t\t\t@@192.168.7.62:514\n*.emerg\t\t\t@192.168.7.62:5555\n*.emerg\t\t\t@@192.168.7.62:8097\nauth.emerg\t\t\t@192.168.7.62:514"
  }

Destroy Remote Log Destination

Call to /system/rsyslog/remote_destination/destroy to remove an existing remote log destination configured on your system. You must pass the raw configuration of the remote log destination in the Body;

Request Object

+ URL
  /api/v2/system/rsyslog/remote_destination/destroy

+ Method
  POST

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "raw": "auth.emerg\t\t\t@192.168.7.62:514"
  }

Response Object

Sending this should get you back a valid response, a string containing the raw configuration contents that have been saved.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "raw": "module(load=\"imuxsock\") # provides support for local system logging\nmodule(load=\"imklog\")   # provides kernel logging support\nmodule(load=\"omprog\")   # provides support for forwarding messages to programs\nmodule(load=\"imudp\")\n​input(type=\"imudp\" port=\"514\")\nmodule(load=\"imtcp\")\n​input(type=\"imtcp\" port=\"514\")\n\n$template odtemplate,\"%syslogpriority%,%syslogfacility%,%TIMESTAMP:::date-rfc3339%,%HOSTNAME%,%syslogtag%%msg%\\n\"\n$ActionFileDefaultTemplate odtemplate\n$FileOwner root\n$FileGroup adm\n$FileCreateMode 0640\n$DirCreateMode 0755\n$Umask 0022\n$WorkDirectory /var/spool/rsyslog\n$IncludeConfig /etc/rsyslog.d/*.conf\nauth,authpriv.*\t\t\t/var/log/auth.log\n*.*;auth,authpriv.none\t\t-/var/log/syslog\ncron.*\t\t\t\t/var/log/cron.log\ndaemon.*\t\t\t-/var/log/daemon.log\nkern.*\t\t\t\t-/var/log/kern.log\nlpr.*\t\t\t\t-/var/log/lpr.log\nmail.*\t\t\t\t-/var/log/mail.log\nuser.*\t\t\t\t-/var/log/user.log\nmail.info\t\t\t-/var/log/mail.info\nmail.warn\t\t\t-/var/log/mail.warn\nmail.err\t\t\t/var/log/mail.err\n*.=debug;\\\n\tauth,authpriv.none;\\\n\tnews.none;mail.none\t-/var/log/debug\n*.=info;*.=notice;*.=warn;\\\n\tauth,authpriv.none;\\\n\tcron,daemon.none;\\\n\tmail,news.none\t\t-/var/log/messages\n*.emerg\t\t\t\t:omusrmsg:*\n\n\n*.*\t\t\t@@192.168.7.62:514\n*.emerg\t\t\t@192.168.7.62:5555\n*.emerg\t\t\t@@192.168.7.62:8097"
  }

General Settings

The Atlas Core API can show you information about your system’s general settings.

List System Timezone

Call to /system/timezone/list to list your system’s available timezones.

Request Object

+ URL
  /api/v2/system/timezone/list

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, an array of strings. Each string in the array is a timezone.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  [
    "Africa/Abidjan",
    "Africa/Accra",
    "Africa/Algiers",
    "Africa/Bissau",
    "Africa/Cairo",
    "Africa/Casablanca",
    "Africa/Ceuta",
    "Africa/El_Aaiun",
    "Africa/Johannesburg",
    "Africa/Juba",
    ...
  ]

Get System Timezone

Call to /system/timezone/get to get your system’s timezone.

Request Object

+ URL
  /api/v2/system/timezone/get

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, a string which is the current system timezone.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  "America/New_York"

Set System Timezone

Call to /system/timezone/set to set your system’s timezone. The desired timezone must be an option from the output of the /system/timezone/list call, which provides a list of all available system timezones.

Request Object

+ URL
  /api/v2/system/timezone/set

+ Method
  POST

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "timezone": "America/Los_Angeles"
  }

Response Object

Sending this should get you back a valid response, a string which will be the new system timezone.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  "America/Los_Angeles"