---
title: "lookup"
method: GET
path: "/v1/ingest/documents/{id}"
tags: ["Documents"]
---

# lookup

`GET /v1/ingest/documents/{id}`

lookup the document(s) associated with a processId, bucketId, groupId, or projectId.

Interact with the "Request Body" below to explore the arguments of this function. Enter your GroundX API key to send a request directly from this web page. Select your language of choice to structure a code snippet based on your specified arguments.

## Path parameters

- `id` integer, required

## Query parameters

- `n` integer
- `filter` string
- `sort` 'name' | 'created' — The attribute to use to sort results
- `sortOrder` 'asc' | 'desc' — The order in which to sort results
- `status` 'queued' | 'processing' | 'error' | 'complete' | 'cancelled'
- `nextToken` string

## Response `200`

Look up success

- DocumentLookupResponse
  - `count` integer — The number of results returned in the current response
  - `documents` DocumentDetail[]
    - `bucketId` integer
    - `documentId` string, uuid, required — Unique system generated ID for the document
    - `fileName` string
    - `fileSize` string — The file size of the file stored in GroundX
    - `fileType` 'txt' | 'docx' | 'pptx' | 'xlsx' | 'pdf' | 'png' | 'jpg' | 'csv' | 'tsv' | 'json' — The type of document (one of the seven currently supported file types)
    - `processId` string, uuid — Unique system generated ID for the ingest request
    - `searchData` object
    - `sourceUrl` string, uri — Source document URL
    - `status` 'queued' | 'processing' | 'error' | 'complete' | 'cancelled'
    - `statusMessage` string
    - `xrayUrl` string, uri — Document X-Ray results
  - `nextToken` string
  - `total` integer — The total number of results found

## Other responses

- `400` — Invalid process, bucket, group, or project ID
- `401` — Unauthorized to access process, bucket, group, or project with given ID

## Changes

- **2024-07-25** `100a68ae1698` — 1 warning, 11 info
  - removed the optional property `documents/items/document` from the response with the `200` status
  - added the optional property `documents/items/bucketId` to the response with the `200` status
  - added the optional property `documents/items/fileName` to the response with the `200` status
  - added the optional property `documents/items/fileSize` to the response with the `200` status
  - …8 more
- **2024-07-25** `af54b546cf62` — 1 info
  - the response property `documents/items/document/documentId` became required for the status `200`
- **2024-06-29** `970df0d2a4e8` — 1 info
  - added the new optional `query` request parameter `status`
- **2024-06-28** `f97e210f1431` — 6 info
  - added the new optional `query` request parameter `filter`
  - added the new optional `query` request parameter `sort`
  - added the new optional `query` request parameter `sortOrder`
  - added the optional property `count` to the response with the `200` status
  - …2 more
- **2024-02-01** `bc7318def107` — 1 warning
  - added the new `json` enum value to the `documents/items/document/fileType` response property for the response status `200`

[Full history](https://skmtc.dev/groundxai/apis/groundx-apis/changes/v1/ingest/documents/:id/get.md)

---

[API](https://skmtc.dev/groundxai/apis/groundx-apis.md) · [All operations](https://skmtc.dev/groundxai/apis/groundx-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/groundxai/groundx-apis/revisions/1c1a5c17f52f/schema)
