VirtuousAI
Reference

Files

List Files

GET
/api/v1/files

Query Parameters

q?|

Search by filename

status?|
visibility_scope?|
source?|
document_kind?|
attached?|
sort_by?string
Default"uploaded_at"
Value in"uploaded_at" | "updated_at" | "name"
order?string

Sort direction for pagination.

Default"desc"
Value in"asc" | "desc"
limit?integer
Default25
Range1 <= value <= 100
offset?integer
Default0
Range0 <= value

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files"
{
  "hasNext": true,
  "items": [
    {
      "contentType": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "createdBy": {
        "email": "string",
        "firstName": "string",
        "id": "string",
        "lastName": "string",
        "profilePictureUrl": "string"
      },
      "documentKind": "string",
      "fileSizeBytes": 0,
      "firstAttachedAt": "2019-08-24T14:15:22Z",
      "generatedFormat": "string",
      "hasBeenAttached": true,
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "imageFormat": "string",
      "imageHeight": 0,
      "imageWidth": 0,
      "name": "string",
      "pageCount": 0,
      "sheetCount": 0,
      "sheetNamesPreview": [
        "string"
      ],
      "sourceKind": "uploaded",
      "sourceSurface": "string",
      "sourceThreadId": "87a870cc-e803-45bf-bc61-7a64dda4b64a",
      "status": "uploaded",
      "textCharCount": 0,
      "textTruncated": true,
      "updatedAt": "2019-08-24T14:15:22Z",
      "uploadSourceSurface": "string",
      "uploadSourceThreadId": "3a26fc94-2bac-4772-94b1-7a7e45743a78",
      "visibilityScope": "private"
    }
  ],
  "limit": 0,
  "offset": 0,
  "total": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Upload File

POST
/api/v1/files

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

multipart/form-data

file*file
Formatbinary
publish?boolean
Defaulttrue
source_surface?|
source_thread_id?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/files" \  -F file="string"
{
  "contentType": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": {
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "profilePictureUrl": "string"
  },
  "documentKind": "string",
  "fileSizeBytes": 0,
  "firstAttachedAt": "2019-08-24T14:15:22Z",
  "generatedFormat": "string",
  "hasBeenAttached": true,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "imageFormat": "string",
  "imageHeight": 0,
  "imageWidth": 0,
  "name": "string",
  "pageCount": 0,
  "sheetCount": 0,
  "sheetNamesPreview": [
    "string"
  ],
  "sourceKind": "uploaded",
  "sourceSurface": "string",
  "sourceThreadId": "87a870cc-e803-45bf-bc61-7a64dda4b64a",
  "status": "uploaded",
  "textCharCount": 0,
  "textTruncated": true,
  "updatedAt": "2019-08-24T14:15:22Z",
  "uploadSourceSurface": "string",
  "uploadSourceThreadId": "3a26fc94-2bac-4772-94b1-7a7e45743a78",
  "visibilityScope": "private"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

List Synced Files

GET
/api/v1/files/synced

Query Parameters

q?|

Search by filename, path, sync, or connection

status?|
document_kind?|
sync_ids?array<>|

Filter synced files by sync IDs

connection_ids?array<>|

Filter synced files by connection IDs

sort_by?string
Default"last_seen_at"
Value in"last_seen_at" | "name"
order?string

Sort direction for pagination.

Default"desc"
Value in"asc" | "desc"
limit?integer
Default25
Range1 <= value <= 100
offset?integer
Default0
Range0 <= value

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/synced"
{
  "hasNext": true,
  "items": [
    {
      "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d",
      "connectionName": "string",
      "contentType": "string",
      "copiedAt": "2019-08-24T14:15:22Z",
      "documentKind": "string",
      "downloadAvailable": true,
      "fileSizeBytes": 0,
      "firstSeenAt": "2019-08-24T14:15:22Z",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "lastSeenAt": "2019-08-24T14:15:22Z",
      "latestVersionId": "750445c5-7ad9-40bd-a593-bb37d7d846db",
      "latestVersionStatus": "copying",
      "mimeType": "string",
      "missingSince": "2019-08-24T14:15:22Z",
      "sourceModifiedAt": "2019-08-24T14:15:22Z",
      "sourceName": "string",
      "sourceParent": "string",
      "sourcePath": "string",
      "status": "active",
      "syncId": "24d9ea7f-fdab-4f53-95fd-4deda2362964",
      "syncName": "string"
    }
  ],
  "limit": 0,
  "offset": 0,
  "total": 0
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Synced File

GET
/api/v1/files/synced/{synced_file_id}

Path Parameters

synced_file_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/synced/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "connectionId": "84b500d7-71c8-4b1f-adf4-f1eb0000973d",
  "connectionName": "string",
  "contentType": "string",
  "copiedAt": "2019-08-24T14:15:22Z",
  "documentKind": "string",
  "downloadAvailable": true,
  "fileSizeBytes": 0,
  "firstSeenAt": "2019-08-24T14:15:22Z",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "lastSeenAt": "2019-08-24T14:15:22Z",
  "latestVersionId": "750445c5-7ad9-40bd-a593-bb37d7d846db",
  "latestVersionStatus": "copying",
  "mimeType": "string",
  "missingSince": "2019-08-24T14:15:22Z",
  "sourceModifiedAt": "2019-08-24T14:15:22Z",
  "sourceName": "string",
  "sourceParent": "string",
  "sourcePath": "string",
  "status": "active",
  "syncId": "24d9ea7f-fdab-4f53-95fd-4deda2362964",
  "syncName": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Download Synced File

GET
/api/v1/files/synced/{synced_file_id}/download

Path Parameters

synced_file_id*string
Formatuuid

Query Parameters

disposition?string
Default"attachment"
Value in"attachment" | "inline"

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/synced/497f6eca-6276-4993-bfeb-53cbbbba6f08/download"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Synced File Page

GET
/api/v1/files/synced/{synced_file_id}/pages/{page}

Path Parameters

synced_file_id*string
Formatuuid
page*integer

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/synced/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages/0"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Synced File Sheet

GET
/api/v1/files/synced/{synced_file_id}/sheets/{sheet_index}

Path Parameters

synced_file_id*string
Formatuuid
sheet_index*integer

Query Parameters

start_row?integer
Default0
Range0 <= value
row_limit?integer
Default50
Range1 <= value <= 200
start_col?integer
Default0
Range0 <= value
col_limit?|

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/synced/497f6eca-6276-4993-bfeb-53cbbbba6f08/sheets/0"
{
  "rows": [
    [
      "string"
    ]
  ],
  "sheetName": "string",
  "totalColumns": 0,
  "totalRows": 0,
  "truncated": {
    "cells": true,
    "columns": true,
    "rows": true
  },
  "window": {
    "colCount": 0,
    "rowCount": 0,
    "startCol": 0,
    "startRow": 0
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get Synced File Text

GET
/api/v1/files/synced/{synced_file_id}/text

Path Parameters

synced_file_id*string
Formatuuid

Query Parameters

start_char?integer
Default0
Range0 <= value
char_limit?integer
Default50000
Range1 <= value <= 200000

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/synced/497f6eca-6276-4993-bfeb-53cbbbba6f08/text"
{
  "endChar": 0,
  "startChar": 0,
  "text": "string",
  "totalChars": 0,
  "truncated": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get File

GET
/api/v1/files/{file_id}

Path Parameters

file_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "contentType": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": {
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "profilePictureUrl": "string"
  },
  "documentKind": "string",
  "fileSizeBytes": 0,
  "firstAttachedAt": "2019-08-24T14:15:22Z",
  "generatedFormat": "string",
  "hasBeenAttached": true,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "imageFormat": "string",
  "imageHeight": 0,
  "imageWidth": 0,
  "name": "string",
  "pageCount": 0,
  "sheetCount": 0,
  "sheetNamesPreview": [
    "string"
  ],
  "sourceKind": "uploaded",
  "sourceSurface": "string",
  "sourceThreadId": "87a870cc-e803-45bf-bc61-7a64dda4b64a",
  "status": "uploaded",
  "textCharCount": 0,
  "textTruncated": true,
  "updatedAt": "2019-08-24T14:15:22Z",
  "uploadSourceSurface": "string",
  "uploadSourceThreadId": "3a26fc94-2bac-4772-94b1-7a7e45743a78",
  "visibilityScope": "private"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Update File

PATCH
/api/v1/files/{file_id}

Path Parameters

file_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Request Body

application/json

name?|
visibilityScope?|

Response Body

application/json

application/json

curl -X PATCH "https://loading/api/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{
  "contentType": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "createdBy": {
    "email": "string",
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "profilePictureUrl": "string"
  },
  "documentKind": "string",
  "fileSizeBytes": 0,
  "firstAttachedAt": "2019-08-24T14:15:22Z",
  "generatedFormat": "string",
  "hasBeenAttached": true,
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "imageFormat": "string",
  "imageHeight": 0,
  "imageWidth": 0,
  "name": "string",
  "pageCount": 0,
  "sheetCount": 0,
  "sheetNamesPreview": [
    "string"
  ],
  "sourceKind": "uploaded",
  "sourceSurface": "string",
  "sourceThreadId": "87a870cc-e803-45bf-bc61-7a64dda4b64a",
  "status": "uploaded",
  "textCharCount": 0,
  "textTruncated": true,
  "updatedAt": "2019-08-24T14:15:22Z",
  "uploadSourceSurface": "string",
  "uploadSourceThreadId": "3a26fc94-2bac-4772-94b1-7a7e45743a78",
  "visibilityScope": "private"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Delete File

DELETE
/api/v1/files/{file_id}

Path Parameters

file_id*string
Formatuuid

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

curl -X DELETE "https://loading/api/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Download File

GET
/api/v1/files/{file_id}/download

Path Parameters

file_id*string
Formatuuid

Query Parameters

disposition?string
Default"attachment"
Value in"attachment" | "inline"

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08/download"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get File Page

GET
/api/v1/files/{file_id}/pages/{page}

Path Parameters

file_id*string
Formatuuid
page*integer

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08/pages/0"
null
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get File Sheet

GET
/api/v1/files/{file_id}/sheets/{sheet_index}

Path Parameters

file_id*string
Formatuuid
sheet_index*integer

Query Parameters

start_row?integer
Default0
Range0 <= value
row_limit?integer
Default50
Range1 <= value <= 200
start_col?integer
Default0
Range0 <= value
col_limit?|

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08/sheets/0"
{
  "rows": [
    [
      "string"
    ]
  ],
  "sheetName": "string",
  "totalColumns": 0,
  "totalRows": 0,
  "truncated": {
    "cells": true,
    "columns": true,
    "rows": true
  },
  "window": {
    "colCount": 0,
    "rowCount": 0,
    "startCol": 0,
    "startRow": 0
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Get File Text

GET
/api/v1/files/{file_id}/text

Path Parameters

file_id*string
Formatuuid

Query Parameters

start_char?integer
Default0
Range0 <= value
char_limit?integer
Default8000
Range1 <= value <= 200000

Header Parameters

authorization?|
X-API-Key?|
vai_token?|

Response Body

application/json

application/json

curl -X GET "https://loading/api/v1/files/497f6eca-6276-4993-bfeb-53cbbbba6f08/text"
{
  "endChar": 0,
  "startChar": 0,
  "text": "string",
  "totalChars": 0,
  "truncated": true
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}