List All Devices

Returns a paged list of devices belonging to a specific product.

Parameters

The following parameters can be applied to limit or refine the returned devices:

Parameter Description Example
page Integer indicating which page of results you are requesting. Starts from 1. https://api.xively.com/v2/products/
PRODUCT_ID/devices?page=2
per_page Integer defining how many results to return per page (1 to 1000). https://api.xively.com/v2/products/
PRODUCT_ID/devices?per_page=5
serial Filter returned devices by serial, by passing either an exact or partial serial string https://api.xively.com/v2/products/
PRODUCT_ID/devices?serial=1827b
activated Possible values (‘true’, ‘false’, ‘all’). Whether to return serials that have been activated, not yet activated, or all of them. Omitting this parameter returns ‘all’. https://api.xively.com/v2/products/
PRODUCT_ID/devices?activated=false

Request

Parameters
Method GET
Base URL https://api.xively.com
API Endpoint /v2/products/PRODUCT_ID/devices
Headers
X-ApiKey API_KEY_HERE
Body
JSON
XML
CSV
  • GET/v2/products/PRODUCT_ID/devices

    This request does not require body data
    
  • XML format not available for this call
    
  • CSV format not available for this call
    

Response

Parameters
Status Code 200 OK
Headers
No Headers
Body
JSON
XML
CSV
  • {
        "totalResults": 6,
        "itemsPerPage": 30,
        "startIndex": 1,
        "devices": [
            {
                "serial": "abc321",
                "activation_code": "ACTIVATION_CODE",
                "created_at": "2013-05-05T18:11:42Z",
                "activated_at": null,
                "feed_id": DEVICE_FEED_ID
            },
            {
                "serial": "123abc",
                "activation_code": "ACTIVATION_CODE",
                "created_at": "2013-05-05T20:54:31Z",
                "activated_at": null,
                "feed_id": DEVICE_FEED_ID
            },
            {
                "serial": "cba123",
                "activation_code": "761854de348c8c201e87ff9d75be58d4d84cebbf",
                "created_at": "2013-05-05T20:55:28Z",
                "activated_at": null,
                "feed_id": 129696
            },
            {
                "serial": "789",
                "activation_code": "ad30b1629498084295c3a27f514129476bfa2e6b",
                "created_at": "2013-05-05T20:56:02Z",
                "activated_at": null,
                "feed_id": 129697
            }
        ]
    } 
    
  • XML format not available for this call
    
  • CSV format not available for this call