Skip to main content
POST
/
integration
/
query
Query integrations with filtering, sorting and pagination
curl --request POST \
  --url https://api.draftt.io/v1/integration/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filter": {
    "$and": "<array>",
    "$or": "<array>",
    "id": {
      "$eq": 123,
      "$ne": 123,
      "$gt": 123,
      "$gte": 123,
      "$lt": 123,
      "$lte": 123,
      "$in": [
        123
      ],
      "$nin": [
        123
      ],
      "$exists": true
    },
    "name": {
      "$eq": "<string>",
      "$ne": "<string>",
      "$gt": "<string>",
      "$gte": "<string>",
      "$lt": "<string>",
      "$lte": "<string>",
      "$like": "<string>",
      "$in": [
        "<string>"
      ],
      "$nin": [
        "<string>"
      ],
      "$exists": true
    },
    "type": {
      "$eq": "<string>",
      "$ne": "<string>",
      "$gt": "<string>",
      "$gte": "<string>",
      "$lt": "<string>",
      "$lte": "<string>",
      "$like": "<string>",
      "$in": [
        "<string>"
      ],
      "$nin": [
        "<string>"
      ],
      "$exists": true
    },
    "status": {
      "$eq": "<string>",
      "$ne": "<string>",
      "$gt": "<string>",
      "$gte": "<string>",
      "$lt": "<string>",
      "$lte": "<string>",
      "$like": "<string>",
      "$in": [
        "<string>"
      ],
      "$nin": [
        "<string>"
      ],
      "$exists": true
    },
    "createdAt": {
      "$eq": "<string>",
      "$ne": "<string>",
      "$gt": "<string>",
      "$gte": "<string>",
      "$lt": "<string>",
      "$lte": "<string>",
      "$like": "<string>",
      "$in": [
        "<string>"
      ],
      "$nin": [
        "<string>"
      ],
      "$exists": true
    },
    "updatedAt": {
      "$eq": "<string>",
      "$ne": "<string>",
      "$gt": "<string>",
      "$gte": "<string>",
      "$lt": "<string>",
      "$lte": "<string>",
      "$like": "<string>",
      "$in": [
        "<string>"
      ],
      "$nin": [
        "<string>"
      ],
      "$exists": true
    }
  },
  "select": [],
  "sort": {},
  "pageToken": "<string>",
  "pageSize": 100
}
'
{
  "nextPageToken": "eyJ1bmlxdWVGaWVsZE5hbWUiOiJpZCIsInNvcnQiOnsibmFtZSI6eyJkaXJlY3Rpb24iOiJhc2MifX19",
  "items": [
    {
      "id": "1",
      "name": "My AWS Integration",
      "type": "aws",
      "status": "healthy",
      "details": {
        "accountId": "123456789012"
      },
      "createdAt": "2024-12-01T12:00:00.000Z",
      "updatedAt": "2024-12-23T12:00:00.000Z"
    },
    "..."
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
filter
object
select
enum<string>[]

If empty - will return all fields, if passed will only return selected fields

Available options:
id,
name,
type,
status,
details,
createdAt,
updatedAt
sort
object

Optional sorting options, if not passed will sort by creation date in ascending order

pageToken
string

Base64 token for pagination

pageSize
integer
default:100

Number of items to return per page

Required range: 1 <= x <= 1000

Response

Success

items
object[]
required
nextPageToken
string | null

Token for fetching the next page of results