WIP: Pagination implemented #5
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "refs/pull/5/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Examples of API calls
Response structure
Structure of the API response is presented below. In general API response for both endpoints - is a page, which contains documents acquired through querying Elasticsearch and metadata, which provides additional information about current page.
Property 'data' holds an array of documents, returned from the Elasticsearch.
Property 'meta' holds an object of metadata for the page.
/papers/{uuid}
This example demonstrates the case of addressing the /papers/{uuid} endpoint.
Request
Response
As you can see - when /papers/{uuid} endpoint is accessed - the result is a page, containing only 1 element and metadata.
/papers/search?
List of query parameters:
query (Mandatory, string)
page (Optional, number)
limit (Optional, number)
order (Optional, string, "asc"/"desc")
Example, provided below demonstrates the case of addressing the /papers/search? endpoint.
Request
Response
Here - the 'data' property holds 3 elements (limit per page is specified in the appropriate query parameter). This limit is also present in 'meta' property, as 'pagesize'.
Pull request closed