GET https://{api-url}/api/v2/tenants/{tenantId}/resources/search

Sample URLs

To retrieve all resources of the client:


To retrieve specific resources using query variables:


For this sample, the agent is installed and resources are in inactive state.

Special characters in query string

There are special characters that can be used in a query string:

  • (+) represents the next field and must be URL-encoded. URL encoded is %2B.
  • (:) represents equals. An example is key : value.
  • Space characters must be URL-encoded.
  • Date format must be yyyy-MM-ddTHH:mm:ssZ (GMT).

Valid input values for query string

The following example show valid input values:

  • State values are enum: active/inactive
  • Allow only listed variables
    "queryString=hostName:abc" //valid
    "queryString=hostName2:abc" //Invalid
  • Provide both variable name and value
    "queryString=hostName:abc" //valid
    "queryString=hostName" //Invalid


All parameters are optional:

FieldDefault Value

NA indicates that the value is not applicable.

Query variables

Query VariablesDescription
hostName/resourceNameName of the host.
dnsNameDomain service name.
aliasNameOther name of resource.
idResource unique ID.
Example: d5bce6fe-d19f-4ad7-8c50-5f639f2dd321
serialNumberResource serial number.
ipAddressResource IP address.
systemUIDSystem unique ID.
stateResource state.
Supported values: active, inactive, discovered
typeResource type. Learn more about the supported resource types.
resourceTypeFilter resources based on a resource type. Use `Get Device Types API` to fetch resource types supported by OpsRamp. Provide multiple resource types with comma-separated strings.
deviceTypeFilter resources based on device type. This parameter is required if the resource type is a device. Use `Get Device Types API` to retrieve the names of supported device types. Enumerate multiple device type names with comma-separated strings.
Example: Windows, Linux
appRolesFilter for applications running on the resources. List of supported applications:
startCreationDateIndicates the date to search the creation date of a resource. Start indicates from date.
Example: 2018-01-12T04:53:53 0000
endCreationDateIndicates the date to search for the last date of resource creation. End indicates to date.
Example: 2018-02-10T10:20:25 0000
startUpdationDateSearch for a resource updated within a specific duration. Start indicates from date.
Example: 2018-01-12T04:53:53 0000
endUpdationDateSearch for a resource updated within a specific duration. End indicates to date.
Example: 2018-02-10T10:20:25 0000
tagsAdditional details about a resource. Enumerate provide multiple tags separated by a comma.
Example: parentDevice, category
templateMonitoring template assigned to a resource. Provide the monitoring template ID to fetch the list of resources attached to a monitoring template.
agentProfileSearch for resources with agent profile ID. Retrieve resources that belong to a particular agent.
gatewayProfileSearch for resources with Gateway profile ID. Fetch resources that belong to a particular gateway.
instanceIdCloud instance ID.
accountNumberAccount number of public or private clouds.
installedIntgIdInstalled integration ID. Search Installed Integrations retrieves the list of integrations installed. Provide the integration ID to fetch the resources associated with an integration.
agentInstalledFilter for resources with agent installed:
  • agentInstalled: true to fetch agent installed resources:
  • agentInstalled: false to fetch non-agent resources.
deviceGroupFetch resources that belong to specific device group. Provide a device group name.
Example: Windows Servers
serviceGroupFetch resources that belong to a specific service group by providing the service group name.
Example: Admin Group
deviceLocationFetch resources that are at a specific location. Provide a location name.
Example: West-SJ
isEqualsParameter to consider the exact match for a variable:
  • isEquals: true, to consider the exact match of a variable.
  • isEquals: false to consider a similar match of a variable.
    For example, to fetch list of resources in location West Valley, provide the query variable as deviceLocation: West Valley+isEquals: true.
firstAssetManagedTimeThe first time a resource is managed.
assetManagedTimeThe most recent time a resource is managed. The asset managed time gets updated when a resource is managed or unmanaged.
aliasIpAlias IP address of the network you have.

Sample response

    "results": [
            "id": "61fec02a-4370-4dfb-be4d-1bb9fe3e05aa",
            "hostName": "TestHost",
            "ipAddress": "",
            "dns": "",
            "client": {
                "id": 4,
                "uniqueId": "client_4",
                "name": "EHR"
            "createdDate": "2019-05-20T09:31:50+0000",
            "classCode": "device",
            "deviceType": "Desktop",
            "devicePath": "Desktop",
            "type": "DEVICE",
            "state": "active",
            "make": "",
            "model": "",
            "osName": "",
            "description": "test dummy device",
            "gatewayProfileId": "0",
            "source": "MANUAL",
            "agentInstalled": false,
            "attributes": {
                "network": [
                        "ip": "",
                        "mac": "f8:94:c2:0c:10:f2",
                        "aliasIp": ","
            "aliasName": "TestAlias",
            "name": "TestHost",
            "resourceName": "TestResource",
            "consoles": [],
            "resourceType": "Desktop",
            "assetManagedTime": "2019-05-20T09:31:50+0000",
            "firstAssetManagedTime": "2019-05-20T09:31:50+0000",
            "deleted": false,
            "ts": 0,
            "clientId": 0,
            "locationOffset": 0,
            "totalLocations": 0,
    "totalResults": 1,
    "orderBy": "name",
    "pageNo": 1,
    "pageSize": 100,
    "totalPages": 1,
    "nextPage": false,
    "descendingOrder": false