Introduction
The Extract API provides mechanisms to export rows from Custom Tables utilising filters.
Extract Resources
Custom Tables
Use the Custom Tables Extract resource to execute a request that returns paginated results for the provided table name and filters. If all results not returned initially, indicators provided will assist in retrieving the next page.
GET /extract/v1/custom-tables/{customTableDatabaseName}
Utilise this endpoint to extract filtered rows from the selected Custom Table. Filters are optional and consist of query parameter key / value pairs, i.e. {tableFieldName}={expectedValue}. Multiple filters can be provided and will be considered strictly as AND operations. Results are paginated.
Responses are JSON (application/json).
Related Resources
Custom Tables |
Request
$ curl 'https://gateway-domain.performio.co/gateway/extract/v1/custom-tables/test_table_name?field1=value1.1&field2=value1.2' -i -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer e9036e38-d67e-11e8-9f8b-f2801f1b9fd1'
Headers
Name | Description |
---|---|
|
OAuth 2.0 authentication token |
Path Parameters
Parameter | Description |
---|---|
|
String representing the database name of the Custom Table to extract. |
Request Parameters
Parameter | Description |
---|---|
|
(Optional) String representing the database name of the Custom Table Field to compare for filtering, may be multiple provided. |
|
(Optional) Number representing the page to retrieve. Pages start from 0. |
|
(Optional) Number representing the records per page count. Default page size is 20 and the maximum is 2000. |
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 221
{
"results" : [ {
"field1" : "value1.1",
"field2" : "value1.2",
"field3" : "value1.3",
"field4" : "value1.4"
} ],
"page" : {
"totalPages" : 1,
"totalElements" : 1,
"hasNext" : false
}
}
Path | Type | Description |
---|---|---|
|
|
Array of results. |
|
|
Object representing result pagination. |
|
|
Number representing the total pages at current page size. |
|
|
Number representing the total possible elements for the request. |
|
|
Boolean representing if there is a next page of results. |
Error Conditions
|
|
Custom Table cannot be found for the provided Custom Table database name. |
|
Provided filter fields do not belong to the expected Custom Table. |
|
Unrecoverable internal server error during extract. |
|