Resources

Device Data (JSON)

Resources

For the Enterprise solution, device data is packaged in a JSON format, which is highly compressed to reduce server footprint, and optimized for speed of search and retrieval. It can either be downloaded manually or fetched with an automated script.

In the Cloud service, data is delivered on demand for the specific device headers submitted via the Client API. See the Getting Started guide for Cloud.

Download frequency

The device data is updated daily, and we recommend that you update the data file on a regular basis to ensure you have the most up-to-date device data.

Data file types

The device data file comes in three forms:

Personal

This is the primary data file and is configurable in multiple ways:

  • It contains any device data entries made through the device pages when logged into your account. This enables you to modify the specifications of a device just for your account;
  • It contains the set of properties you specify at Data File Options (My Account / Data File Options). This enables fine-grained control over the footprint and performance of the deployment.
  • Inclusion of desktop properties can be enabled or disabled according to the use case.

For customizing your personal JSON file, please see the Data File Configuration page.

Community

Contains all of the base data and is compatible with APIs v1.4 and above. This option is deprecated.

Private

This option contains the base data, personal data and any private data that you have added to your account. Private data is an optional extra with the Enterprise License and allows you to specify your own User-Agents and properties. In addition, any options set on your Data File Options page will affect this file. An example use case is to add pre-release devices in a secure way, with no exposure of the data to any other party.

Content of data file

You can manage the content of the data file to optimise performance.

By default, the evaluation data file contains a limited property set, but these can be extended via Data File Options (My Account / Data File Options). Please note that adding properties will increase the footprint and will affect performance. Any changes made will take effect in the next data file download.

Automatic downloads

It is strongly recommended to setup a regular automated data download. The data file can be downloaded from this simple download page by passing the correct parameters in the URL. Either HTTP or HTTPs can be used to fetch the device data.

URL: https://deviceatlas.com/getJSON.php

Download parameters

The download request must use the following parameters:

licencekey=YOUR_LICENCE_KEY

License key for your account.

format=[zip|gzip]

Compression format.

data=[my|priv]

Optional parameter. JSON type to download, defaults to personal "my".

md5=[1|0]

Optional parameter. Set to "1" to download the MD5 file for the JSON.

date=yyyy-mm-dd

Optional parameter. Specify to download a previously generated data file.

index=[web(,app)|app(,web)]

Optional parameter. Data indexing method, being "web" to index by User-Agent, "app" to index by device vendor-model name.

Examples

Download the latest data file in zip format:
https://deviceatlas.com/getJSON.php?licencekey=LICENCE_KEY&format=zip

Download the MD5 checksum file for the latest data file:
https://deviceatlas.com/getJSON.php?licencekey=LICENCE_KEY&format=zip&md5=1

Download a past data file:
https://deviceatlas.com/getJSON.php?licencekey=LICENCE_KEY&format=zip&date=2011-08-09

Sample shell script

A sample shell script to download the latest data file and verify it with the MD5 file can be found here: deviceatlas_auto_download.sh

Download verification

Verification of a downloaded data file is very important to ensure the whole file was received and it is not corrupted. Setting the MD5 parameter to "1" will download a text file containing the MD5 hash of the main data file which can then be compared against the full data file.

Downloading past files

Past data files can be requested by setting the date parameter. If a personal data file is requested for a particular date, it is required that you have already downloaded that file in the past. Community data files do not have this restriction.

Installing the data file

Once the data file is downloaded the DeviceAtlas API needs to be told to reload it. This is a simple process and can be done as follows, typically taking a fraction of a second. Device recognition is not affected during a data file reload.

Examples

Java:  deviceApi.loadDataFromFile("/path/to/DeviceAtlas.json");

.NET:  deviceApi.LoadDataFromFile("/path/to/DeviceAtlas.json");

PHP:  $deviceApi->loadDataFromFile("/path/to/DeviceAtlas.json");

Take a look at the documentation specific to your API for further details.

Create amazing web presences on any screen
goMobi

Learn everything about mobile web technology
mobiForge

Evaluate your websites’ mobile readiness
mobiReady

© 2017 Afilias Technologies Ltd (dotMobi). All rights reserved.

This is a website of Afilias Technologies Ltd, a private company limited by shares, incorporated and registered in the Republic of Ireland with registered number 398040 and registered office at 6th Floor, 2 Grand Canal Square, Dublin 2, Ireland

IAB Certified Member