General Information About 51Degrees Cloud API
51Degrees cloud implements the RESTful API and can easily be adopted for use with any technology that is capable of working with JSON objects. This page contains the general information and description. For implementation and examples please see the individual API documentation pages: .NET , Java and PHP .
Unlike our on-premise device detection solution, the cloud API requires you to supply your licence key with each request. Not supplying the key will result in an Error message response from the server. Our unpaid cloud option also requires the licence key. Licence keys will be emailed to you once you complete the check-out process in our store. To protect your licence key and your Data, we only accept requests via SSL.
The cloud API has similar functionality as our on-premise solution. The following list contains functionality and descriptions:
- Match : takes in a user agent string and returns the profile id and a list of values.
- Profile : takes in a profile id and returns a profile object.
- Profile values : takes in the profile id and returns a list of all values mapped to profile.
- Values : takes in a property name and returns all values associated with that property. If no property names supplied returns a full list of values.
- Value : returns a specific value.
- Properties : takes in component and returns all properties associated with that component. If no component specified, returns all properties.
- Property : takes in a property name and returns property object.
- Components : returns all components in the dataset.
- Component : returns component with given name.
- Published date : returns date that dataset was published on.
- Dataset name : returns name of the dataset i.e. Basic or Premium.
- Next update date : returns the date the current data file will be updated.
Server response codes
Since cloud is different from our on-premise solution in that it makes use of a network, it is important to take server responses in-to account to avoid breaking the local implementation.
|Server Response Code||Description|
|200||The request was successful and you can proceed with retrieving data from the JSON object.|
|403||The licence key you are trying to use is not valid.|
|404||There was an error processing your request. You have either requested the incorrect URL, i.e. you requested the device with profile id -1. Or the entity (Device Profile, Values, Properties etc...) with selected parameters was not found. Please refer to the documentation for more information.|
|500||Unlikely to ever occur, it means there was an unspecified server error. If you encounter a 500 error please contact us .|