Skip to content

Dataset Rest API

Julien Louis edited this page Oct 1, 2020 · 3 revisions

[GET] datasets

Get a list of datasets

Request

The api [GET]datasets/datasets uses paging. A request has the following syntax :

datasets/datasets?page=2&size=20&sort=id,DESC

where

  • page is the number of the page we want to fetch
  • size is the size of a page, that means the number of items in each page
  • sort describe how the data will be sorted. It has two terms separated by a comma. ie : sort=id,DESC
    • 1st term : the property of an item on which the sorting is applied. In other words the "sort by ..."
    • 2nd term : ASC or DESC

Response

The Json response has this form :

content: [{creationDate: "2010-03-04", groupOfSubjectsId: null, id: 700,…},…]
number: 1
numberOfElements: 20
size: 20`
totalElements: 713
totalPages: 36

where

  • content contains the list of items
  • number is the current page number
  • numberOfElements is the number of items in this page (might be less than the size if on the last page)
  • size is the maximum number of items in a page (the page size)
  • totalElements is the total amount of items that you can access in the database
  • totalPages is the number of pages given this page size (totalElements / size)
Clone this wiki locally