Great Wave AI Platform
  • Great Wave AI Platform
    • Introduction
    • High Level Overview
  • Great Wave AI Studio
    • Quick Start
    • Global Navigation
    • Agent Domain
      • Agent Interface
      • Agent Approaches
      • Multi Agent Architectures
      • Agent Modules
        • Instruct
        • Design
        • Guardrules
        • Evaluate
          • Evaluation Pagination and Filter
          • User Feedback
        • Integrate
        • API (Agent)
      • Agent Tag and Filter
      • Agent Show/Hide
    • Knowledge Domain
      • Knowledge Interface
      • Organizing Knowledge
      • Knowledge Modules
        • Documents
        • Index
        • API (Documents)
    • Buddy Bot
    • User Account Management
  • Technical FAQs
Powered by GitBook
On this page
  • API
  • List Documents API
  • Upload API
  • Delete File API
  1. Great Wave AI Studio
  2. Knowledge Domain
  3. Knowledge Modules

API (Documents)

API

The API function provides a programmatic interface for managing documents and indexes. Details of how to use the APIs can be found below as well as directly in the platform.

List Documents API

API Version

v0.1

Description

Lists the files currently stored in your collection.

Endpoint

nginxCopyEditPOST https://atlantis.greatwave.ai/api/list-documents

Parameters

Parameter
Description

key

Collection API key used for authentication

Sample Request

bashCopyEditcurl -i -X POST https://atlantis.greatwave.ai/api/list-documents \
-H "Content-Type: application/json" \
-d '{ "key":"COLLECTION-API-KEY" }'

Sample Response

jsonCopyEdit{
  "documents": ["file1.pdf", "file2.txt"]
}

Upload API

API Version

v0.2

Description

Uploads new files to your collection. You can also assign these files to indexes and trigger auto-refreshing of those indexes.

Endpoint

nginxCopyEditPOST https://atlantis.greatwave.ai/api/upload

Parameters

Parameter
Description

key

Collection API key

files

Array of filenames to upload

index_ids (optional)

Array of index IDs to refresh after upload

Sample Request

bashCopyEditcurl -i -X POST https://atlantis.greatwave.ai/api/upload \
-H "Content-Type: application/json" \
-d '{ "key":"COLLECTION-API-KEY", "files":["report1.pdf", "report2.pdf"] }'

Sample Response

jsonCopyEdit{
  "uploaded": ["file1", "file2"],
  "failed": ["file3"],
  "skipped": [],
  "overwritten": ["file2"],
  "refreshed_indexes": [1, 2],
  "failed_indexes": [3]
}

Delete File API

API Version

v0.1

Description

Deletes files from your collection. Files cannot be deleted if they are part of an active index unless manually removed first. You can optionally delete all files in the collection.

Endpoint

perlCopyEditDELETE https://atlantis.greatwave.ai/api/delete

Parameters

Parameter
Description

key

Collection API key

files

Array of filenames to delete

Sample Request

bashCopyEditcurl -i -X DELETE https://atlantis.greatwave.ai/api/delete \
-H "Content-Type: application/json" \
-d '{ "key":"COLLECTION-API-KEY", "files":["report1.pdf", "report2.pdf"] }'

Sample Response

jsonCopyEdit{
  "deleted": ["file1", "file2"],
  "failed": [
    {
      "name": "file2",
      "message": "File in use by indexes: Annual-Report, Q1 Report"
    }
  ]
}
PreviousIndexNextBuddy Bot

Last updated 10 days ago