Sections ▾

GET ​/api​/devices

Returns a list of your registered devices. You can filter the results by tag, alias, or proximity to a location. If you specify all parameters, the results will be the intersection of them.

  
  curl -X GET "https://app.contexthub.com/api/devices" \
       -H "Content-Type: application/json" \
       -H "CONTEXTHUB_DEVICE_ID: DB4E6157-D64F-43EE-B114-39A13D2B9BC7" \
       -H "Authorization: Token token=\"534e565f-335a-469d-974e-e18a85f00d2d\"" \
       -v \
  

Request

Example Request

{
  "tag": "foo",
  "tag_operator": "ALL",
  "alias": "MyPhone",
  "latitude": 29.763638,
  "longitude": -95.461874,
  "radius": 2000
}

Example Parameters

Response

Example Response

{
  "devices": [
    {
      "id": 613,
      "push_token": "46548b30d200356529271162631f37788d8258b4506dea0c09e7bf8fe0adcecd",
      "device_type": "iOS",
      "alias": "iPhone 95932832.422108",
      "device_id": "019283245325",
      "tags": [
        "chaione"
      ],
      "additional_info": {
      },
      "last_profile": {
      },
      "tag_string": "tag1,tag2,tag3",
      "simulator": true,
      "created_at": "2015-01-30T18:47:05+00:00",
      "updated_at": "2015-01-30T18:47:05+00:00"
    }
  ]
}

Response Parameters

Response Codes

Successful Response Codes

Failure Response Codes