Skip to content

Disable paging and raise pageSize on NinjaOne array-mode datastreams#52

Draft
Deenk wants to merge 1 commit into
mainfrom
work/fw/ninjaone-paging-fixes
Draft

Disable paging and raise pageSize on NinjaOne array-mode datastreams#52
Deenk wants to merge 1 commit into
mainfrom
work/fw/ninjaone-paging-fixes

Conversation

@Deenk
Copy link
Copy Markdown
Contributor

@Deenk Deenk commented May 22, 2026

📋 Summary

The 6 datastreams that hit NinjaOne's array endpoints (/v2/devices, /v2/organizations, /v2/locations, plus the 3 scoped variants) were configured with token-mode paging reading metadata.next_page_token from the response. That field doesn't exist for these specific endpoints. NinjaOne returns a plain JSON array with no envelope or pagination headers, so paging silently stopped after page 1, capping users at 1000 devices.

As I understand it, the SquaredUp Web API plugin has no paging mode that fits NinjaOne's pattern of "last item's id as the next cursor" (verified against the API spec, live API response, and the Web API paging support doc). Fixing this properly needs a framework change I think.

As a stopgap, switch to mode: none and request pageSize: 10000 in getArgs. NinjaOne accepts arbitrary pageSize values without error in testing, though we couldn't verify the actual server-side cap on a small test tenant. This matches the precedent already used in activities.json.


🔗 Related issue(s)


🧩 Plugin details

  • Plugin name:
  • Type of change:
    • Bug fix
    • New datastream
    • Enhancement to existing datastream
    • Performance improvement
    • Documentation / metadata / logo
    • Other (please describe):

⚠️ Breaking changes

Does this PR introduce any breaking changes?

  • No
  • Yes (please describe):

If yes, describe:

  • What breaks
  • Who is impacted
  • Any migration steps

📚 Documentation

  • Documentation updated
  • No documentation changes needed

✅ Checklist

  • No secrets or credentials included
  • Plugin, datastream and UI naming follow SquaredUp guidelines
  • I agree to the Code of Conduct

The 6 datastreams that hit NinjaOne's bare-array endpoints (/v2/devices,
/v2/organizations, /v2/locations, plus the 3 scoped variants) were configured
with token-mode paging reading metadata.next_page_token from the response.
That field doesn't exist - NinjaOne returns a plain JSON array with no
envelope or pagination headers - so paging silently stopped after page 1,
capping users at 1000 devices.

The SquaredUp Web API plugin has no paging mode that fits NinjaOne's pattern
of "last item's id as the next cursor" (verified against the API spec, live
API response, and the Web API paging support doc). Fixing this properly
needs a framework change.

As a stopgap, switch to mode: none and request pageSize: 10000 in getArgs.
NinjaOne accepts arbitrary pageSize values without error in testing, though
we couldn't verify the actual server-side cap on a small test tenant. This
matches the precedent already used in activities.json.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Deenk Deenk self-assigned this May 22, 2026
@github-actions
Copy link
Copy Markdown

🧩 Plugin PR Summary

📦 Modified Plugins

  • plugins/NinjaOne/v1

📋 Results

Step Status
Validation ✅ Passed
Deployment 🚀 Deployed

🔍 Validation Details

ninja-one
{
  "valid": true,
  "pluginName": "ninja-one",
  "pluginType": "cloud",
  "summary": {
    "Data Streams": 37,
    "Import Definitions": 1,
    "UI Configuration": true,
    "Has Icon": true,
    "Has Default Content": true,
    "Config Validation": false,
    "Custom Types": true
  }
}

@Deenk Deenk added the bug Something isn't working label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

1 participant