cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1420
Views
0
Helpful
5
Replies

Mediasense API: getSessions

zeroone555
Level 1
Level 1

Hello everyone,

I try to call Mediasense API: getSessions with pageParameter like

{"requestParameters":[{"fieldName":"sessionStartDate","fieldConditions":[{"fieldOperator":"between","fieldValues":["1449162000000","1449334800000"]}],"paramConnector":"AND"},{"fieldName":"sessionState","fieldConditions":[{"fieldOperator":"equals","fieldValues":["CLOSED_NORMAL"]}]}],"pageParameters":[{"offset":0,"limit":1000}]}

It's working but maximum result is 100 on every time, not is 1000 like limit (The correct result is 378). What's happen?

Thank you for help

Trinnachart

1 Accepted Solution

Accepted Solutions

imandal
Level 1
Level 1

Hi Trinnachart,

Thanks for reaching out to MediaSense team for your query.

Please remove the square brackets from around the "pageParameters" values like given below (text in bold) and check the output:-

{

  "requestParameters": [{

  "fieldName": "sessionStartDate",

  "fieldConditions": [{

  "fieldOperator": "between",

  "fieldValues": ["1449162000000", "1449334800000"]

  }],

  "paramConnector": "AND"

  }, {

  "fieldName": "sessionState",

  "fieldConditions": [{

  "fieldOperator": "equals",

  "fieldValues": ["CLOSED_NORMAL"]

  }]

  }],

  "pageParameters": {

  "offset": 0,

  "limit": 1000

  }

}

We have tested with the above syntax in our lab and it is returning 1000 results successfully.

Please do let us know the outcome and feel free to revert in case of any other clarification required.

Thanks & Regards

Ivan Mandal

MediaSense DE

View solution in original post

5 Replies 5

imandal
Level 1
Level 1

Hi Trinnachart,

Thanks for reaching out to MediaSense team for your query.

Please remove the square brackets from around the "pageParameters" values like given below (text in bold) and check the output:-

{

  "requestParameters": [{

  "fieldName": "sessionStartDate",

  "fieldConditions": [{

  "fieldOperator": "between",

  "fieldValues": ["1449162000000", "1449334800000"]

  }],

  "paramConnector": "AND"

  }, {

  "fieldName": "sessionState",

  "fieldConditions": [{

  "fieldOperator": "equals",

  "fieldValues": ["CLOSED_NORMAL"]

  }]

  }],

  "pageParameters": {

  "offset": 0,

  "limit": 1000

  }

}

We have tested with the above syntax in our lab and it is returning 1000 results successfully.

Please do let us know the outcome and feel free to revert in case of any other clarification required.

Thanks & Regards

Ivan Mandal

MediaSense DE

Hi Ivan Mandal,

Thank you for your answer, I removed

"pageParameters": {

  "offset": 0,

  "limit": 1000

  }

from my query, and run but it's returning only 100 results successfully.

I don't know why?

Thank you

Trinnachart

No no... just remove the square brackets from around the values... not the entire parameter itself.

The text in bold shows the parameter values without the square brackets.

Please use the entire query mentioned in my last reply, and let us know the outcome.

Thanks

Ivan

Thank you Ivan, it's working. It's returning more than 100 results successfully.


Thank you again

Trinnachart

Hi Trinnachart,


Glad to know that.

Thanks for confirming.


Thanks

Ivan

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: