Retrieve all Cockpit Variables

This function retrieves all CockpitVariables from the client account.

URL

GET {baseURL}/cockpitVariables

Parameters

None

Responses

If the request is performed, 200 OK is returned. See Return Codes for further possible status codes.

Returned Data (200 OK)

A JSON Structure containing the following fields:

FieldTypeData
filterStringThe applied filter. This is reserved for future use.
limitStartIntegerThe first record index. Currently 0, reserved for future use.
limitPageSizeIntegerThe number of records. -1 indicates all records. Reserved for future use.
recordsCockpitVariable []An array of Cockpit Variables.
countIntegerThe number of records returned.
orderByStringThe field used to sort the records. 
ascendingBooleanWhether the array of records is sorted ascending or descending.
statusIntegerThe return code (also provided by the http status code).

Example

{
    "filter": "",
    "limitStart": 0,
    "limitPageSize": -1,
    "records": [
        {
            "Description": "Test Cockpit Variable",
            "CounterAbsolute": 0,
            "Name": "Test Cockpit Variable",
            "Counter10Minutes": 0,
            "Counter30Minutes": 0,
            "CounterDay": 0,
            "MinValue": null,
            "ID": 192,
 ...
            "MinBGColor": "#DC143C",
            "dtLastModified": "2022-01-04T13:31:37.477546Z"
        }
    ],
    "count": 7,
    "orderBy": "Name",
    "ascending": true,
    "status": 200
}

Retrieve a Cockpit Variable by ID

This function retrieves one Cockpit Variable by ID from the client account.

URL

GET {baseURL}/cockpitVariables/cockpitVariable/{CockpitVariablesID}

Parameters

Parameter

Where

Type

Data

CockpitVariablesIDURLIntegerThe ID of the CockpitVariable.

Responses

If the request is performed, 200 OK is returned. See Return Codes for further possible status codes.

Returned Data (200 OK)

A JSON Structure containing the following fields:

FieldTypeData
recordsCockpitVariable []An array of CockpitVariables containing one CockpitVariable.
countInteger1
statusIntegerThe return code (also provided by the http status code).

Example

{
    "records": [
        {
            "Description": "Test Cockpit Variable",
            "CounterAbsolute": 0,
            "Name": "Test Cockpit Variable",
            "Counter10Minutes": 0,
            "Counter30Minutes": 0,
            "CounterDay": 0,
            "MinValue": null,
            "ID": 191,
...
            "MinBGColor": "#FFD700",
            "dtLastModified": "2022-01-04T13:31:59.435002Z"
        }
    ],
    "count": 1,
    "status": 200
}

Set the Value of a Cockpit Variable

This function sets the value of a Cockpit Variable.

URL

PATCH {baseURL}/cockpitVariables/cockpitVariable/{CockpitVariablesID}/setValue

Parameters

Parameter

Where

Type

Data

valueURLIntegerThe value to set.

Responses

If the request is performed, 200 OK is returned. The result value should be checked, to see the actual result of the operation. See also Return Codes for further possible status codes.

Returned Data (200 OK)

A JSON Structure containing the following fields:

FieldTypeData
resultInteger

0 = Operation was OK

1 = Variable is not writable

2 = Variable not found or not visible for cockpit

3 = value was not changed (same value)

4 = value was not changed (min / max values would be exceeded)

errorStringA string representation of the error,
statusIntegerThe return code (also provided by the http status code).
  • No labels