URL
GET https://{api-url}/api/v2/tenants/{tenantId}/monitoring/templates/search
Sample URLs
https://{api-url}/api/v2/tenants/client_93/monitoring/templates/search
https://{api-url}/api/v2/tenants/client_93/monitoring/templates/search?pageNo=1&pageSize=10&isDescendingOrder=true&sortName=id&queryString=id:1043+name:vTemplate+scope:Global+collectorType:AWS+status:ACTIVE+generation:1
https://{api-url}/api/v2/tenants/msp_92/monitoring/templates/search?queryString=startCreationDate:2015-11-10T10:40:20 0000+endCreationDate:2015-11-11T10:40:20 0000
Parameters
The parameters are optional:
Field | Default Value |
---|---|
pageNo={pageNo} | 1 |
pageSize={pageSize} | 100 |
isDescendingOrder={true/false} | true |
sortName={field} | id |
queryString={queryString} | NA |
NA indicates that the value is not applicable.
Query variables
Query Variables | Description |
---|---|
id | Template ID. |
name | Template name. |
scope | Template scope. Example: Global [note 3] |
collectorType | Collector type. Supported values are: Agent, Gateway, OpsRamp Cloud, AWS, GOOGLE, AZURE |
status | Template status. Example: ACTIVE, EOL |
generation | The generation. Example: 1, 2 |
startCreationDate | Search for templates created within a certain duration. startCreationDate denotes the from date. |
endCreationDate | Search for templates created within a certain duration. endCreationDate denotes the to date. |
startUpdationDate | Search for templates updated within a certain duration. startUpdationDate denotes the from update date. |
endUpdationDate | Search for templates updated within a certain duration. endUpdationDate denotes the to update date. |
sourceType | Template source. Supported values are: DEVICE, DATA_CENTER, VI_CLUSTER, VI_DATASTORE, JMX_APP_CLUSTER, JMX_APP_INSTANCE, DISTRIBUTED_VIRTUAL_SWITCH, CONTRAIL_ANALYTICS_NODE, CONTRAIL_CONFIG_NODE, CONTRAIL_CONTROL_NODE, VIRTUVAL_ROUTER, STORAGE_ARRAY_VOLUME |
Notes
- There are special characters that can be used in a query string:
- (+) represents the next field and must be URL-encoded.
- (:) represents equals. An example is
key : value
. - Space characters must be URL-encoded.
Date format must be yyyy-MM-ddTHH:mm:ssZ (GMT).
Provide scope: Global, to get gGlobal templates
Provide scope: OpsRamp, to get OpsRamp templates
CLIENT AUTHENTICATION
- Provide scope: Partner, to get partner templates
- Provide scope: Client, to get client templates
PARTNER AUTHENTICATION
- Provide scope: Partner, to get partner templates
- Use this API with respective client_id, to get client templates as shown in example URL 1.
Note: queryString not required with scope.
SERVICE PROVIDER AUTHENTICATION
- Use this API with respective msp_id, to get partner templates as shown in example URL 3.
Note: queryString not required with scope.
- Use this API with respective client_id, to get client templates as shown in example URL 1.
Note: queryString not required with scope.
Provide sourceType = DEVICE, to get available templates at the device level.
Note: This can be useful in assigning templates to a device.
Status code
200 OK
Sample response
{
"id": 26,
"uniqueId": "c8b5f56a-7bbc-4d30-bb76-de0dee6fa3da",
"name": "AGENT_TEMP_API_TEST_8",
"description": "AGENT_TEMP_API_TEST_8",
"collectorType": "OpsRamp Agent",
"status": "ACTIVE",
"generation": 1,
"resourceType": "DEVICE",
"ruleEntity": "DEVICE",
"createdDate": "2020-07-22T11:56:31+0000",
"updatedDate": "2020-07-22T11:56:31+0000",
"monitors": [
{
"name": "ping.metric",
"frequency": 15,
"repeatFrequency": 1,
"repeatCount": 1,
"warningThreshHold": "1",
"criticalThreshHold": "3",
"raiseAlert": false,
"availability": false,
"monitorType": "SCRIPTS",
"monitorScriptName": "Test_CUSTOM_MON_1",
"scriptUserType": 1,
"monitorNonExistingServices": false,
"monScriptMetricName": "ping.metric",
"customMonitorScripts": [
{
"fileName": "test",
"fileVersion": "0.00",
"fileSize": 12,
"timeout": 0,
"path": "https://mspnocsupport.com/downloadScript.do?action=downloadAgent&fileName=test&version=0.00",
"pathType": "local",
"type": "POWERSHELL",
"alert": false,
"monScriptName": "Test_CUSTOM_MON_1",
"fileLoc": "https://mspnocsupport.com/downloadScript.do?action=downloadAgent&fileName=test&version=0.00",
"exeName": "EXECUTE",
"exeType": "POWERSHELL",
"scriptVer": "0.00",
"scriptMeritcs": [
{
"name": "ping.metric",
"displayName": "ping.metric",
"warningThreshHold": "1",
"criticalThreshHold": "3",
"units": "mb"
}
],
"description": "Test_CUSTOM_MON_1",
"category": {
"id": 0,
"name": "Miscellaneous"
},
"params": []
}
],
"customMonitorScriptMap": {
"Test_CUSTOM_MON_1": "Test_CUSTOM_MON_1"
}
}
]
}