---
updatedAt: 2026-03-01T18:44:04.000Z
---

# Get Media Services Live Stream Packaging data

```curl cURL
cpcodes="12345,67890"
dimensions="1,2,3"
metrics="1,2,3"
endDate="2021-04-23T15:30Z"
startDate="2021-03-22T15:30Z"
offset="0"
limit="300"
filterParams="[{"type":"dimension","values":["GB"],"id":4,"condition":"in"},{"type":"metric","values":[16],"id":155,"condition":"gt"}]"
sortParams="[{"type":"metric", "order":"asc", "id":40}]"
streams="12345,67890"
aggregation="1440"

egcurl --eg-section default --request GET \

  --url "https://$hostname/media-reports/v1/media-services-live/rtmp-ingest/data?cpcodes=$cpcodes&dimensions=$dimensions&metrics=$metrics&endDate=$endDate&startDate=$startDate&offset=$offset&limit=$limit&filterParams=$filterParams&sortParams=$sortParams&streams=$streams&aggregation=$aggregation" \
  --header "Accept: application/json" \
```

```node Node
const EdgeGrid = require("akamai-edgegrid");
const os = require("os");
const edgercPath = os.homedir + "/.edgerc.txt";
const edgercSection = "default";  
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection
});   


eg.auth({
  path: `/media-reports/v1/media-services-live/rtmp-ingest/data`,
  method: "GET",
  headers: {
 

    "Accept": "application/json"},
  qs: {
    "cpcodes": "12345,67890",
    "dimensions": "1,2,3",
    "metrics": "1,2,3",
    "endDate": "2021-04-23T15:30Z",
    "startDate": "2021-03-22T15:30Z",
    "offset": "0",
    "limit": "300",
    "filterParams": "[{"type":"dimension","values":["GB"],"id":4,"condition":"in"},{"type":"metric","values":[16],"id":155,"condition":"gt"}]",
    "sortParams": "[{"type":"metric", "order":"asc", "id":40}]",
    "streams": "12345,67890",
    "aggregation": "1440"
}                    
});
eg.send(function(error, response, body) {
  console.log(body);    
});
```

```python Python
import requests
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urllib.parse import urljoin

edgerc = EdgeRc('~/.edgerc.txt')
section = 'default'
baseurl = 'https://%s' % edgerc.get(section, 'host')

session = requests.Session()
session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
 

path= '/media-reports/v1/media-services-live/rtmp-ingest/data'
headers = {
 

  "Accept": "application/json"} 
querystring = {
  "cpcodes": "12345,67890",
  "dimensions": "1,2,3",
  "metrics": "1,2,3",
  "endDate": "2021-04-23T15:30Z",
  "startDate": "2021-03-22T15:30Z",
  "offset": "0",
  "limit": "300",
  "filterParams": "[{"type":"dimension","values":["GB"],"id":4,"condition":"in"},{"type":"metric","values":[16],"id":155,"condition":"gt"}]",
  "sortParams": "[{"type":"metric", "order":"asc", "id":40}]",
  "streams": "12345,67890",
  "aggregation": "1440"
}  

result = session.get(urljoin(baseurl, path), headers=headers, params=querystring)
print(result.status_code)
print(result.json())
```

```json Response Example
{
  "rows": [
    [
      "1471737600",
      "158"
    ],
    [
      "1471737720",
      "138"
    ],
    [
      "1471737840",
      "183"
    ],
    [
      "1471737960",
      "158"
    ],
    [
      "1471738080",
      "163"
    ],
    [
      "1471738200",
      "155"
    ]
  ],
  "metaData": {
    "startTimeInEpoch": 1471737600,
    "offset": 0,
    "limit": 300,
    "timeZone": "GMT",
    "hasMoreData": true,
    "aggregation": 120,
    "endTimeInEpoch": 1471860000
  },
  "columns": [
    {
      "type": "dimension",
      "name": "Time",
      "description": "Indicates the consumption time of the content. This dimension is set automatically.",
      "index": 0
    },
    {
      "type": "metric",
      "name": "Hits",
      "description": "Total number of requests made to the entry point posting objects.",
      "index": 1,
      "aggregate": "46055"
    }
  ]
}
```

# Set up authorization

<!-- curl@13 -->
<!-- node@1-7 -->
<!-- python@1-10 -->

Before you can use this API, you need to [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials).

Then, you can use these code samples to apply the token values to your requests.

# Set dimensions and metrics

<!-- curl@2,3 -->
<!-- node@20,21 -->
<!-- python@20,21 -->

Specify the `dimensions` and `metrics` you want data for.

# Set a time range

<!-- curl@4,5 -->
<!-- node@22,23 -->
<!-- python@22,23 -->

Specify a `startDate` and `endDate` range of time you want data for.

# Form the URL

<!-- curl@15 -->
<!-- node@12-29 -->
<!-- python@13-29 -->

Inject the `dimensions`, `metrics`, `startDate`, and `endDate` values into the URL template string, and append [optional parameters](https://techdocs.akamai.com/media-services-rpts/reference/post-media-services-live-rtmp-ingest-data) as needed.

# Call the API

<!-- curl@0-100 -->
<!-- node@0-100 -->
<!-- python@0-100 -->

Call POST on the request URL.

# Review the response

<!-- curl@0 -->
<!-- node@0 -->
<!-- python@0 -->

The response object includes details on the data for the time period requested.