Defined variable for pageination is not present in body of request.
The API I’m working with needs the requested page number in the body of the request. A working example is:
curl --location 'https://businessapi.mosyle.com/v1/devices' \
--header 'Content-Type: application/json' \
--header 'accessToken: Access_Token' \
--header 'Authorization: Bearer Bearer_Token' \
--data '{
"operation": "list",
"options": {
"os": "macos",
"page": 1,
"specific_columns": [
"device_name",
"device_type",
"serial_number",
"os"
]
}
}'
What is the error message (if any)?
Problem in node ‘Get Some‘
The returned response was identical 5x, so requests got stopped
If I limit to 2 pages, the workflow completes.
[
{
"status": "OK",
"response": [
{
"devices": [
{
"total_disk": "494.0000000000",
"ActiveManagedUsers": "[]",
"asset_tag": null,
"available_disk": "195.0000000000",
"CurrentConsoleManagedUser": "wirkkala",
"date_last_beat": "1733714267",
"device_model": "MacBookAir10,1",
"device_name": "TerryW MBA PDX M1",
"device_type": "COMPUTER",
"ethernet_mac_address": "80:65:7c:e7:ca:3a",
"HostName": "terryw-mba-pdx-m1.local",
"last_lan_ip": "10.0.0.69",
"LocalHostName": "terryw-mba-pdx-m1",
"model_name": "MacBook Air",
"os": "mac",
"osversion": "15.1.1",
"serial_number": "FVFHQ0C3Q6LW",
"tags": "fv,econw,sso",
"enrollment_type": "GENERAL",
"cpu_model": "Apple M1",
"installed_memory": "16",
"device_model_name": "MacBook Air (M1, 2020)"
},
{
"total_disk": "494.0000000000",
"ActiveManagedUsers": "[]",
"asset_tag": null,
"available_disk": "251.0000000000",
"CurrentConsoleManagedUser": "sausedo",
"date_last_beat": "1733714705",
"device_model": "MacBookAir10,1",
"device_name": "KrynS MBA PDX M1",
"device_type": "COMPUTER",
"ethernet_mac_address": "1c:91:80:b8:45:0f",
"HostName": "kryns-mba-pdx-m1.local",
"last_lan_ip": "192.168.0.22",
"LocalHostName": "kryns-mba-pdx-m1",
"model_name": "MacBook Air",
"os": "mac",
"osversion": "15.1.1",
"serial_number": "FVFFJ40YQ6LR",
"tags": "fv,econw,sso",
"enrollment_type": "GENERAL",
"cpu_model": "Apple M1",
"installed_memory": "16",
"device_model_name": "MacBook Air (M1, 2020)"
}
],
"rows": 89,
"page_size": 50,
"page": 1
}
]
},
{
"status": "OK",
"response": [
{
"devices": [
{
"total_disk": "494.0000000000",
"ActiveManagedUsers": "[]",
"asset_tag": null,
"available_disk": "195.0000000000",
"CurrentConsoleManagedUser": "wirkkala",
"date_last_beat": "1733714267",
"device_model": "MacBookAir10,1",
"device_name": "TerryW MBA PDX M1",
"device_type": "COMPUTER",
"ethernet_mac_address": "80:65:7c:e7:ca:3a",
"HostName": "terryw-mba-pdx-m1.local",
"last_lan_ip": "10.0.0.69",
"LocalHostName": "terryw-mba-pdx-m1",
"model_name": "MacBook Air",
"os": "mac",
"osversion": "15.1.1",
"serial_number": "FVFHQ0C3Q6LW",
"tags": "fv,econw,sso",
"enrollment_type": "GENERAL",
"cpu_model": "Apple M1",
"installed_memory": "16",
"device_model_name": "MacBook Air (M1, 2020)"
},
{
"total_disk": "494.0000000000",
"ActiveManagedUsers": "[]",
"asset_tag": null,
"available_disk": "251.0000000000",
"CurrentConsoleManagedUser": "sausedo",
"date_last_beat": "1733714705",
"device_model": "MacBookAir10,1",
"device_name": "KrynS MBA PDX M1",
"device_type": "COMPUTER",
"ethernet_mac_address": "1c:91:80:b8:45:0f",
"HostName": "kryns-mba-pdx-m1.local",
"last_lan_ip": "192.168.0.22",
"LocalHostName": "kryns-mba-pdx-m1",
"model_name": "MacBook Air",
"os": "mac",
"osversion": "15.1.1",
"serial_number": "FVFFJ40YQ6LR",
"tags": "fv,econw,sso",
"enrollment_type": "GENERAL",
"cpu_model": "Apple M1",
"installed_memory": "16",
"device_model_name": "MacBook Air (M1, 2020)"
}
],
"rows": 89,
"page_size": 50,
"page": 1
}
]
}
]
Please share your workflow
Share the output returned by the last node
See above.
Information on your n8n setup
- n8n version: 1.70.3
- Database (default: SQLite): PostgresQL 15
- n8n EXECUTIONS_PROCESS setting (default: own, main): Default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker on Digital Ocean
- Operating system: Ubuntu Linux 22.04 LTS