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

DocumentTemplates → Archive multiple document templates

AI-generated

Summary

Archive multiple document templates by sending their details in a JSON array to the NinjaOne API endpoint for bulk archiving.

Inputs

  • Items (required) — An array of document template items to be archived. This JSON array must include each template's necessary identification details as required by the API.
  • Options — Optional parameters to customize the API request, including custom request body fields (which override default fields), HTTP headers, query-string filters, batching settings for grouping input items into batches with delays between batches, debug mode to include request details in output, pagination configuration, and request timeout.

Output shape

a single JSON response object representing the API response to the batch archive request

The operation submits one request per batch of input items based on the batching options. If batching is not set, all items are sent in one request. Enabling debug will include detailed request information in the output. The response shape depends on the API's batch archive endpoint response. Errors or partial failures depend on the API behavior and are reflected in the response.

Examples

Example 1: Archiving multiple document templates in batches of 5 with debug enabled

Set 'Items' with an array of up to 5 document templates per batch, enable the 'Debug' option to true, and configure batching with batchSize of 5 and batchInterval of 1000 ms (1 second).

Example 2: Sending custom HTTP headers with the bulk archive request

In the 'Options', add one or more custom headers by specifying header names and values under 'Custom Headers', for example to include authorization tokens or custom API keys.

Links

Discussion