openapi: 3.0.0 info: title: GroundX API description: Ground Your RAG Apps in Fact not Fiction version: 1.0.0 contact: email: support@groundx.ai license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html servers: - description: GroundX Base URL url: https://api.groundx.ai/api tags: - name: Documents - name: Projects - name: Buckets - name: Search - name: API Keys paths: /v1/apikey: get: tags: - API Keys summary: Get API keys operationId: ApiKeyManagement_list description: Retrieve the API keys for your account. responses: '200': description: Successful retrieval of API keys content: application/json: schema: $ref: '#/components/schemas/ApiKeyManagementListResponse' '401': description: Unauthorized '403': description: Forbidden '405': description: Method Not Allowed content: application/json: schema: $ref: '#/components/schemas/ApiKeyManagementList405Response' /v1/project/{projectId}: get: tags: - Projects summary: Look up an existing project by its ID operationId: Project_get description: This endpoint allows you to retrieve a specific project by projectId. parameters: - description: The ID of the project to retrieve. in: path name: projectId required: true schema: type: string responses: '200': description: Successful retrieval of project content: application/json: schema: $ref: '#/components/schemas/ProjectResponse' put: tags: - Projects summary: Update an existing project operationId: Project_update description: This endpoint allows you to update an existing project. parameters: - description: The ID of the project to update. in: path name: projectId required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProjectUpdateRequest' responses: '200': description: Successful update of project content: application/json: schema: $ref: '#/components/schemas/ProjectResponse' /v1/project: get: tags: - Projects summary: Look up existing projects operationId: Project_list description: This endpoint allows you to retrieve your existing projects. responses: '200': description: Successful retrieval of projects content: application/json: schema: $ref: '#/components/schemas/ProjectListResponse' /v1/bucket/{bucketId}: get: tags: - Buckets summary: Look up an existing bucket by its ID operationId: Bucket_get description: Look up a bucket by its bucketId. parameters: - description: The ID of the bucket to retrieve. in: path name: bucketId required: true schema: type: integer responses: '200': description: Look up success content: application/json: schema: $ref: '#/components/schemas/BucketResponse' '400': description: Invalid bucket ID '401': description: Permission denied put: tags: - Buckets summary: Update an existing bucket operationId: Bucket_update description: Update the configurations of an existing bucket. parameters: - description: The ID of the bucket to update. in: path name: bucketId required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/BucketUpdateRequest' responses: '200': description: Bucket successfully updated content: application/json: schema: $ref: '#/components/schemas/BucketResponse' '400': description: Invalid body parameter '401': description: Permission denied /v1/bucket: get: tags: - Buckets summary: Look up existing buckets operationId: Bucket_list description: Look up existing buckets associated with your account. responses: '200': description: Look up success content: application/json: schema: $ref: '#/components/schemas/BucketListResponse' '401': description: Permission denied /v1/ingest/document/{documentId}: get: tags: - Documents summary: Look up an existing document by its ID operationId: Document_get parameters: - name: documentId in: path required: true schema: type: string responses: '200': description: Look up success content: application/json: schema: $ref: '#/components/schemas/DocumentResponse' '400': description: Invalid document ID '401': description: Permission denied delete: tags: - Documents summary: Delete a document operationId: Document_delete parameters: - name: documentId in: path required: true schema: type: string responses: '200': description: Document successfully deleted content: application/json: schema: $ref: '#/components/schemas/DocumentDeleteResponse' '400': description: Invalid document ID '401': description: Permission denied /v1/ingest/documents/remote: post: tags: - Documents summary: Upload hosted documents to GroundX operationId: Document_uploadRemote requestBody: content: application/json: schema: $ref: '#/components/schemas/DocumentRemoteUploadRequest' responses: '200': description: Documents successfully uploaded content: application/json: schema: $ref: '#/components/schemas/IngestResponse' '400': description: Invalid document type or source URL '401': description: Permission denied /v1/ingest/documents/local: post: tags: - Documents summary: Upload local documents to GroundX operationId: Document_uploadLocal requestBody: content: multipart/form-data: schema: $ref: '#/components/schemas/DocumentLocalUploadRequest' responses: '200': description: Documents successfully uploaded content: application/json: schema: $ref: '#/components/schemas/IngestResponse' '400': description: Invalid document type or source URL '401': description: Permission denied /v1/ingest/documents: get: tags: - Documents summary: Look up all existing documents operationId: Document_list responses: '200': description: Look up success content: application/json: schema: $ref: '#/components/schemas/DocumentListResponse' '401': description: Permission denied /v1/ingest/documents/{id}: get: tags: - Documents summary: Look up existing documents by processId, bucketId, or projectId operationId: Document_lookup parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Look up success content: application/json: schema: $ref: '#/components/schemas/DocumentLookupResponse' '401': description: Permission denied /v1/ingest/{processId}: get: tags: - Documents summary: Look up the processing status of documents for a given processId operationId: Document_getProcessingStatusById parameters: - name: processId in: path required: true schema: type: string responses: '200': description: Look up success content: application/json: schema: $ref: '#/components/schemas/ProcessStatusResponse' '401': description: Permission denied /v1/search/{id}: post: tags: - Search summary: Perform a search query of your content operationId: Search_content description: Search and retrieve relevant content from a project, group, or bucket by id. parameters: - description: The ID of the project, group, or bucket to search within. in: path name: id required: true schema: type: integer - description: Number of results in: query name: 'n' required: false schema: type: integer default: 20 minimum: 1 maximum: 100 requestBody: content: application/json: schema: $ref: '#/components/schemas/SearchRequest' responses: '200': description: Search query success content: application/json: schema: $ref: '#/components/schemas/SearchResponse' '400': description: Invalid request data '401': description: Permission denied components: schemas: ProjectBindBucketResponse: type: object required: - message properties: message: type: string example: OK example: message: OK ProjectBindBucket400Response: type: object properties: message: type: string example: You do not have access to a bucket with this bucketId example: message: You do not have access to a bucket with this bucketId ProjectBucketBinding: type: object example: project: bucketId: 6122 required: - project properties: project: type: object required: - bucketId properties: bucketId: description: The ID of the bucket to add to the project. type: integer SearchRequest: type: object properties: search: type: object required: - query properties: query: description: The search query type: string example: 'my search query' nextToken: description: Token to retrieve the next set of paginated results type: string example: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9' SearchResponse: type: object required: - search properties: search: type: object properties: count: description: Total results type: integer results: type: array items: $ref: '#/components/schemas/SearchResultItem' query: description: The search query type: string score: description: Top result relevance score type: number text: description: Combined text from results type: string nextToken: description: For paginated results type: string SearchResultItem: type: object properties: chunkId: description: Unique system generated ID for the chunk type: string documentId: description: Unique system generated ID for the document type: string metadata: description: Document and chunk level metadata type: object score: description: Result relevance score type: number sourceUrl: description: Document source URL type: string text: description: Text from result type: string ProjectResponse: type: object required: - project properties: project: $ref: '#/components/schemas/ProjectDetail' ProjectDetail: type: object required: - projectId properties: buckets: type: array items: $ref: '#/components/schemas/BucketDetail' created: type: string format: date-time fileCount: type: integer fileSize: type: string projectId: type: integer name: type: string updated: type: string format: date-time BucketDetail: type: object required: - bucketId properties: bucketId: type: integer fileCount: type: integer fileSize: type: string name: type: string BucketResponse: type: object required: - bucket properties: bucket: $ref: '#/components/schemas/BucketDetail' BucketUpdateRequest: type: object required: - bucket properties: bucket: type: object properties: name: type: string example: your_bucket_name ProjectUpdateRequest: type: object required: - project properties: project: type: object properties: name: type: string example: your_project_name DocumentResponse: type: object properties: document: type: object properties: bucketId: type: integer documentId: type: string fileName: type: string fileSize: type: string fileType: type: string metadata: type: object processId: type: string processedUrl: type: string sourceUrl: type: string status: type: string statusMessage: type: string DocumentRemoteUploadRequest: type: object properties: type: $ref: '#/components/schemas/DocumentType' documents: type: array items: type: object required: - bucketId - sourceUrl properties: bucketId: type: integer example: 1234 sourceUrl: type: string example: https://my.source.url.com/file.txt callbackData: type: string example: my_callback_data callbackUrl: type: string example: https://my.callback.url.com metadata: type: object example: key: value type: $ref: '#/components/schemas/DocumentType' DocumentType: type: string enum: - txt - docx - pptx - xlsx - pdf - png - jpg DocumentLocalUploadRequest: type: object required: - blob - metadata properties: blob: type: array items: description: The actual file being uploaded. type: string format: binary metadata: type: object properties: bucketId: type: integer example: 1234 fileName: type: string example: my_file.txt fileType: $ref: '#/components/schemas/DocumentType' metadata: type: object example: key: value callbackData: type: string example: my_callback_data callbackUrl: type: string example: https://my.callback.url.com IngestResponse: type: object required: - ingest properties: ingest: type: object required: - processId - status properties: processId: type: string status: $ref: "#/components/schemas/ProcessingStatus" ProcessStatusResponse: type: object required: - ingest properties: ingest: type: object required: - processId - status properties: processId: type: string progress: type: object properties: complete: type: object properties: documents: type: array items: $ref: '#/components/schemas/DocumentResponse' total: type: integer errors: type: object properties: documents: type: array items: $ref: '#/components/schemas/DocumentResponse' total: type: integer processing: type: object properties: documents: type: array items: $ref: '#/components/schemas/DocumentResponse' total: type: integer status: $ref: "#/components/schemas/ProcessingStatus" statusMessage: type: string ProcessingStatus: type: string enum: - queued - processing - error - complete ProjectListResponse: type: object properties: projects: type: array items: $ref: '#/components/schemas/ProjectDetail' BucketListResponse: type: object properties: buckets: type: array items: $ref: '#/components/schemas/BucketDetail' DocumentDeleteResponse: type: object properties: message: type: string DocumentListResponse: type: object properties: documents: type: array items: $ref: '#/components/schemas/DocumentResponse' DocumentLookupResponse: type: object properties: documents: type: array items: $ref: '#/components/schemas/DocumentResponse' ApiKeyManagementList405Response: type: object properties: message: type: string example: The method you used is not supported for this query example: message: The method you used is not supported for this query ApiKeyManagementListResponse: type: object properties: apiKeys: type: array items: type: object properties: created: type: string example: '2023-10-03T08:59:39.312Z' apiKey: type: string example: XXXXXXXX-42c5-4704-a892-81adc9b3e22d name: type: string example: Last recent API key example: apiKeys: - apiKey: XXXXXXXX-42c5-4704-a892-81adc9b3e22d created: '2023-10-03T08:59:39.312Z' name: Last recent API key - apiKey: XXXXXXXX-7ac8-4cb5-ac3a-4638ea360cbf created: '2023-09-21T12:29:55.501Z' name: Recent API key - apiKey: XXXXXXXX-2f96-47a7-9b56-9410051915d9 created: '2023-09-20T15:58:50.066Z' name: Lina_Key2 - apiKey: XXXXXXXX-05f2-4a16-ab3a-d07fa4661753 created: '2023-09-20T09:32:11.161Z' name: default securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-API-Key security: - ApiKeyAuth: []