Maximum offset on the stream



Is there a way to fetch the maximum offset value available on the stream?

Submitted by iCIMSUNIFIL on June 08, 2020 Permalink

Just to add more details, there is an existing API (/customers/{customerId}/profiles/channels/stream/updates?offset=11190126) which gives the below response when the offset is not in valid range. So wanted to check if there is an API which gives the maxOffset upfront? If not, can one be added please?

{
"updates": [],
"error": [
"Requested offset is out of range"
],
"errorDetails": [
{
"maxOffset": 11480689,
"error": "OFFSET_OUT_OF_RANGE",
"minOffset": 11478055
}
]
}

Submitted by iCIMSUNIFIL on June 08, 2020 Permalink

Purposefully using this error is how you can provide yourself with the current max Offset on demand. Try using an Offset value that should almost always be
invalid such as “00”. There is no specific API currently to query for the max Offset; thank you for the feedback.