Pagination, Filtering and Sorting
Pagination
All top-level API resources have support for bulk fetches via "list" API methods. For instance, you can list jobs, trainings, and datasets. These list API methods share a common structure, taking at least these two parameters: limit
and offset
as GET parameters.
Attributes
Name | Type | Description |
---|---|---|
total | number | The total number of the result |
offset | number | The index of the first object in the list to be returned, starting with 0 |
limit | number | A limit on the number of objects to be returned |
next | string | The URL for accessing the next page |
prev | string | The URL for accessing the previous page |
data | List of Core Resources | The actual objects like jobs, trainings, datasets, ... |
Example
Requesting the /datasets
endpoint returns a list of Dataset objects.
The number of objects per page is set to 5 by the limit
GET parameter.
Request URL: https://api.deepva.com/api/v1/datasets/?limit=5
{
"total": 14,
"offset": 0,
"limit": 5,
"next": "http://api.deepva.com/api/v1/datasets/?limit=5&offset=5",
"prev": "http://api.deepva.com/api/v1/datasets/?limit=5&offset=0",
"data": [
{
"id": "9538e44c-6f30-40b7-8d7c-73bda1d41a9e",
"name": "My Demo",
"description": "test of my demo",
"version": 1.0,
"type": "face",
"time_created": "2020-01-23 09:34:31.422000",
"time_updated": "2020-01-23 09:34:31.422000",
"number_of_classes": 17,
"number_of_active_classes": 17,
"number_of_images": 65,
"number_of_active_images": 65,
"preview_images": [
"storage://Dcy25Av7cZIGuKJQUJnh",
"storage://aAYCXvyABmpJ5YeP5qtW",
"storage://vwJH0qMP8ef7q8l5Qf4c"
],
"evaluation_result": {}
},
{
"id": "812ad5e6-5e65-4de4-a02a-0484072047b0",
"name": "Team",
"description": "This is the DeepVA team",
"version": 1.0,
"type": "face",
"time_created": "2020-02-20 17:54:06.854000",
"time_updated": "2020-02-20 17:54:06.854000",
"number_of_classes": 7,
"number_of_active_classes": 7,
"number_of_images": 4,
"number_of_active_images": 4,
"preview_images": [
"storage://JL5Uh6yZFxdRO7DEdnCY"
],
"evaluation_result": {}
},
{
"id": "f686439b-c38c-49c2-a572-8b2025bd7699",
"name": "Default",
"description": "This is a dataset",
"version": 1.0,
"type": "face",
"time_created": "2020-04-20 09:54:15.400000",
"time_updated": "2020-04-20 09:54:15.400000",
"number_of_classes": 4,
"number_of_active_classes": 4,
"number_of_images": 1,
"number_of_active_images": 1,
"preview_images": [
"storage://sOSNvCpOeojTZon87lR9"
],
"evaluation_result": {}
},
{
"id": "56c0fc6c-24fa-4322-80f6-f5a7ea0b85f1",
"name": "Local Politicians",
"description": "This is a dataset",
"version": 1.0,
"type": "face",
"time_created": "2020-04-20 09:54:42.248000",
"time_updated": "2020-04-20 09:54:42.248000",
"number_of_classes": 0,
"number_of_active_classes": 0,
"number_of_images": 0,
"number_of_active_images": 0,
"preview_images": [],
"evaluation_result": {}
},
{
"id": "54d05912-276a-4345-b27e-7b0bd9482e80",
"name": "Global Politicians",
"description": "This is a dataset",
"version": 1.0,
"type": "face",
"time_created": "2020-04-20 09:54:53.543000",
"time_updated": "2020-04-20 09:54:53.543000",
"number_of_classes": 1,
"number_of_active_classes": 1,
"number_of_images": 0,
"number_of_active_images": 0,
"preview_images": [],
"evaluation_result": {}
}
]
}
Filtering
Info
Coming soon
Sorting
Info
Coming soon