Backend API Rules
The following are styles and guidelines when designing an API in HelixByte
totalCount
Always include totalCount when doing a GET request which returns an array. This is important for pagination in web, and include the result in data param;
return {
data: [
{
// The data goes in here, at array format
}
],
totalCount: 123 // The total count of the data is returning
}
Your query should return paginated results, but do include totalCount for each query made. This may be irrelevant for mobile side. Common practise in mobile would be leraging infinite scrolling experience.