I have a Rails application that also has an API. I am trying to follow http://jsonapi.org for a general structure, but I cannot find any recommendations as to when this will happen, without any data. For example, I have an endpoint that looks like this:
https://[root]/api/apps/34/localized_strings?from_date=1330776000
Where from_dateis the unix timestamp, if the server has been updated or new data based on this date value, I return all the data, there are no updates, I do not want to return the data. And I am wondering what is the best way to do this. The current result is as follows:
{
"data": []
}
Would it be better or more conditional on the basis of http://jsonapi.org to return the status "status" instead: 204in cases where there are no changes or data?
source
share