New HTTP headers will be added shortly to the API

Skip to first unread message

Emanuil Tolev

Mar 11, 2016, 4:11:59 AM3/11/16
to doaj-api-announcements
HTTP headers of the following form will be added to all Discovery API responses from early next week:

1. Link headers for navigating the paged results:

Link: <>; rel=prev, <>; rel=last, <>; rel=next

Feel free to use these to "scroll" through results instead of having to generate the correct URLs. Hopefully this will make API clients a bit simpler to write and maintain. There are various tools depending on your programming language of choice which will make it very easy to use these. Here's an example of a popular Python HTTP client library's handling of these headers: .

2. Total results count:

X-Total-Count: 153

We have gone for an API with an envelope (metadata + results contained in the body of the response). Thus, you already have access to this information in the "total" key in the Discovery API responses. However, this header is used by a number of other API-s, so we're providing it for convenience and for those who are used to having it.

Let us know at!forum/doaj-public-api if this causes any problems for you. We don't expect that to be the case, hence the short notice on releasing this feature.

Cottage Labs on behalf of DOAJ
Reply all
Reply to author
0 new messages