{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/audiences/:audience_id/devices","auth":"required","settings":"","examples":{"codes":[{"code":"# Initial request (first page)\ncurl -X GET -u :$API_KEY -H 'Accept: application/json' https://api.carnivalmobile.com/v6/audiences/$audience_id/devices\n\n# Second request (second page)\ncurl -X GET -u :$API_KEY -H 'Accept: application/json' https://api.carnivalmobile.com/v6/audiences/$audience_id/devices?cursor=c2Nhbjs1OzMwNTp1MllsUzNyOFFyS19RMkFNLWdVekxnOxfaGl0czo5Ow==","language":"curl"}]},"method":"get","params":[{"name":"audience_id","type":"string","default":"","desc":"audience identifier","required":false,"in":"path","ref":"","_id":"57c4b69f6a36a80e002b668a"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"meta\": {\n    \"cursor\": \"c2Nhbjs1OzMwNTp1MllsUzNyOFFyS19RMkFNLWdVekxnOxfaGl0czo5Ow==\",\n    \"total\": 15000\n  },\n  \"devices\": [\n    {\n      \"id\": \"5a4f622557ef69***8d54832\",\n      \"user_id\": \"johnsmith42\",\n      \"email\": \"johnsmith:::at:::example.com\",\n      \"push_enabled\": true,\n      \"push_token\": \"d35c15ee345d07f42016738323aa4818e4deacd6****f54dea932a677\",\n      \"platform\": \"iOS\",\n      \"installed_at\":\"2016-02-14T23:05:36.698Z\",\n      \"last_opened\": \"2016-11-23T20:31:03.000Z\",\n      \"user_attributes\": {\n        \"age\": {\n          \"type\": \"integer\",\n          \"value\": 30\n        },\n        \"height\": {\n          \"type\": \"float\",\n          \"value\": 1.75\n        },\n        \"birthdate\": {\n          \"type\": \"date\",\n          \"value\": \"1985-05-01T00:00:00Z\"\n        },\n        \"vip\": {\n          \"type\": \"boolean\",\n          \"value\": true\n        },\n        \"favorite_color\": {\n          \"type\": \"string\",\n          \"value\": \"blue\"\n        }\n      },\n      \"user_events\": {\n        \"purchase_unlocked\": {\n          \"count\": 10,\n          \"first_happened_at\": \"2016-05-23T04:12:34.173Z\",\n          \"last_happened_at\": \"2016-05-24T04:12:34.173Z\"\n        }\n      },\n      \"location\": {\n        \"gps\": {\n          \"lat\": \"-41.12345\",\n          \"lng\": \"174.12345\"\n        },\n        \"geoip\": {\n          \"lat\": \"-41.0\",\n          \"lng\": \"174.0\",\n          \"city\": \"Wellington\",\n          \"country\": \"New Zealand\"\n        }\n      }\n    },...\n  ]\n}","name":""},{"name":"Expired Cursor","status":404,"language":"json","code":"# Cursor expired or not found"}]},"apiSetting":null},"next":{"description":"","pages":[]},"title":"Audiences / Devices","type":"endpoint","slug":"audiences-devices","excerpt":"Returns a paginated list of devices belonging to an audience","body":"## Usage\n\n- In every response you'll receive a specific cursor. It should be used to retrieve the next batch of devices.\n- There's no guarantee on how many devices will be returned per request.\n- You need to request against this URL until you receive no devices inside the devices array (check for an empty devices array to stop).\n- A timeout of 2 mins is allowed between requests, if you wait more than this the cursor will expire and you'll have to start again.\n- The maximum number of open cursors simultaneously is `5`.","updates":[],"order":13,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e6156bf5e4a51006dcd8163","createdAt":"2016-08-29T22:05:33.052Z","parentDoc":null,"__v":9,"category":{"sync":{"isSync":false,"url":""},"pages":["5e6156bf5e4a51006dcd8138","55ed079b0d968e2100de8339","5e6156bf5e4a51006dcd8139","55ed0bb078319821005005cf","5e6156bf5e4a51006dcd813a","5e6156bf5e4a51006dcd813b","5e6156bf5e4a51006dcd813c","5e6156bf5e4a51006dcd813d","5e6156bf5e4a51006dcd813e","5e6156bf5e4a51006dcd813f","5e6156bf5e4a51006dcd8140","5e6156bf5e4a51006dcd8141","5e6156bf5e4a51006dcd8142","5e6156bf5e4a51006dcd8143","5e6156bf5e4a51006dcd8144","5e6156bf5e4a51006dcd8145","5b720760c44b7600034b79ce","5e6156bf5e4a51006dcd814d","5e6156bf5e4a51006dcd814e","5e6156bf5e4a51006dcd8156"],"title":"REST API","slug":"rest-api","order":5,"from_sync":false,"reference":true,"_id":"5e6156bf5e4a51006dcd8122","__v":20,"createdAt":"2015-09-02T04:30:21.948Z","project":"55e67aaa9cc7c62b00c4a1ea","version":"5e6156bf5e4a51006dcd818c"},"githubsync":"","project":"55e67aaa9cc7c62b00c4a1ea","user":"57c4af04817b390e006f5b26","version":{"version":"1.5","version_clean":"1.5.0","codename":"ST Rebrand","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e6156bf5e4a51006dcd8120","5e6156bf5e4a51006dcd8121","5e6156bf5e4a51006dcd8122","5e6156bf5e4a51006dcd8123","5e6156bf5e4a51006dcd8124","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","5e6156bf5e4a51006dcd8125","5e6156bf5e4a51006dcd8126","5af0fe494ca2730003cbc98a","5af0fe55ec80af0003804ca2","5e69868cbd5dcb006b35867b","5e6986ca2c6652006791b6e8"],"_id":"5e6156bf5e4a51006dcd818c","project":"55e67aaa9cc7c62b00c4a1ea","__v":2,"forked_from":"5b720760c44b7600034b7a08","createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z"}}

getAudiences / Devices

Returns a paginated list of devices belonging to an audience

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

audience_id:
string
audience identifier

Examples


Result Format


Documentation

## Usage - In every response you'll receive a specific cursor. It should be used to retrieve the next batch of devices. - There's no guarantee on how many devices will be returned per request. - You need to request against this URL until you receive no devices inside the devices array (check for an empty devices array to stop). - A timeout of 2 mins is allowed between requests, if you wait more than this the cursor will expire and you'll have to start again. - The maximum number of open cursors simultaneously is `5`.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}