Skip to content

tickets.list sends a board-run filter body NinjaOne rejects with 400 (status/organizationId/deviceId) #52

Description

@asachs01

Problem

TicketsResource.list() builds a filters array of { field, operator, value } for status/organizationId/deviceId and POSTs it to /v2/ticketing/trigger/board/{boardId}/run:

filters.push({ field: "status", operator: "is", value: id });        // value is a NUMBER
filters.push({ field: "clientId", operator: "is", value: params.organizationId });
filters.push({ field: "nodeId", operator: "is", value: params.deviceId });

Passing any of these throws a generic 400 (see wyre-technology/ninjaone-mcp#61, #60). Two problems found while investigating:

  1. value must be a JSON string. The OpenAPI TicketBoardRequestDTO types filters[].value as a string; sending value: 2000 (number) is a likely 400 trigger. NinjaOne treats status IDs as strings elsewhere.
  2. The accepted field tokens for status/client are undocumented and not demonstrably supported. Every production NinjaOne integration reviewed (SquaredUp, lwhitelock, Weavestream, Homotechsual) avoids server-side status/client filtering here and either relies on the board's saved conditions or filters client-side.

Impact

Consumers can't filter tickets via list({ status }) / list({ organizationId }) — the call fails outright, and combined with the 400→auth-error mapping (separate issue) the failure is easy to misread.

Suggested fix

At minimum, coerce value to a string. Better: drop the unsupported server-side status/client/device filters from list() (or gate them behind a clearly-documented, verified-working code path), and document that these should be filtered client-side. ninjaone-mcp has already moved to client-side filtering as a workaround (wyre-technology/ninjaone-mcp#62).

Context: wyre-technology/ninjaone-mcp#61, wyre-technology/ninjaone-mcp#60

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions