---
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'
    - `effectiveRights` EffectiveRights — Access rights the calling user effectively has on the object. Rights assigned directly on the object, including those granted through a group the user belongs to, replace rights inherited from parent objects rather than adding to them - inherited rights apply only when the object has no access control entry matching the user. Same set of rights NXCP clients obtain with CMD_GET_EFFECTIVE_RIGHTS. Every right is always present as separate boolean attribute. Value is specific to the calling user rather than part of the object's stored state, and is ignored if present in a request body.
      - `read` boolean — Read object (see it in object listings and read its basic attributes)
      - `modify` boolean — Modify object configuration
      - `createChildObjects` boolean — Create child objects
      - `delete` boolean — Delete object
      - `viewAlarms` boolean — View alarms associated with the object
      - `accessControl` boolean — Read and modify object's access control list
      - `updateAlarms` boolean — Acknowledge and update alarms associated with the object
      - `sendEvents` boolean — Send events on behalf of the object
      - `control` boolean — Execute control operations on the object - agent commands, wake-on-LAN, object tools, SSH commands, and TCP proxy. Does not cover changing management status, which requires "modify".
      - `terminateAlarms` boolean — Terminate and resolve alarms associated with the object
      - `pushData` boolean — Push data collection values to the object
      - `createHelpdeskTicket` boolean — Create helpdesk tickets from alarms associated with the object
      - `downloadFiles` boolean — Download files from the node
      - `uploadFiles` boolean — Upload files to the node
      - `manageFiles` boolean — Manage files on the node (rename, move, delete)
      - `controlMaintenanceMode` boolean — Enter and leave maintenance mode
      - `readAgentData` boolean — Read data provided by NetXMS agent
      - `readSnmpData` boolean — Read data provided via SNMP
      - `takeScreenshot` boolean — Take screenshot on the node
      - `editMaintenanceJournal` boolean — Create and edit maintenance journal entries
      - `configureAgent` boolean — Change agent configuration on the node
      - `editComments` boolean — Edit object comments
      - `manageResponsibleUsers` boolean — Manage list of users responsible for the object
      - `delegatedRead` boolean — Read the object indirectly when it is reached through a dashboard or network map the user is allowed to read, without holding "read" on the object itself
      - `managePolicies` boolean — Manage agent policies (template objects only)
      - `manageIncidents` boolean — Manage incidents associated with the object
      - `readCredentials` boolean — Read object's credentials (SNMP communities, agent secrets, and similar)
      - `queryWebService` boolean — Query web services defined on the node
      - `uploadDeviceConfig` boolean — Upload configuration to network device
      - `readDeviceConfig` boolean — Read configuration of network device
      - `readDataCollectionConfig` boolean — Read data collection configuration
      - `executeScript` boolean — Execute ad-hoc scripts in the context of the object
    - `guid` string, uuid — Object GUID
    - `id` integer — Object ID
    - `ipAddress` InetAddress
      - `family` integer — IP address family
      - `address` string — IP address in text form. Omitted entirely for unset (AF_UNSPEC) addresses.
      - `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/revisions/ae3bfc65fa61/schema)
