POST
/
unified
/
documents
/
files
/
search
curl --request POST \
  --url https://api.stackone.com/unified/documents/files/search \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'x-account-id: <x-account-id>' \
  --data '{
  "query": "test",
  "field": "name",
  "operation_type": {
    "value": "contains",
    "source_value": "contains"
  },
  "params": {
    "raw": true,
    "fields": "<string>",
    "filter": {
      "updated_after": "2020-01-01T00:00:00.000Z"
    },
    "page": "<string>",
    "page_size": "<string>",
    "next": "<string>",
    "updated_after": "2020-01-01T00:00:00.000Z"
  },
  "passthrough": {
    "other_known_names": "John Doe"
  }
}'
{
  "data": [
    {
      "id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
      "remote_id": "8187e5da-dc77-475e-9949-af0f1fa4e4e3",
      "name": "Information-Technology",
      "description": "This is the description associated to the file.",
      "size": 1024,
      "url": "https://drive.google.com/file/d/nd8932h9d/view",
      "file_format": {
        "value": "pdf",
        "source_value": "abc"
      },
      "path": "/path/to/file",
      "owner_id": "c28xyrc55866bvuv",
      "export_formats": [
        "application/pdf"
      ],
      "remote_owner_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
      "folder_id": "c28xyrc55866bvuv",
      "remote_folder_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
      "drive_id": "c28xyrc55866bvuv",
      "remote_drive_id": "e3cb75bf-aa84-466e-a6c1-b8322b257a48",
      "created_at": "2023-02-23T00:00:00.000Z",
      "updated_at": "2024-02-23T00:00:00.000Z"
    }
  ],
  "raw": [
    {
      "method": "<string>",
      "url": "<string>",
      "body": "<string>",
      "response": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Headers

x-account-id
string
required

The account identifier

Body

application/json
query
string
required

The query to search for

Example:

"test"

field
string | null

The specific field to search within. If not provided, the search will be performed across all searchable text fields

Example:

"name"

operation_type
object

The operation type to use for the query. If not provided, the default operation is contains.

params
object

The additional parameters of the query

passthrough
object | null

Value to pass through to the provider

Example:
{ "other_known_names": "John Doe" }

Response

200
application/json
The list of files matching the search query was retrieved.
data
object[]
required
raw
object[] | null