Sign up below to view device data and get your trial account.

We communicate via email to process your request in line with our privacy policy. Please check the box to give us your permission to do this.

Cancel

Resources

Enterprise API examples

Resources

Various examples are included in all Enterprise API packages to clearly demonstrate the API features, usage and some use cases. These examples are very simple and are heavily commented.

Basic Usage

Includes six examples. Three simple command line examples which use DeviceApi to detect and get properties from header sets and client-side component. These examples show how the headers and client-side components help getting precise property values from Opera mini browsers and iPhone devices. Three simple web examples to be used in a servlet container. These examples use the DeviceAtlasWeb and the request object to automatically detect and get the properties for the request. Using custom API configs and the client-side-component is shown in these web examples.

Redirection

This web example uses the DeviceApiWeb to get properties for the current request and then uses some basic property values to decide which website provides the most suitable content for the device making the request.

Content Adaptation

This web example uses the DeviceApiWeb to get properties for the device making the current request and then uses some basic property values to choose a suitable template to wrap around the content.

Analytics

This web example uses the DeviceApi to get properties for user-agents from a given list. Some properties such as vendor, browser name and device type are aggregated and the results are displayed as graphs and numbers.

Content Targeting

This example uses the DeviceApiWeb to detect the device and use some of its properties to show certain advertisements and download links which may be related or of interest to the user, considering his/her device. This is a web example.

Note that in the web examples which use the DeviceApiWeb, the client side properties are taken into account automatically by the API if the cookie exists on the browser. This means if the cookie already exists within your browser you will still see the client side properties in a getProperties call which has not included the DeviceAtlas client side component. You can delete the cookie manually to see the differences between the results from examples which use the client side component and those that don't.

Demand Side Platform (DSP) CLI Java example

Demand Side Platform (DSP) CLI example of how the OpenRTB SUA object (OpenRTB 2.6 specification SUA (Structured User Agent)) can be read and parsed to standard HTTP header format.

Supply Side Platform (SSP) Javascript example

Supply Side Platform (SSP) example of how Javascript userAgentData can be parsed to the OpenRTB SUA object according to the OpenRTB 2.6 specification SUA (Structured User Agent).

Supply Side Platform (SSP) CLI Java example

CLI example of how HTTP headers can be parsed to the OpenRTB SUA object according to the OpenRTB 2.6 specification SUA (Structured User Agent).