v1

latestOpenAPI 3.0.22026-07-174617345.8 KB
Pages

List all pages that belong to an agent.

Retrieve a list of all pages associated with an agent (formerly known as project). This endpoint allows you to fetch agent details and a collection of pages that belong to a specific agent. Each page object includes information such as the page ID, URL, hash of the URL, agent ID, crawl status, index status, file details (if applicable), creation and update timestamps, and other relevant attributes. Here is an example to list all pages belonging to agent: API SDK.

get/api/v1/projects/{projectId}/pages

Path parameters

projectIdinteger required
Example:1

The unique agent identifier.

Query parameters

pageinteger

Page number to return

limitinteger

Limit the number of documents to return. Defaults to 20.

order'asc' | 'desc'

The order of the documents to list. Sorts by page ID.

crawl_status'all' | 'ok' | 'failed' | 'n/a' | 'queued' | 'limited'

The crawl status of the documents to list.

index_status'all' | 'ok' | 'failed' | 'n/a' | 'queued' | 'limited'

The index status of the documents to list.

Response

List of pages successfully retrieved.

status'error' | 'success'

The status of the response

Example response

{
  "status": "success",
  "data": {
    "project": {
      "id": 1,
      "project_name": "My Agent",
      "sitemap_path": "https://www.example.com/sitemap.xml",
      "is_chat_active": true,
      "user_id": 1,
      "team_id": 1,
      "created_at": "2021-01-01 00:00:00",
      "updated_at": "2021-01-01 00:00:00",
      "deleted_at": "2021-01-01 00:00:00",
      "type": "SITEMAP",
      "is_shared": true,
      "shareable_slug": "1234567890abcdef1234567890abcdef",
      "are_licenses_allowed": true
    },
    "pages": {
      "current_page": 1,
      "data": [
        {
          "id": 1,
          "page_url": "https://example.com",
          "page_url_hash": "d41d8cd98f00b204e9800998ecf8427e",
          "project_id": 1,
          "s3_path": "project-1/page-1/file.pdf",
          "crawl_status": "queued",
          "index_status": "queued",
          "is_file": true,
          "is_refreshable": true,
          "is_file_kept": true,
          "filename": "file.pdf",
          "filesize": 100,
          "created_at": "2021-01-01 00:00:00",
          "updated_at": "2021-01-01 00:00:00",
          "deleted_at": "2021-01-01 00:00:00"
        }
      ],
      "first_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
      "from": 1,
      "last_page": 1,
      "last_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
      "next_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
      "path": "https://app.customgpt.ai/api/v1/users?page=1",
      "per_page": 10,
      "prev_page_url": "https://app.customgpt.ai/api/v1/users?page=1",
      "to": 1,
      "total": 1
    }
  }
}