Get a Media Timeline Report
GET https://restapi.actonsoftware.com/api/1/media/{id}/report/timeline
This endpoint will return a report for a media object with dates of actions.
Parameters
Name | Parameter Type |
Allow Multiple |
Required/ Optional |
Data Type | Description |
---|---|---|---|---|---|
Authorization: | Header | False | Required | String | Insert your generated access token. ("Bearer {access token}") |
id | Path | False | Required | String | Specify the ID of the media object. |
Response
[ { "date": "09/30/2019", "unique": 1, "total": 1, "known": 0, "unknown": 1 }, { "date": "10/07/2019", "unique": 2, "total": 2, "known": 2, "unknown": 0 } ]
Code Examples
curl -X GET https://restapi.actonsoftware.com/api/1/media/u-48aaa2da-1381-4e4d-b942-e6c1b71b73bf/report/timeline -H "Authorization: Bearer 12345678-9abc-defg-hijk-lmnopqrs"
package content; import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.JsonNode; import com.mashape.unirest.http.Unirest; import com.mashape.unirest.http.exceptions.UnirestException; import org.json.JSONObject; import util.Utility; public class GetMediaReportTimeline { static String BASE_URL = "https://restapi.actonsoftware.com/api/1/"; public static void main(String[] args) { getMediaReportTimelineById(); } public static void getMediaReportTimelineById() { try { String accessToken = Utility.getAccessToken(); String id = ""; Unirest.setHttpClient(Utility.makeClient()); Unirest.setDefaultHeader("Authorization", "Bearer " + accessToken); HttpResponse jsonResponse = Unirest.get(BASE_URL+"media/"+id+"/report/timeline") .header("accept", "application/json") .asString(); if(jsonResponse.getCode()==200){ String jsonResponseBody = jsonResponse.getBody(); System.out.println("The response body is : "+jsonResponseBody ); }else { System.out.println("The response is : "+ jsonResponse.getBody()); } } catch (UnirestException e) { e.printStackTrace(); } } }