Product
Search Results

System

Check Lounge for Latest Release

Get the latest release of CDRouter from the CDRouter Support Lounge.

GET /api/v1/system/lounge/latest

Response 200 OK

The newer field will be true if a newer version than the current installed version is available.

{
    "timestamp": "2016-04-18T15:28:19.139242779-04:00",
    "data": {
        "latest": {
            "raw": "10.0.2",
            "major": 10,
            "minor": 0,
            "build": 2
        },
        "current": {
            "raw": "10.0.3",
            "major": 10,
            "minor": 0,
            "build": 3
        },
        "newer": false
    }
}

Check Lounge for Upgrade

Check the CDRouter Support Lounge for eligible upgrades using your Support Lounge email & password.

POST /api/v1/system/lounge/check

Example

POST /api/v1/system/lounge/check
{
    "email": "my@lounge.email",
    "password": "my_lounge_password"
}

Response 200 OK

{
    "timestamp": "2016-04-18T15:28:19.139242779-04:00",
    "data": {
        "build_date": "2016-04-12T15:28:19.139242779-04:00",
        "filename": "cdrouter_10.0-2_x86_64.bin",
        "version": {
            "raw": "10.0.2",
            "major": 10,
            "minor": 0,
            "build": 2
        },
        "id": 80,
        "article_id": 123,
        "testsuite": {
            "shortname": "cdrouter",
            "name": "cdrouter"
        }
    }
}

Response 400 Bad Request

{
    "error": "no releases available"
}

Download & Install Upgrade from Lounge

Download & install an upgrade from the CDRouter Support Lounge using your Support Lounge email & password. Please note that any running tests will be stopped.

POST /api/v1/system/lounge/upgrade

Example

The release.id field must be the id field received from successfully checking the lounge for an upgrade.

POST /api/v1/system/lounge/upgrade
{
    "email": "my@lounge.email",
    "password": "my_lounge_password",
    "release": {
        "id": 80
    }
}

Response 200 OK

{
    "timestamp": "2016-04-18T15:28:19.139242779-04:00",
    "data": {
        "success": true,
        "output": "<installer-output>..."
    }
}

Upload & Install Upgrade Manually

Upgrade CDRouter manually by uploading a .bin installer from the CDRouter Support Lounge. Please note that any running tests will be stopped.

POST /api/v1/system/upgrade

Example

Request must have a Content-Type header of multipart/form-data. The request body must have a form key named file whose contents is the .bin installer.

POST /api/v1/system/upgrade/
Content-Type: multipart/form-data; boundary=----CBacgHmUVPwinTJL

----CBacgHmUVPwTniJL
Content-Disposition: form-data; name="file"; filename="cdrouter_10.0-2_x86_64.bin"


<.bin file contents...>
----CBacgHmUVPwinTJL--

Response 200 OK

{
    "timestamp": "2016-04-18T11:43:49.684797726-04:00",
    "data": {
        "success": true,
        "output": "<installer-output>..."
    }
}

Download & Install License from Lounge

Download & install a license for your CDRouter system from the CDRouter Support Lounge.

POST /api/v1/system/license

Response 200 OK

{
    "timestamp": "2016-12-07T13:42:34.17472195-05:00",
    "data": {
        "success": true,
        "output": "<cdrouter-cli -update-license output>..."
    }
}

Upload & Install License Manually

Update the license on your CDRouter system manually by uploading a .lic license from the CDRouter Support Lounge.

POST /api/v1/system/license

Example

Request must have a Content-Type header of multipart/form-data. The request body must have a form key named file whose contents is the .lic license.

POST /api/v1/system/license/
Content-Type: multipart/form-data; boundary=----CBacgHmUVPwinTJL

----CBacgHmUVPwTniJL
Content-Disposition: form-data; name="file"; filename="cdrouter.lic"


<.lic file contents...>
----CBacgHmUVPwinTJL--

Response 204 No Content

Response 400 Bad Request

{
    "timestamp": "2016-12-07T13:42:34.17472195-05:00",
    "data": {
        "error": "license is bad"
    }
}

Shutdown CDRouter

Shutdown the CDRouter Web UI. Please note that any running tests will be stopped.

POST /api/v1/system/shutdown

Response 204 No Content

Restart CDRouter

Restart the CDRouter Web UI. Please note that any running tests will be stopped.

POST /api/v1/system/restart

Response 204 No Content

Reboot NTA1000

Reboot the NTA1000. Please note that any running tests will be stopped.

POST /api/v1/system/reboot

Response 204 No Content

Poweroff NTA1000

Poweroff the NTA1000. Please note that any running tests will be stopped.

POST /api/v1/system/poweroff

Response 204 No Content

Get system info

Get system info from cdrouter-cli -info output.

GET /api/v1/system/info

Response 200 OK

Content-Type: text/plain
Content-Disposition: inline; filename="cdrouter-cli-info.txt"

Starting cdrouter-cli Wed Dec 07 13:30:22 EST 2016
Copyright (c) 2001-2016 by QA Cafe
...

Get system diagnostics

Get system diagnostics from cdrouter-diag output.

GET /api/v1/system/diag

Response 200 OK

Content-Type: application/x-gzip
Content-Disposition: inline; filename="cdrouter-diag.tar.gz"

Get system time

Get system time.

GET /api/v1/system/time

Response 200 OK

{
    "timestamp": "2016-04-18T14:54:14.318461608-04:00",
    "data": {
        "time": "2016-04-18T14:54:14.318461608-04:00"
    }
}

Get system disk space usage

Get system disk space usage.

GET /api/v1/system/space

Response 200 OK

{
    "timestamp": "2017-04-06T15:46:04.275490393-04:00",
    "data": {
        "path": "/usr/cdrouter-data",
        "unit": "bytes",
        "size": 231555379200,
        "used": 100338679808,
        "avail": 131216699392,
        "pcent": 43
    }
}

Get system hostname

Get system hostname.

GET /api/v1/system/hostname

URL Parameters

Name Description
autodetect boolean (optional) If true, return hostname from OS

Response 200 OK

{
    "timestamp": "2016-04-18T14:54:14.318461608-04:00",
    "data": "nta1000.local"
}

Get system interfaces

Get system interfaces

GET /api/v1/system/interfaces/

URL Parameters

Name Description
addresses boolean (optional) If true, include interface addresses

Response 200 OK

{
    "timestamp": "2016-04-18T15:05:47.482781948-04:00",
    "data": [
        {
            "index": "1",
            "mtu": "65536",
            "name": "lo",
            "hardware_addr": "",
            "flags": {
                "up": true,
                "broadcast": false,
                "loopback": true,
                "point_to_point": false,
                "multicast": false
            }
        },
        {
            "index": "2",
            "mtu": "1500",
            "name": "enp5s0",
            "hardware_addr": "d0:67:e5:e6:06:a9",
            "flags": {
                "up": true,
                "broadcast": true,
                "loopback": false,
                "point_to_point": false,
                "multicast": true
            }
        },
        {
            "index": "3",
            "mtu": "9000",
            "name": "enp6s5f0",
            "hardware_addr": "00:1b:21:0b:04:ee",
            "flags": {
                "up": true,
                "broadcast": true,
                "loopback": false,
                "point_to_point": false,
                "multicast": true
            }
        },
        {
            "index": "4",
            "mtu": "1500",
            "name": "enp6s5f1",
            "hardware_addr": "00:1b:21:0b:04:ef",
            "flags": {
                "up": true,
                "broadcast": true,
                "loopback": false,
                "point_to_point": false,
                "multicast": true
            }
        }
    ]
}

Response 200 OK with ?addresses=true

{
    "timestamp": "2016-04-18T14:54:14.321041666-04:00",
    "data": [
        {
            "index": "1",
            "mtu": "65536",
            "name": "lo",
            "hardware_addr": "",
            "flags": {
                "up": true,
                "broadcast": false,
                "loopback": true,
                "point_to_point": false,
                "multicast": false
            },
            "addresses": [
                {
                    "network": "ip+net",
                    "address": "127.0.0.1/8"
                },
                {
                    "network": "ip+net",
                    "address": "::1/128"
                }
            ],
            "multicast_addresses": [
                {
                    "network": "ip",
                    "address": "239.255.255.250"
                },
                {
                    "network": "ip",
                    "address": "224.0.0.1"
                },
                {
                    "network": "ip",
                    "address": "ff02::1"
                },
                {
                    "network": "ip",
                    "address": "ff01::1"
                }
            ]
        },
        {
            "index": "2",
            "mtu": "1500",
            "name": "enp5s0",
            "hardware_addr": "d0:67:e5:e6:06:a9",
            "flags": {
                "up": true,
                "broadcast": true,
                "loopback": false,
                "point_to_point": false,
                "multicast": true
            },
            "addresses": [
                {
                    "network": "ip+net",
                    "address": "172.0.1.195/22"
                },
                {
                    "network": "ip+net",
                    "address": "fe80::d267:e5ff:fee6:6a9/64"
                }
            ],
            "multicast_addresses": [
                {
                    "network": "ip",
                    "address": "239.255.255.250"
                },
                {
                    "network": "ip",
                    "address": "224.0.0.251"
                },
                {
                    "network": "ip",
                    "address": "224.0.0.1"
                },
                {
                    "network": "ip",
                    "address": "ff02::fb"
                },
                {
                    "network": "ip",
                    "address": "ff02::202"
                },
                {
                    "network": "ip",
                    "address": "ff02::1:ffe6:6a9"
                },
                {
                    "network": "ip",
                    "address": "ff02::1"
                },
                {
                    "network": "ip",
                    "address": "ff01::1"
                }
            ]
        },
        {
            "index": "3",
            "mtu": "9000",
            "name": "enp6s5f0",
            "hardware_addr": "00:1b:21:0b:04:ee",
            "flags": {
                "up": true,
                "broadcast": true,
                "loopback": false,
                "point_to_point": false,
                "multicast": true
            },
            "multicast_addresses": [
                {
                    "network": "ip",
                    "address": "224.0.0.1"
                },
                {
                    "network": "ip",
                    "address": "ff02::fb"
                },
                {
                    "network": "ip",
                    "address": "ff02::202"
                },
                {
                    "network": "ip",
                    "address": "ff02::1"
                },
                {
                    "network": "ip",
                    "address": "ff01::1"
                }
            ]
        },
        {
            "index": "4",
            "mtu": "1500",
            "name": "enp6s5f1",
            "hardware_addr": "00:1b:21:0b:04:ef",
            "flags": {
                "up": true,
                "broadcast": true,
                "loopback": false,
                "point_to_point": false,
                "multicast": true
            },
            "addresses": [
                {
                    "network": "ip+net",
                    "address": "fe80::21b:21ff:fe0b:4ef/64"
                }
            ],
            "multicast_addresses": [
                {
                    "network": "ip",
                    "address": "224.0.0.1"
                },
                {
                    "network": "ip",
                    "address": "ff02::1:ff0b:4ef"
                },
                {
                    "network": "ip",
                    "address": "ff02::fb"
                },
                {
                    "network": "ip",
                    "address": "ff02::202"
                },
                {
                    "network": "ip",
                    "address": "ff02::1"
                },
                {
                    "network": "ip",
                    "address": "ff01::1"
                }
            ]
        }
    ]
}

Get in use system interfaces

Get in use system interfaces

GET /api/v1/system/interfaces/?in_use=true

Response 200 OK

{
    "timestamp": "2022-02-14T11:17:48.811574868-05:00",
    "data": [
        {
            "name": "eth1",
            "flags": {
                "in_use": false,
                "is_wireless": false
            }
        },
        {
            "name": "eth2",
            "flags": {
                "in_use": false,
                "is_wireless": false
            }
        },
        {
            "name": "wifi0",
            "flags": {
                "in_use": false,
                "is_wireless": true
            }
        }
    ]
}

Get preferences

Get preferences from /usr/cdrouter-data/etc/config.yml.

GET /api/v1/system/preferences

Response 200 OK

{
    "timestamp": "2016-04-18T14:54:22.10546291-04:00",
    "data": {
        "automatic_login": false,
        "cloudshark_appliance_autotags": "stack,result,host,testcase,passfail,package",
        "cloudshark_appliance_insecure": "yes",
        "cloudshark_appliance_password": "",
        "cloudshark_appliance_tags": "",
        "cloudshark_appliance_token": "",
        "cloudshark_appliance_url": "",
        "cloudshark_appliance_username": "",
        "hostname": "nta1000.local",
        "migrated": [
            "testpaths",
            "configs",
            "packages",
            "results"
        ],
        "port": 80,
        "https": 443,
        "force_https": "no",
        "talkback_port": 8080,
        "use_cloudshark": "no"
    }
}

Edit preferences

Edit preferences in /usr/cdrouter-data/etc/config.yml.

PATCH /api/v1/system/preferences

Example

Set automatic_login preference to true.

PATCH /api/v1/system/preferences
{
    "automatic_login": true,
}

Response 200 OK

{
    "timestamp": "2016-04-18T14:54:22.10546291-04:00",
    "data": {
        "automatic_login": true,
        "cloudshark_appliance_autotags": "stack,result,host,testcase,passfail,package",
        "cloudshark_appliance_insecure": "yes",
        "cloudshark_appliance_password": "",
        "cloudshark_appliance_tags": "",
        "cloudshark_appliance_token": "",
        "cloudshark_appliance_url": "",
        "cloudshark_appliance_username": "",
        "hostname": "nta1000.local",
        "migrated": [
            "testpaths",
            "configs",
            "packages",
            "results"
        ],
        "port": 80,
        "https": 443,
        "force_https": "no",
        "talkback_port": 8080,
        "use_cloudshark": "no"
    }
}