platforms

This helper method will return the ids and names of the different platforms (devices) in Adbeat's database.

Adbeat tracks ads being shown to users on many different types of devices like: desktop computers, iPad tablets, and even Android smartphones. In Adbeat we call these devices "platforms". By using the platform parameter in API methods that support it, you can narrow your results to see just the ads being shown on a specific platform.

Note: IDs returned by this method are subject to change at any time. So it's best not to "hardcode" these IDs into your applications.
Request Cost: 1 unit, Result Cost: none

URL Format

http://api.adbeat.com/v3/{api-key}/platforms
http://api.adbeat.com/v3/{api-key}/platforms/{platformId}

Parameters

Parameter Name Meaning Default Value Notes
platformId filter (no filtering) Returns results for this specific platform.

Return Fields

Field Name Example Notes
platformId androidtablet ID used for other API requests. The platformId mobile can be used to specify all mobile devices (i.e. android, iphone, ipad, androidtablet) in both adMetrics and advertiserMetrics
platformName Android Tablet User-friendly name for display in UI.
apiUnits 1 The number of API units consumed by this request.

Usage Example(s)

To get a list of all platforms do this:

http://api.adbeat.com/v3/{api-key}/platforms

JSON Response

{
    "statusCode": 200,
    "numHits": 6,
    "hits": [{
        "platformName": "Desktop",
        "platformId": "desktop"
    }, {
        "platformName": "iPhone",
        "platformId": "iPhone"
    }, {
        "platformName": "Android",
        "platformId": "android"
    }, {
        "platformName": "iPad",
        "platformId": "iPad"
    }, {
        "platformName": "Android Tablet",
        "platformId": "androidTablet"
    }, {
        "platformName": "Mobile",
        "platformId": "mobile"
    }],
    "apiUnits": 1,
    "statusMsg": "successful platforms request",
    "requestParameters": {},
    "handler": "platforms"
}

You can also get the name of a specific platform by passing the platformId like this:

http://api.adbeat.com/v3/{api-key}/platforms/androidtablet

JSON Response

{
    "statusCode": 200,
    "numHits": 1,
    "hits": [{
        "platformName": "Android Tablet",
        "platformId": "androidTablet"
    }],
    "apiUnits": 1,
    "statusMsg": "successful platforms/androidtablet request",
    "requestParameters": {
        "platformId": "androidtablet"
    },
    "handler": "platforms"
}