API: enumerating

Error

Error updating site page. We've logged the issue, please try again later.

You can enumerate the set of entities available at an endpoint by issuing repeated requests to the endpoint:

On each request you specify:

Skip: the number of entities you want to skip, since the start of the set

Take: the number of entities to return (maximum 100 per request)

The default value of skip is 0 (zero).

Example

For example, to request the first 10 tags in the set:

https://www.careopinion.ca/api/v2/tags?take=10

And to request the next 5 tags after that:

https://www.careopinion.ca/api/v2/tags?skip=10&take=5

For healthservices, tags and treatment functions the ordering of entities is fixed.

For opinions and responses, additional options are available.

Enumerating opinions and responses

Opinions are responses are returned in order of publication date, oldest first.

You can use skip and take as described above.

For opinions and responses you may wish to explicitly set ordering to oldest first or to newest first. To do so, use the DateOfPublicationOrder parameter:

DateOfPublicationOrder: set the sort order for opinions/responses to Ascending or Descending

You may also wish to enumerate only "new posts" published after a known instant in time. To do so, use the PublishedAfter parameter:

PublishedAfter: filter the set of returned posts to only those with a publication date after the given date/time instant.

Date/time instants should be provided in ISO 8601 format.

Example

For example, to request only responses published after 15 January 2016, in explicit order of publication (oldest first):

https://www.careopinion.ca/api/v2/responses?publishedafter=2016-01-15&dateofpublicationorder=ascending


;