Skip to content

[GET] Get Batch Paginated⚓︎

Use this request to get information about all the batches in your Organization (or a filtered subset), in a paginated format.

This request is optimized for high Batch counts and thus is ideal to create listing screens or gather large amounts of data.

Batch Paginated⚓︎

GET/api/v1.0/external/sdbatch/paginated?workspaceId=1&startDate=2023-08-07T08:55:29.7831583Z&endDate=2023-08-09T08:55:29.7831583Z&pageNumber=1&pageSize=10

Query Parameters⚓︎

NameTypeDescription
startDatedatetime (optional)Include batches created after this date.
endDatedatetime (optional)Include batches created before this date.
workspaceIdinteger (optional)The ID of the workspace to filter for. To filter with more than one workspaceId value, simply add another entry to the query string, i.e ?workspaceId=1&workspaceId=2 to filter on workspace ID 1 and 2.
sortstring (optional)name of property to sort result values. Sorts by createdOn by default.
pageNumberintegerThe page number to retrieve. Starts at 1 up to the number of total pages available.
pageSizeintegerThe number of items to retrieve per page. Defaults to 10 if not specified.

Batches will be returned within the "items" array.

Example Request⚓︎

curl --location 'https://cloud.smartdocumentor.net/api/v1.0/external/sdbatch/paginated?workspaceId=1&startDate=2023-08-07T08%3A55%3A29.7831583Z&endDate=2023-08-09T08%3A55%3A29.7831583Z&pageNumber=1&pageSize=10' \
--header 'Authorization: Bearer null' \
--header 'Content-Type: application/json'
var client = new HttpClient();

var request = new HttpRequestMessage(HttpMethod.Get, "https://cloud.smartdocumentor.net/api/v1.0/external/sdbatch/paginated?workspaceId=1&startDate=2023-08-07T08:55:29.7831583Z&endDate=2023-08-09T08:55:29.7831583Z&pageNumber=1&pageSize=10");
request.Headers.Add("Authorization", "Bearer null");

var content = new StringContent(string.Empty);
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
request.Content = content;

var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();

Console.WriteLine(await response.Content.ReadAsStringAsync());
import requests
import json

url = "https://cloud.smartdocumentor.net/api/v1.0/external/sdbatch/paginated?workspaceId=1&startDate=2023-08-07T08:55:29.7831583Z&endDate=2023-08-09T08:55:29.7831583Z&pageNumber=1&pageSize=10"

payload={}
headers = {
  'Authorization': 'Bearer null',
  'Content-Type': 'application/json'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer null");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://cloud.smartdocumentor.net/api/v1.0/external/sdbatch/paginated?workspaceId=1&startDate=2023-08-07T08:55:29.7831583Z&endDate=2023-08-09T08:55:29.7831583Z&pageNumber=1&pageSize=10", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Responses⚓︎

{
  "items": [
    {
      "batchId": 1,
      "workspaceId": 1,
      "displayName": "YourBatchName",
      "description": "AnOptionalDescriptionForYourBatch",
      "createdOn": "2023-08-08T08:55:29.7831583Z",
      "totalTasks": 0,
      "totalTasksInHistory": 0
    },
    {
      "batchId": 1,
      "workspaceId": 1,
      "displayName": "YourBatchName2",
      "description": "AnOptionalDescriptionForYourBatch2",
      "createdOn": "2023-08-08T08:56:29.7831583Z",
      "totalTasks": 0,
      "totalTasksInHistory": 0
    }
  ],
  "pageNumber": 1,
  "totalPages": 1,
  "totalCount": 2,
  "hasPreviousPage": false,
  "hasNextPage": false
}

Response Body GetBatchPaginatedResponse

NameTypeDescription
itemsGetBatchResponse[]the list of returned items for this request. Returns an empty list if no items were found.
pageNumberintegerThe page number retrieved.
totalPagesintegerThe total number of pages that the server can potentially retrieve, with the given filters, at the time the request was made.
totalCountintegerThe total count of items available for retrieval, with the given filters, at the time the request was made.
hasPreviousPagebooleantrue if the currently retrieved page has a previous page available, false otherwise.
hasNextPagebooleantrue if a next page exists after the currently retrieved page, false otherwise.

Response body has no content.

Info

Note Returned when a startDate or endDate are not specified.