NinjaOne icon

NinjaOne

Ninja One Public API documentation. <br><br>See also: <br> <a href="https://resources.ninjarmm.com/API/Ninja+RMM+Public+API+v2.0.5+Device+Filter+Syntax.pdf">Device Filter syntax</a><br><a href="https://app.ninjarmm.com/apidocs-beta/core-resources/articles/webhooks/overview">Webhooks</a>

Actions309

Location → Location custom fields

AI-generated

Summary

Retrieve custom field values for a specific location within an organization by providing the organization ID and location ID. Supports pagination, inheritance of custom field definitions, and customizable request options.

Inputs

  • id (required) — The organization ID to query within.
  • locationId (required) — The specific location ID whose custom fields to retrieve.
  • returnAll — Whether to return all results across pages (true) or only a single page (false).
  • additionalFields.withInheritance — If enabled, retrieves custom field values using the definition scope hierarchy, inheriting from parent scopes if applicable.
  • options.pagination — Customization of pagination mode and parameters to control how multiple pages of results are fetched.
  • options.customBody — Optional custom JSON body to merge into the request, which overrides other parameters.
  • options.headerFilters — Optional custom HTTP headers to include in the API request.
  • options.queryFilters — Optional query string parameters to filter results.
  • options.batching — Batch processing settings to control request grouping and intervals to avoid rate limits.
  • options.debug — If enabled, outputs detailed debug information including the URL, headers, and body of each API request.
  • options.timeout — Maximum time in milliseconds to wait for the server response before timing out (default 5 minutes).

Output shape

a list of custom field objects associated with the specified location

If 'returnAll' is false, only one page of results is returned; pagination settings control fetching multiple pages. When 'debug' is enabled, detailed request info is included in output for troubleshooting.

Examples

Example 1: Fetch all custom fields for location 123 within organization 45, including inheritance

Set 'id' to 45, 'locationId' to 123, 'returnAll' to true, and 'additionalFields.withInheritance' to true.

Links

Discussion