> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.privategpt.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.privategpt.dev/_mcp/server.

# List Ingested Documents

GET /v1/artifacts/list

Retrieve a list of all documents ingested into a specific collection

Reference: https://docs.privategpt.dev/api-reference/artifacts/list-ingested-v-1-artifacts-list-get

## Request

### Query parameters

- `collection` (string, required, default: pgpt_collection)

## Response

### 200

Successfully retrieved document list

- `data` (list of IngestedDoc, required) — List of ingested documents with their metadata and processing information
- `object` ("list", optional, default: list) — Response object type, always 'list' for ingestion responses
- `model` ("private-gpt", optional, default: private-gpt) — Model identifier, always 'private-gpt'

## Errors

### 401 Unauthorized Error

Unauthorized

- `any`

## Types

### IngestedDoc

Represents a document that has been ingested into the system.

- `artifact` (string, required) — Unique identifier for the ingested document artifact.
- `object` ("ingest.document", optional, default: ingest.document) — Type of the object, indicating this is an ingested document.
- `doc_metadata` (map from string to any, optional, nullable) — Metadata associated with the ingested document, such as title, author, and other

## Examples

**Response**

```json
{
  "data": [
    {
      "artifact": "annual_report",
      "object": "ingest.document",
      "doc_metadata": {
        "date": "2023-12-31",
        "department": "finance",
        "file_name": "2023_Annual.pdf"
      }
    },
    {
      "artifact": "policy_manual",
      "object": "ingest.document",
      "doc_metadata": {
        "department": "hr",
        "file_name": "employee_policy.docx",
        "version": "2.1"
      }
    }
  ],
  "object": "list",
  "model": "private-gpt"
}
```

**SDK Code**

```python Artifacts_list_ingested_v1_artifacts_list_get_example
import requests

url = "https://api.example.com/v1/artifacts/list"

querystring = {"collection":"pgpt_collection"}

response = requests.get(url, params=querystring)

print(response.json())
```

```javascript Artifacts_list_ingested_v1_artifacts_list_get_example
const url = 'https://api.example.com/v1/artifacts/list?collection=pgpt_collection';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Artifacts_list_ingested_v1_artifacts_list_get_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/v1/artifacts/list?collection=pgpt_collection"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Artifacts_list_ingested_v1_artifacts_list_get_example
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/artifacts/list?collection=pgpt_collection")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Artifacts_list_ingested_v1_artifacts_list_get_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.example.com/v1/artifacts/list?collection=pgpt_collection")
  .asString();
```

```php Artifacts_list_ingested_v1_artifacts_list_get_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/v1/artifacts/list?collection=pgpt_collection');

echo $response->getBody();
```

```csharp Artifacts_list_ingested_v1_artifacts_list_get_example
using RestSharp;

var client = new RestClient("https://api.example.com/v1/artifacts/list?collection=pgpt_collection");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Artifacts_list_ingested_v1_artifacts_list_get_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/v1/artifacts/list?collection=pgpt_collection")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```