Resources

REST API

Resources

DeviceAtlas provides a REST API for fetching definitions of pre-defined property values and for sending device/user-agent data to DeviceAtlas.

For the Device Detection REST API, please see Cloud APIs.

 

URI structure

All DeviceAtlas requests start with https://deviceatlas.com/api/rest/v1 prefix. The following parts of the path depend on the endpoint of the request. For example, the following shows cURL fetching all of the possible browserNames:

curl --user dauser:dapassword https://deviceatlas.com/api/rest/v1/data/property/browserName/values
 
 

Supported Endpoints

Endpoint HTTP method Description
/data/property/{property}/values GET

Returns lists of predefined property values. The following property names should be substituted for {property} in the endpoint path.

  • browserName
  • browserRenderingEngine
  • osName
  • primaryHardwareType
/api/rest/v1/data/webusage/{property}/report GET

Returns lists of Operating system or Browser names and their top popular versions. The following property names should be substituted for {property} in the endpoint path.

  • osVersion
  • browserVersion
 
 

Authentication

The DeviceAtlas REST API uses HTTP Basic authentication over SSL. Please provide the username and password you would normally login to DeviceAtlas when using the REST API.

 

Response codes

The REST API returns JSON data with the following response codes:

Code Description
200 OK Returned on success. The response contains an entity corresponding to the requested resource. 
400 BAD REQUEST Returned if the caller submits a badly formed request. For example, the caller can receive this return if you forget a required parameter.
401 UNAUTHORIZED Returned if the call requires authentication and either the credentials provided failed or no credentials were provided.
403 FORBIDDEN Returned if the caller attempts to make a call or modify a resource for which the caller is not authorized.
404 NOT FOUND Returned if the specified resource does not exist.
 
 

Full example

Download all possible OS names used by devices in DeviceAtlas:

cURL example:

curl --user dauser:dapassword https://deviceatlas.com/api/rest/v1/data/property/osName/values

Output

[
 "Android",
 "Bada",
 "Firefox OS",
 "Linux",
 "Linux - Arch",
 "Linux - CentOS",
 "Linux - Debian",
 "Linux - Fedora",
 "Linux - Mint",
 "Linux - Red Hat",
 "Linux - Slackware",
 "Linux - Ubuntu",
 "Linux - openSUSE",
 "Mac OS",
 "OS X",
 "RIM",
 "Symbian",
 "Windows",
 "Windows 2000",
 "Windows 7",
 "Windows 8",
 "Windows Mobile",
 "Windows Phone",
 "Windows RT",
 "Windows Vista",
 "Windows XP",
 "iOS",
 "webOS"
]