Skip to content
Alberto Gonzalez edited this page Jun 19, 2017 · 1 revision

(GET)/commands

Description

Get information regarding the pre-defined commands that may be run on the appliance specified by its system id (or the local appliance if no system ID is provided).

Request

Syntax

GET /api/commands/?sid={sid}

Host: <server host name>
Accept: application/json
AuthToken: <authentication token returned from authenticate>

Parameters

Filter | Description | Required | Example ---- | ---- | ---- sid | return command list for specified system id | optional | GET /api/commands/?sid=1

Response

200 success

Parameters

Index Value Type Returned
name command name string always
description command description string always
action actual command that will be run on the appliance string always

Examples

Sample Request

GET /api/commands/?sid=1
Host: <server host name>
Accept: application/json
AuthToken: 8a00sjerhterqerjlqkjlk443l4j56869h4f_)(fjdkasHHHHHkdal324

Sample Response

{
    "commands": [
        {
            "action": "netstat -nap",
            "description": "All active or listening network ports",
            "name": "Active Ports"
        },
        {
            "action": "/usr/bp/bin/cmc_active_tunnel.sh",
            "description": "Checks for an active support tunnel and returns its port number. Returns 0 if no tunnel exists.",
            "name": "Active Support Tunnel"
        },
        {
            "action": "echo -n `cat /etc/unitrends-release | awk '{print $2}'` 2>&1",
            "description": "Information about Appliance type",
            "name": "Appliance"
        },

        ...

        {
            "action": "chkconfig --list",
            "description": "Listing of system services",
            "name": "System Services"
        },
        {
            "action": "/usr/bp/bin/dpu_data_collect 2>&1",
            "description": "Uploads system information to Unitrends for use in support cases",
            "name": "Upload System Information"
        }
    ],
    "timestamp": 1456171019
}

Clone this wiki locally