General Response#
All responses have common properties at the first level of the returned object;Note that the data value depends on the enpoint invoked.Say you're fetching users;
initially, your request URI looks this way;
https://baseApi/users/?pageSize=4
then, its response could contain the pagination
attribute (as typed above);
{
"success": true,
"statusCode": 200,
"data": [
"...",
{
"id": "some-last-user-id",
"email": "hiseous@gmail.com",
"displayName": "Hiseous",
"verified": true
}
],
"pagination": {
"lastEvaluatedKey": {
"id": "some-last-user-id",
"dateCreated": "2024-10-24 07:46:30.725Z"
}
}
}
on the next call, you grab the lastEvaluatedKey
value;
stringify it;
and pass as a param on the next call, this way, your next request URI looks like this;
https://baseApi/users/?pageSize=4&lastEvaluatedKey={"id":"some-last-user-id","dateFollowed":"2024-10-24 07:46:30.725Z"}
then, the next response may contain the pagination
attribute;
{
"success": true,
"statusCode": 200,
"data": [
"...",
{
"id": "some-another-last-user-id",
"email": "hissy-baby@gmail.com",
"displayName": "Hiseous",
"verified": true
}
],
"pagination": {
"lastEvaluatedKey": {
"id": "some-another-last-user-id",
"dateCreated": "2025-10-24 07:46:30.725Z"
}
}
}
You should not modify the lastEvaluatedKey
, by the way.
If the response doesn't contain pagination
, then it implies the last items were fetched.Sending Tokens#
When it's necessary to send an access token, use the headers or set into a cookie with this key sqabl-cookie-key
, whose value is a JSON-strigified object, which then becomes a string.Compare the following JavaScript instances;Cookie Example#
After setting your cookie, it should look this way:Modified at 2024-11-07 14:54:47