---
title: "Execute object query"
method: POST
path: "/v1/objects/query"
tags: ["Objects"]
---

# Execute object query

`POST /v1/objects/query`

Execute object query (specialized NXSL script) and return all matching objects along with additional data fields.

## Request body

- object
  - `fields` string[] — List of additional fields to be retrieved.
  - `inputFields` object — Map of user input fields (available in query script via global variable $INPUT). Keys are input field names, values are user-provided values.
  - `limit` integer — Optional limit on number of retrieved objects. Limit is applied after ordering.
  - `orderBy` string[] — List of object attributes to be used for ordering result.
  - `query` string, required — Object query script
  - `rootObjectId` integer — Optional root object ID to scope the query to a sub-tree. 0 (default) queries all objects.
  - `readAllFields` boolean — If true, all object fields are made available to the query script (default false).

## Response `200`

Query successfully executed.

- ObjectQueryResult[]
  - `fields` object
  - `object` ObjectSummary
    - `alias` string — Object alias
    - `category` integer — Object category ID
    - `class` 'AccessPoint' | 'AgentPolicyLogParser' | 'Asset' | 'AssetGroup' | 'AssetRoot' | 'BusinessService' | 'BusinessServiceProto' | 'BusinessServiceRoot' | 'Chassis' | 'Cluster' | 'Condition' | 'Container' | 'Dashboard' | 'DashboardGroup' | 'DashboardRoot' | 'Generic' | 'Interface' | 'MobileDevice' | 'Network' | 'NetworkMap' | 'NetworkMapGroup' | 'NetworkMapRoot' | 'NetworkService' | 'Node' | 'NodeLink' | 'Rack' | 'Report' | 'ReportGroup' | 'ReportRoot' | 'Sensor' | 'ServiceCheck' | 'ServiceRoot' | 'Subnet' | 'Template' | 'TemplateGroup' | 'TemplateRoot' | 'VPNConnector' | 'Zone'
    - `guid` string, uuid — Object GUID
    - `id` integer — Object ID
    - `ipAddress` InetAddress
      - `family` integer — IP address family
      - `address` integer — IP address
      - `prefixLength` integer — IP address prefix length
    - `isInMaintenanceMode` boolean — true if object is in maintenance mode
    - `isMaintenanceApplicable` boolean — true if object can be placed into maintenance mode
    - `isMaintenanceScheduled` boolean — true if object has pending scheduled maintenance
    - `name` string — Object name
    - `timestamp` string, date-time — Object last change timestamp
    - `status` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

## Other responses

- `401` — Unauthorized.

---

[API](https://skmtc.net/netxms/apis/netxms-api.md) · [All operations](https://skmtc.net/netxms/apis/netxms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/netxms/netxms-api/versions/14d93e5115dd/schema)
