NinjaOne icon

NinjaOne

Consume NinjaOne API

Actions158

Queries → Get Windows Services Report

AI-generated

Overview

This node interacts with the NinjaOne API to retrieve a report on Windows services. It allows filtering the report by device, service name, and service state, as well as supports pagination through cursor and page size parameters. This node is useful for IT administrators or automation workflows that need to monitor or audit the status of Windows services across devices managed in NinjaOne.

Practical examples include:

  • Fetching all running Windows services on a specific device.
  • Retrieving a paginated list of services filtered by their current state (e.g., stopped or paused).
  • Automating compliance checks by querying service states regularly.

Properties

Name Meaning
Df Device filter: specify the device identifier or name to filter services related to it.
Name Service name: filter the report to include only services matching this name.
State Service state: filter services by their state. Options are: UNKNOWN, STOPPED, START PENDING, RUNNING, STOP PENDING, PAUSE PENDING, PAUSED, CONTINUE PENDING.
Cursor Cursor name: used for pagination to continue fetching results from a previous query point.
Page Size Limit number of records per page: controls how many service records are returned per request (default 1000).

Output

The node outputs JSON data containing the Windows services report retrieved from the NinjaOne API. Each item in the output array corresponds to a service record matching the specified filters and pagination settings.

If binary data were involved, it would be summarized here, but this operation deals solely with JSON data representing service information.

Dependencies

  • Requires an active connection to the NinjaOne API using OAuth2 authentication.
  • The node depends on the ninjaOneOAuth2Api credential configured in n8n to authenticate requests.
  • No additional external dependencies beyond the NinjaOne API and n8n's HTTP request helpers.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing invalid filter values (e.g., unknown device or service names) may result in empty responses.
    • Pagination errors can occur if the cursor value is incorrect or expired.
  • Error messages:

    • Errors from the NinjaOne API will be returned in the JSON output under an error field if "Continue On Fail" is enabled.
    • Typical errors include authentication errors, invalid parameters, or rate limiting.
  • Resolutions:

    • Verify that the API key or OAuth2 token is correctly configured and has sufficient permissions.
    • Double-check filter values for correctness.
    • Use the cursor and page size parameters carefully to handle large datasets.

Links and References

Discussion