Version 8.3.8

Back | 

WsAnalyticsJob

URL

de.piksel.tech/services/index.php?&mode=json
Use "request" param as post variable for submitting json/xml request payload for all POST requests.

Request Headers

Name

Parameters

  • assetType => type of the media vod/live
    filterid=>array of values expected back in the report sessions/plays/viewTimeAvg/playTimeAvg
    groupby=>grouping the report based on the array of parameters. Grouping is 'and' based. Possible values yy,dd,mm,hh,project_uuid,program_uuid,event_uuid,assetid,DEVICETYPE,DEVICE,country,COUNTRY_EN,SUBDIVISION,SUBDIVISION_EN. Only include the group by entities whch are required to limit processing time to generate report
    start=>start date for report
    end=>end date for report
    project_uuid=>project uuid for given project. Only to be used with assetType vod
    program_uuid=>Program uuid. Only to be used with assetType vod
    event_uuid=>live event uuid. Only to be used with assetType live
    assetid=>Assetid of the give asset. Only to be used with assetType vod

    NOTE: group by filters should be of same type. Example {DEVICE,DEVICETYPE}; {SUBDIVISION,SUBDIVISION_EN}; {country,COUNTRY_EN}; {yy,mm,dd,hh} can be combined in same request. program_uuid,event_uuid.asset_uuid,project_uuid should not be used in groupby if corresponding filter is already set in the request. Example groupby program_uuid is not allowed if program_uuid is set in the request.

Request

Creates a new analytics job

Request format

{
  "request": {
    "authentication": {
      "app_token": "7cd207c2-6808-11e3-b865-22000a8a28ea",
      "client_token": "d4c1b92c0acb102ba3e10015c5f061d1",
      "user_token": "f277cb9d46e45f67f44de949cdde110f"
    },
    "header": {
      "header_version": 1,
      "api_version": "5",
      "no_cache": true
    },
    "WsAnalyticsJob": {
      "assetType": "vod\/live",
      "filterid": [
        "sessions",
        "plays"
      ],
      "groupby": [
        "asset_uuid\/project_uuid\/program_uuid",
        "DEVICETYPE",
        "DEVICE",
        "yy",
        "mm",
        "dd",
        "hh",
        "country",
        "COUNTRY_EN",
        "SUBDIVISION",
        "SUBDIVISION_EN"
      ],
      "assetid": "assetid",
      "project_uuid": "project uuid",
      "program_uuid": "program uuid",
      "start": "2014-03-02",
      "end": "2016-03-03"
    }
  }
}

Test Example

{ "request": { "authentication": { "app_token": "#app_token#", "client_token": "#client_token#", "user_token": "#user_token#" }, "header": { "header_version": 1, "api_version": "5", "no_cache": true }, "WsAnalyticsJob": { "assetType": "vod", "filterid": [ "sessions", "plays" ], "groupby": [ "project_uuid", "yy", "mm", "dd", "hh" ], "assetid": "assetid", "project_uuid": "project uuid", "program_uuid": "program uuid", "start": "2014-03-02", "end": "2016-03-03" } } }

Response

Response format

{
  "response": {
    "success": {
      "code": 1271,
      "message": "Analytics job created",
      "details": ""
    },
    "WsAnalyticsJob": {
      "assetType": "vod",
      "filterid": [
        "sessions",
        "plays"
      ],
      "groupby": [
        "project_uuid",
        "yy",
        "mm",
        "dd",
        "hh"
      ],
      "assetid": "assetid",
      "project_uuid": "project uuid",
      "program_uuid": "program uuid",
      "start": "2014-03-02",
      "end": "2016-03-03",
      "jobid": "1234"
    }
  }
}