Get File Query

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

This API helps you get contextual answers from uploaded files using Zia. Instead of manually searching through large documents, you can ask questions directly and receive relevant answers based on the file content. Learn more about querying files in WorkDrive


Important: When this API is called for the first time on a file, Zia starts indexing the file content before generating answers. Depending on the file size and content, indexing may take some time. You can track the indexing progress using the status value returned in the API response.

Status:

  • 1 - Indexing completed and answers are ready
  • 2 - Indexing in progress
  • 3 - Indexing failed due to an error
Endpoints

OAuth Scope

WorkDrive.files.READCopied!

Request Example

cURL
cURL
Deluge
Copied!
curl --request GET \
  --url 'https://www.zohoapis.com/workdrive/api/v1/files/{resource_id}/filequery?filter%5BorgId%5D={team_id}&filter%5Bquestion%5D={file_related_question}' \
  --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52'

Path Parameters

resource_idstring(Required)

The unique ID of the file/folder.

Query Parameters

Note:

Query parameter name should be URL encoded with UTF-8 Charset. For more info, refer here

filter[orgId]string(Required)

The unique identifier of your organization or team. This ensures the request is executed within the correct WorkDrive account context.

filter[question]string(Required)

The query or prompt you want to run on the file. For example, you can pass values like key points in this file, or a natural language question (e.g., What is this document about?).
If not provided, the API returns only the query status without generating an answer.

Response Example

R007

R007

R004

R010

F7003

F7003

A001

F000

200
200
400
401
500
Copied!
  {
    "email_id": "string",
    "cursorLink": {
      "cursor": {
        "next": "string",
        "hasNext": true
      }
    },
    "isSharedToPartOfLib": true,
    "shared_time_in_millis": 0,
    "shared_by": "string",
    "expiry_in_millis": 0,
    "relation_type": 0,
    "expiration_date": "string",
    "type": "string",
    "shareToEntityInfo": {
      "entityLabel": "string",
      "entityLabelI18": "string",
      "avatarUrl": "string",
      "displayName": "string",
      "emailId": "string",
      "type": 0,
      "collaboratorsCount": 0
    },
    "password": "string",
    "role_id": 0,
    "shared_time": "string",
    "appShareData": {
      "entity_label": "string",
      "entity_value": "string",
      "association_id": 0,
      "entity_id": "string",
      "appData": {
        "cursorLink": {
          "cursor": {
            "next": "string",
            "hasNext": true
          }
        },
        "appName": "string",
        "appType": "string",
        "serviceOrgTypeId": 0,
        "canDissociate": true,
        "description": "string",
        "appKey": "string",
        "installationKey": "string"
      }
    },
    "shared_status": "string",
    "orgInvitedUser": true,
    "allow_for_suggestion": true,
    "resMeta": {
      "resourceShareInfo": [
        {
          "groupsCount": 0,
          "customized": true,
          "cursorLink": {
            "cursor": {}
          },
          "associationsCount": 0,
          "resource_type": "string",
          "resourceName": "string",
          "id": "string",
          "collaboratorsCount": 0
        }
      ]
    },
    "can_link_to_docs": true,
    "owner": "string",
    "permissionid": "string",
    "shared_type": "string",
    "send_notification_mail": true,
    "allowSharingOutside": true,
    "shared_to_entity": "string",
    "integrationentitymembers": [
      {
        "permissionId": "string",
        "resourceId": "string",
        "cursorLink": {
          "cursor": {
            "next": "string",
            "hasNext": true
          }
        },
        "avatarUrl": "string",
        "roleId": 0,
        "displayName": "string",
        "module": "string",
        "emailId": "string",
        "shareTo": "string",
        "entityId": "string",
        "integrationEntityId": "string",
        "associatedId": 0,
        "spaceId": "string",
        "sharedTimeForDisplay": "string",
        "sharedTime": 0,
        "sharedBy": "string",
        "integrationEntityMemberId": "string",
        "resourceType": 0
      }
    ],
    "delete_from_propagated_space": true,
    "isSharedViaWorkflow": true,
    "display_name": "string",
    "message": "string",
    "version": "string",
    "allow_download": true,
    "share_to": "string",
    "role_name": "string",
    "shareToMemberType": 0,
    "avatar_url": "string",
    "shared_to_member_type": 0,
    "shared_time_I18": "string",
    "is_password_protected": true,
    "resource_id": "string",
    "isExpired": true,
    "permalink": "string",
    "shared_by_zuid": "string",
    "isRestricted": true
  }
                
  {
    "errors": [
      {
        "id": "R007",
        "title": "Invalid pattern"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R004",
        "title": "Invalid resourceId"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "R010",
        "title": "Invalid parameter value"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "F7003",
        "title": "Invalid OAuth token"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "A001",
        "title": "Unauthorized access"
      }
    ]
  }
                
  {
    "errors": [
      {
        "id": "F000",
        "title": "General exception"
      }
    ]
  }
                
Show full