Export devices as CSV
Export the devices of your company as a paginated CSV (one row per device, first line is the header, up to 1000 devices per page). Each row contains the device attributes, its latest code of each type (recovery key, iCloud bypass code, unlock PIN, recovery OS password — see getDeviceCodeHistory for the full history), and one customField.<label> column per active custom field (SELECT / MULTI_SELECT values are resolved to their option labels). Iterate page until totalPages and concatenate the CSV pages (dropping the header line of subsequent pages) to rebuild the full export. The REST route responds with text/csv (pagination in the X-Page, X-Per-Page, X-Total-Pages and X-Total-Elements headers); the MCP tool returns the CSV in the csv field.
Authorizations
Use your Primo API key in the Authorization header as Bearer <API_KEY>.
Query Parameters
Page of devices to export (1-indexed)
1 <= x <= 9007199254740991Number of devices per CSV page (default 500, max 1000)
1 <= x <= 1000Response
CSV page, one row per device. Pagination is returned in the X-Page, X-Per-Page, X-Total-Pages and X-Total-Elements response headers.
The response is of type string.