REST examples

The REST examples included here are all HTTP calls to a NAM Server at sample address http://1.2.3.4 from a standard web browser.

All calls are made using an authentication header to access the target device and a Content-Type header set to application/json. To try these examples, you need a REST client add-in to your browser and access to a NAM Server.

Parameters are case-sensitive.

Example REST getDataViews

A call to getDataViews requires one parameter, appId, the value of which you can select from the list of application IDs returned by getApplications.

In this example, CVENT is the application passed to the device.

http://1.2.3.4/rest/dmiquery/getDataViews?appId=CVENT

The request in this example returned the following list of data views associated with the named application (CVENT) on that device:

text
 {
  "count": 25,
  "results": [
    [
      "ClientViewDb",
      "Software service, operation, and site data from DB"
    ],
    [
      "TransAct",
      "Synthetic and sequence transaction data (Active)"
    ],
    [
      "ClientCard",
      "Software service, operation, and site data with uniqueness"
    ],
    [
      "TransUserActivity",
      "Synthetic and sequence transaction data (User Activity)"
    ],
    [
      "TierCache",
      "Application, transaction, and tier data from cache"
    ],
    [
      "Rolling",
      "Software service, operation, and site baselines"
    ],
    [
      "ODClientDetails",
      "Client-level details (on demand)"
    ],
    [
      "ODClientList",
      "List of users (on demand)"
    ],
    [
      "PartClientCard",
      "Software service, operation, and site data with limited uniqueness"
    ],
    [
      "CliCnt",
      "Client counters (hidden)"
    ],
    [
      "TransA",
      "Synthetic and sequence transaction data (Agentless)"
    ],
    [
      "DayTierBndClientCard",
      "Tier-bound client counters (hidden)"
    ],
    [
      "CharcTrans",
      "Synthetic and sequence transaction baselines"
    ],
    [
      "Trans",
      "Synthetic and sequence transaction data"
    ],
    [
      "Tier",
      "Application, transaction, and tier data"
    ],
    [
      "CvNetwork",
      "Internetwork traffic data"
    ],
    [
      "Threshold",
      "Software service, operation, and site data Fixed Threshold"
    ],
    [
      "ClientView",
      "Software service, operation, and site data"
    ],
    [
      "TfcOnLink",
      "Network link data"
    ],
    [
      "TierBaselineCache",
      "Application, transaction, and tier baselines"
    ],
    [
      "Citrix",
      "Citrix/WTS hardware data"
    ],
    [
      "TierUserActivity",
      "Application, transaction, and tier data with uniqueness"
    ],
    [
      "WholeTraff",
      "Low-significance traffic"
    ],
    [
      "TierDb",
      "Application, transaction, and tier data from DB"
    ],
    [
      "CVCache",
      "Software service, operation, and site data from cache"
    ]
  ],
  "resultsCount": 25,
  "offset": 0
}

The sample output lists 25 data views by data view ID and description, starting with ClientViewDb.

Example REST getDimensions

A call to getDimensions requires parameters appId (from getApplications) and viewId (from getDataViews) and resolution (from getResolutions).

In this example, SYSTEMDIAG is the application and ProbeMemStatistics is the data view and r is the resolution:

http://1.2.3.4/rest/dmiquery/getDimensions?appId=SYSTEMDIAG&viewId=ProbeMemStatistics&resolution=r

The call in this example returned the following list of dimensions for the named application and data view and resolution:

text
 {
  "count": 5,
  "results": [
    [
      "begT",
      "Time",
      "",
      "DATE"
    ],
    [
      "probe",
      "NAM Probe IP address",
      "",
      "IP"
    ],
    [
      "probePort",
      "NAM Probe TCP port",
      "",
      "INT"
    ],
    [
      "time_stamp",
      "Measurement time stamp",
      "",
      "DATE"
    ],
    [
      "objectName",
      "Object name",
      "",
      "STRING"
    ]
  ],
  "resultsCount": 5,
  "offset": 0
}

The sample output lists 5 dimensions, starting with begT (tIme).

Example REST getMetrics

A call to getMetrics requires parameters appId (from getApplications) and viewId (from getDataViews) and resolution (from getResolutions).

In this example, SYSTEMDIAG is the application and ProbeMemStatistics is the data view and 1 is the resolution:

http://1.2.3.4/rest/dmiquery/getMetrics?appId=SYSTEMDIAG&viewId=ProbeMemStatistics&resolution=1

The call in this example returned the following nested array describing the metrics for the named application, data view, and resolution:

text
 {
  "count": 2,
  "results": [
    [
      "totalM",
      "Memory usage",
      "B",
      "BYTE"
    ],
    [
      "cnt",
      "Data objects",
      "",
      "INT"
    ]
  ],
  "resultsCount": 2,
  "offset": 0
}

The sample output lists two metrics: totalM and cnt .

Example REST getApplications

A call to getApplications requires no parameters.

For example:

http://1.2.3.4/rest/dmiquery/getApplications

The call returns a list of application IDs such as:

text
 {
  "count": 6,
  "results": [
    [
      "CVENT",
      "NAM Server"
    ],
    [
      "GOMEZ",
      "Synthetic Backbone"
    ],
    [
      "UEM",
      "RUM Browser"
    ],
    [
      "ALARMS",
      "Tools"
    ],
    [
      "HM",
      "DB status"
    ],
    [
      "SYSTEMDIAG",
      "Diagnostic"
    ]
  ],
  "resultsCount": 6,
  "offset": 0
}

The sample output lists six applications by application ID: CVENT, GOMEZ, UEM, ALARMS, HM, and SYSTEMDIAG.

Example REST getDMIData, getDMIData2, getDMIData3

For other REST methods, you can use GET because all necessary parameters can be contained in the URL. To call getDMIData, getDMIData2, or getDMIData3, however, you need to use a POST request. This enables you to pass more parameters and parameter values than you can pass through a GET call in the URL.

Note

Use getDMIData3 when writing a new application. The earlier methods (getDMIData and getDMIData2) continue to be offered for the sake of backwards compatibility with existing client applications.

Differences between getDMIData, getDMIData2, and getDMIData3

  • The difference between getDMIData and getDMIData2 is that the latter method returns an object that contains GUI labels and units of measure for returned data.
  • The difference between getDMIData2 and getDMIData3 is that the latter method returns an object that contains IDs of the column renderers.

Also, there is a new format available for the response to the getDMIData3 method. To receive the data in the new format, you need to set the Accept parameter in the REST request to application/dmi . In RESTClient, you would go to Headers  ► Custom Header and set Name to Accept and Value to application/dmi .

The response is formatted similarly to the DMI text export. Differences include:

  • It returns all columns, not only visible ones
  • It returns only application and data view IDs, not the human-readable names
  • No information about histograms is included

Example for getDMIData

In this example, note that there are no parameters set in the URL:

http://address/rest/dmiquery/getDMIData

The details are passed in the body:

text
 {
  "appId": "CVENT",
  "viewId": "ClientView",
  "dataSourceId": "ALL_AGGR",
  "dimensionIds": [
    "appl",
    "sDNSName"
  ],
  "metricIds": [
    "c_sByte",
    "trans"
  ],
  "dimFilters": [
    [
      "appl",
      "WWW_HTTP",
      false
    ],
    [
      "sDNSName",
      "",
      false
    ]
  ],
  "metricFilters": [],
  "sort": [],
  "top": 1000,
  "resolution": "r",
  "timePeriod": "Today",
  "numberOfPeriods": 0,
  "timeBegin": 1136264400000,
  "timeEnd": 1136350800000
}

In this example, the call returned:

text
 {
  "columnHeader": [
    "appl",
    "sDNSName",
    "c_sByte",
    "trans"
  ],
  "rawData": [
    [
      null,
      null,
      78734950,
      1218
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      39416000,
      452
    ]
  ],
  "formattedData": [
    [
      "WWW_HTTP",
      "10.10.12.1",
      "7.873495E7",
      "1218.0"
    ],
    [
      "WWW_HTTP",
      "10.1.6.0",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.9.1",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.6.2",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.6.1",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.5.0",
      "3.9416E7",
      "452.0"
    ]
  ],
  "dmiServiceError": [
    {}
  ],
  "timeBegin": 1136264400000,
  "timeoutValue": 600000,
  "timeEnd": 1136350800000
}

Example for getDMIData2

You could send the same body to the same machine but with method getDMIData2 :

http://address/rest/dmiquery/getDMIData2

In this example, it returned the following output (again trimmed for brevity):

text
 {
  "columnUnit": [
    "",
    "",
    "B",
    ""
  ],
  "columnHeaderName": [
    "Software service",
    "Server name",
    "Total bytes",
    "Operations"
  ],
  "columnHeader": [
    "appl",
    "sDNSName",
    "c_sByte",
    "trans"
  ],
  "rawData": [
    [
      null,
      null,
      78734950,
      1218
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      39416000,
      452
    ]
  ],
  "formattedData": [
    [
      "WWW_HTTP",
      "10.10.12.1",
      "7.873495E7",
      "1218.0"
    ],
    [
      "WWW_HTTP",
      "10.1.6.0",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.9.1",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.6.2",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.6.1",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.5.0",
      "3.9416E7",
      "452.0"
    ]
  ],
  "dmiServiceError": [
    {}
  ],
  "timeBegin": 1136264400000,
  "timeoutValue": 600000,
  "timeEnd": 1136350800000
}

Note that the result of getDMIData2 extends that of getDMIData by adding:

text
 "columnUnit": [ "", "" ],
"columnHeaderName": [ "Application", "Transaction" ],

Example for getDMIData3

Yet another call to the same machine using the same body but with method getDMIData3

http://address/rest/dmiquery/getDMIData3

returns the following (again trimmed for brevity):

text
 {
  "columnRendererIds": [
    "STRING",
    "STRING",
    "BYTE",
    "NUMBER"
  ],
  "columnUnit": [
    "",
    "",
    "B",
    ""
  ],
  "columnHeaderName": [
    "Software service",
    "Server name",
    "Total bytes",
    "Operations"
  ],
  "columnHeader": [
    "appl",
    "sDNSName",
    "c_sByte",
    "trans"
  ],
  "rawData": [
    [
      null,
      null,
      78734950,
      1218
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      12740000,
      174
    ],
    [
      null,
      null,
      39416000,
      452
    ]
  ],
  "formattedData": [
    [
      "WWW_HTTP",
      "10.10.12.1",
      "7.873495E7",
      "1218.0"
    ],
    [
      "WWW_HTTP",
      "10.1.6.0",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.9.1",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.6.2",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.6.1",
      "1.274E7",
      "174.0"
    ],
    [
      "WWW_HTTP",
      "10.1.5.0",
      "3.9416E7",
      "452.0"
    ]
  ],
  "dmiServiceError": [
    {}
  ],
  "timeBegin": 1136264400000,
  "timeoutValue": 600000,
  "timeEnd": 1136350800000
}

Note that the result of getDMIData2 extends that of getDMIData by adding:

text
 "columnRendererIds": [ "STRING", "STRING" ],

Example REST getResolutions

A call to getResolutions requires parameters appId (from getApplications) and viewId (from getDataViews).

In this example, SYSTEMDIAG is the application and ProbeMemStatistics is the data view:

http://address/rest/dmiquery/getResolutions?appId=SYSTEMDIAG&viewId=ProbeMemStatistics

The call in this example returned the following list of possible resolutions for the named application and data view:

text
 {
  "count": 4,
  "results": [
    "r",
    "1",
    "6",
    "d"
  ],
  "resultsCount": 4,
  "offset": 0
}

Resolution IDs are identical to those used for definitions in dmi_dataview-*.properties files. Possible resolutions include:

  • r - one period
  • 1 - one hour
  • 6 - six hours
  • d - one day
  • w - one week
  • m - one month