# DeviceAtlas Device API Upgrade #
This document is intended for users of the 2.x APIs to assist in upgrading.
It has four main sections:
1. Why upgrade?
2. Upgrading from 2.x to 3.2
3. Data differences
4. Running comparison tests
## 1. Why upgrade? ##
Version 3.2 of the API has reduced memory and
improved identification capabilities including full support for Client Hints.
## 2. Upgrading From 2.x To 3.2 ##
The upgrade from the 2.x API to the 3.2 API is straightforward with minimal
code changes required.
The 3.2 API uses a new improved data file format. Data files in use with
the 2.x API are not compatible.
### API Changes ###
API changes between 2.x and 3.2 APIs are as follows:
#### Change 1 - Package Naming, Path and Namespace ####
Only Python version 3.6+ is supported for DeviceAtlas Enterprise Python 3.2 ;
#### Change 2 - Package Naming, Path and Namespace ####
The package name has changed from `mobi.mtld.*` to `com.deviceatlas.*`.
Package Path has been updated from /Api/ to /API/ (for pip installs)
before (v2):
```
deviceatlas-enterprise-python-2.x.x/Api/deviceatlas-enterprise-2.x.x.zip
deviceatlas-enterprise-python-2.x.x/Api/deviceatlas_enterprise-2.x.x-py2.py3-none-any.whl
```
after (v3):
```
deviceatlas-enterprise-python-3.2/Api/deviceatlas-enterprise-3.2.zip
deviceatlas-enterprise-python-3.2/Api/deviceatlas_enterprise-3.2-py3-none-any.whl
```
#### Change 3 - Config Options ####
The following config options have been removed:
* `set_include_match_info(...)` / `get_include_match_info()`
* `set_include_ua_props(...)` / `get_include_ua_props()`
* `set_return_none_when_no_properties(...)` / `get_return_none_when_no_properties()`
* `set_include_lang_props(...)` / `get_include_lang_props()`
The following variable access has been replaced to a function:
* from `device_api.api_version` to `device_api.get_api_version()`
The language and languageLocale properties are no longer configurable via the
Device API config, instead they are configured via "Data File Options" page
on the DeviceAtlas account.
## 3. Data Differences ##
The 3.2 API contains some data differences when compared
to the 2.x APIs.
#### Chrome Mobile ####
The `Chrome Mobile` browser name has been changed to `Chrome` to be consistent
with Google's naming policy.
#### macOS & iOS osVersion ####
The 2.x API returns the osVersion for macOS and iOS User-Agents in the form it
is found in the User-Agent. For these User-Agents, it appears like `10_5_7`. For
consistency with other version numbers, the 3.2 API converts
the osVersion to have dot-notation so the example `10_5_7` becomes `10.5.7`.
#### Browser Vendor & Model ####
In the 2.x API some desktop browsers set the device vendor and model to be the
browser vendor and browser name if no device was identified. The 3.2 API no
longer has this behaviour. Please use the `browserVendor` and `browserName`
properties instead.
#### Android Browser ####
The 2.x API incorrectly returned the browser name `Android Browser` for some
app WebView and Set Top box User-Agents. This has been corrected in the 3.2
API. The API returns `Chrome` instead
The 2.x API incorrectly returned the browser name `Android Browser` for some
Amazon devices running the Silk browser. This has been corrected in the 3.2
API. The API returns `Amazon Silk` instead
#### HuaweiBrowser ####
The Huawei browser naming has changed from `HuaweiBrowser` to `Huawei Browser`.
#### macOS ####
The osName for the macOS family of operating systems has been updated to better
reflect the correct naming for each version of macOS. The names `Mac OS X`,
`OS X` and `macOS` will be returned depending on what osVersion is detected.
#### Linux ####
The osVersionName for Linux distros is not currently well populated and will
improve over time.
#### isApp / appName ####
The current version of the data provided with the API has limited support for
isApp and appName. Subsequent releases will correct this.
#### Other Properties ####
The 3.2 API has improved support for non-standard User-Agents.
Differences may be observed compared to the 2.x APIs.
## 4. Running Comparison Tests ##
If a comparison between the 2.x API and the 3.2 API is being performed. It
is recommended to compare some key properties such as:
* id
* vendor
* model
* primaryHardwareType
* osName
* browserName
## Support ##
Please get in touch if you have any questions about the data or the 3.2 API by
using the support email address:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_ Copyright (c) DeviceAtlas Limited 2023. All Rights Reserved. _
_ https://deviceatlas.com _