List Documents
This request lists documents based on the entered parameter filters.
GET: <BaseURL>/api/v2/documents
Parameters
| Parameter | Description | Requirement | Supported Value | In | |
|---|---|---|---|---|---|
x-api-token
|
The API access_token generated for the Access Key | Required | String | Header | - |
resultsPerPage
|
Positive integer that indicates the number of results returned per page | Optional | Integer | Query | 100 |
pageNum
|
Positive integer that indicates the page number or index | Optional | Integer | Query | 100 |
orderBy
|
Attribute used for ordering the results
|
Optional | String | Query | label |
orderDir
|
Ordering results direction ascending or descending.
|
Optional | String | Query | asc |
type
|
Filter by template type
|
Optional | String | Query | - |
| templateUid | Filter by specific templates. Accepts UID or ID (i.e. tpl-101 or 101) | Optional | String | Query | - |
clientId
|
Filter by clientid | Optional | Integer | Query | - |
searchTxt
|
Search based on documents attributes | Optional | String | Query | - |
Request Format
cURL (basic)
curl --location --request GET '<BaseURL>/api/v2/documents/' \ --header 'x-access-token: <your_API_Access_Token>' }'
cURL (optional parameters)
curl --location --request GET '<BaseURL>/api/v2/documents?resultsPerPage=10&pageNum=1&orderBy& orderDir=desc&type=location&templateUid=101&clientID=101&searchTxt' \ --header 'x-access-token: <your_API_Access_Token>' }'
Program (basic)
| URL (GET) | |
|---|---|
| <BaseURL>/api/v2/documents | |
| Header Key | Header Value |
x-access-token
|
<your_API_Access_Token>
|
Program (optional parameters)
| URL (GET) | |
|---|---|
| <BaseURL>/api/v2/documents | |
| Header Key | Header Value |
x-access-token
|
<your_API_Access_Token>
|
| Params (Path Variables) | |
resultsPerPage
|
<positive Integer>
|
pageNum
|
<positive Integer>
|
orderBY
|
<asc or desc>
|
templateUID
|
<template UID or ID>
|
clientID
|
<client ID>
|
Response Format
{
"success": true,
"apiRequestUid": "string"
"results": [
{
"id": "string",
"name": "string",
}
]
}
Sample Response
{
"success": true,
"apiRequestUid": "101-101",
"results": [
{
"id": 101,
"organization_id": 101,
"label": "01ABC-DE-T101-W",
"description": "",
"client_id": 101,
"customId": "",
"templateId": 101,
"templateName": "Generic Asset",
"type": "asset"
}
],
"description": "json document with the templates K,V list, to populate a droplist"
}
