Skip to main content

Core Platform API - v1 (0.3.3)

Download OpenAPI specification:Download

Introduction

Welcome to the Core Platform API documentation. This document details the functionalities and endpoints of our API based on the OpenAPI format version 3. We've also implemented specific vendor extensions to augment the documentation.

OpenAPI Specification

This documentation adheres to the OpenAPI format. The format ensures uniformity, clear documentation, and easy understanding of our endpoints. We've incorporated vendor extensions to enhance the detailing and structure of the documentation, providing a clearer view of our API's capabilities.

Authentication

The Core API employs the Bearer Token mechanism for authentication purposes.

Bearer Token

To authenticate requests, include a token prefixed with 'Bearer ' in the Authorization header, e.g., 'Bearer your_token_here'. This token is necessary for accessing authenticated endpoints.

Compression

The Core Platform API offers content compression to enhance data transfer. Supported methods include:

  • Brotli (br)
  • Deflate
  • Gzip
  • Zstandard (zstd)

To specify compression, include the Accept-Encoding header, e.g., Accept-Encoding: gzip, deflate, br. Absence of this header or a value of identity results in uncompressed data.

We suggest using compression for sizable responses, as it may not be advantageous for smaller datasets. The response will carry a Content-Encoding header, denoting the compression type. Always evaluate the benefits in your context before finalizing a method.

Copyright

All rights reserved. The Core Platform and its API are proprietary to CentraGate Inc. Unauthorized use, modification, copying, or distribution of this software or its accompanying documentation without written permission from CentraGate Inc. is prohibited.

Workspaces

Operations about Workspace Management

List Workspaces

List Workspaces

This endpoint retrieves a list of all available workspaces.

Authorizations:
bearer_token

Responses

Response samples

Content type
application/json
{
  • "workspaces": [
    ]
}

Create Workspace

Create Workspace

This endpoint allows for the creation of a new workspace. It accepts a request body that contains the necessary details for the new workspace. If the workspace creation is successful, it returns a status code indicating a successful operation.

Authorizations:
bearer_token
Request Body schema: application/json
name
required
string
description
string or null
persona
string or null
instructions
string or null
thread_starter_message
string or null
is_active
boolean or null
strict_reference_mode
boolean or null
thinking_mode
string or null
Enum: "Precise" "Balanced" "Creative"
service_tier
string or null
Enum: "Lite" "Premium"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "persona": "string",
  • "instructions": "string",
  • "thread_starter_message": "string",
  • "is_active": true,
  • "strict_reference_mode": true,
  • "thinking_mode": "Precise",
  • "service_tier": "Lite"
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "is_active": true,
  • "persona": "string",
  • "instructions": "string",
  • "thread_starter_message": "string",
  • "strict_reference_mode": true,
  • "thinking_mode": "Precise",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4"
}

Get Workspace

Get Workspace

This endpoint retrieves details of a specific workspace, identified by its unique workspace ID.

Authorizations:
bearer_token
path Parameters
workspace_id
required
string

ID of the workspace to retrieve

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "is_active": true,
  • "persona": "string",
  • "instructions": "string",
  • "thread_starter_message": "string",
  • "strict_reference_mode": true,
  • "thinking_mode": "Precise",
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4"
}

Update Workspace

Update Workspace

This endpoint facilitates the updating of an existing workspace. The request body should contain the updated details for the workspace, and the workspace_id parameter identifies the workspace to be updated.

If the workspace exists and the update is successful, it returns a status code indicating the operation was completed. If the workspace does not exist, it returns an error indicating the workspace was not found.

Authorizations:
bearer_token
path Parameters
workspace_id
required
string

ID of the workspace to update

Request Body schema: application/json
name
string or null
description
string or null
persona
string or null
instructions
string or null
thread_starter_message
string or null
is_active
boolean or null
strict_reference_mode
boolean or null
thinking_mode
string or null
Enum: "Precise" "Balanced" "Creative"
service_tier
string or null
Enum: "Lite" "Premium"

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "persona": "string",
  • "instructions": "string",
  • "thread_starter_message": "string",
  • "is_active": true,
  • "strict_reference_mode": true,
  • "thinking_mode": "Precise",
  • "service_tier": "Lite"
}

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "category": "Malformed",
  • "message": "string",
  • "code": "string",
  • "details": {
    }
}

Delete Workspace

Delete Workspace

This endpoint facilitates the deletion of an existing workspace.

Authorizations:
bearer_token
path Parameters
workspace_id
required
string

ID of the workspace to delete

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "category": "Malformed",
  • "message": "string",
  • "code": "string",
  • "details": {
    }
}

List Linked Vaults

List Linked Vaults

This endpoint retrieves a list of all linked vaults for a specified workspace.

Authorizations:
bearer_token
path Parameters
workspace_id
required
string

Responses

Response samples

Content type
application/json
{
  • "vaults": [
    ]
}

Vaults

Operations about Vault Management

List Vaults

List Vaults

This endpoint returns a list of available vaults.

Authorizations:
bearer_token

Responses

Response samples

Content type
application/json
{
  • "vaults": [
    ]
}

Create Vault

Create Vault

This endpoint allows the creation of a new vault based on the provided details in the VaultCreateRequest body.

Authorizations:
bearer_token
Request Body schema: application/json
name
required
string
description
string or null
is_active
boolean or null
related_workspace_ids
Array of strings or null <uuid>

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "is_active": true,
  • "related_workspace_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "description": "string",
  • "is_active": true,
  • "created_at": "2019-08-24T14:15:22Z",
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4"
}

Search Vault

Search Vault

This endpoint allows searching for chunks in a specific vault identified by the vault_id. The search query is provided in the VaultSearchRequest body. The API responds with a list of chunks that match the search query.

Authorizations:
bearer_token
path Parameters
vault_id
required
string

Vault id to search

Request Body schema: application/json
query
required
string
min_score
number or null <double>
limit
integer or null <int32>

Responses

Request samples

Content type
application/json
{
  • "query": "string",
  • "min_score": 0,
  • "limit": 0
}

Response samples

Content type
application/json
[
  • {
    }
]

Update Vault

Update Vault

This endpoint allows updating an existing vault identified by the vault_id. The details of the update are provided in the VaultUpdateRequest body. If there are any related workspaces in the update request, they replace the existing ones. If no related workspaces are provided in the request, the existing ones are retained.

Authorizations:
bearer_token
path Parameters
vault_id
required
string

ID of the vault to update

Request Body schema: application/json
name
string or null
description
string or null
is_active
boolean or null
related_workspace_ids
Array of strings or null <uuid>

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "description": "string",
  • "is_active": true,
  • "related_workspace_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "category": "Malformed",
  • "message": "string",
  • "code": "string",
  • "details": {
    }
}

Delete Vault

Delete Vault

This endpoint facilitates the deletion of a specific vault identified by the vault_id. Once the vault is deleted, the API responds with a status code of 204, indicating that the operation was successful without returning any content.

Authorizations:
bearer_token
path Parameters
vault_id
required
string

ID of the vault to delete

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "category": "Malformed",
  • "message": "string",
  • "code": "string",
  • "details": {
    }
}

List Linked Workspaces

List Linked Workspaces

This endpoint retrieves a list of all linked workspaces for a specified vault.

Authorizations:
bearer_token
path Parameters
vault_id
required
string

Responses

Response samples

Content type
application/json
{
  • "workspaces": [
    ]
}

Threads

Operations about Thread Management

New Thread

New Thread

This endpoint creates a new thread for the workspace. Use the returned thread id to interact with.

Authorizations:
bearer_token
path Parameters
workspace_id
required
string

ID of the workspace for which a thread should be created

query Parameters
thinking_mode
string or null
Enum: "Precise" "Balanced" "Creative"

An optional thinking mode to use for the thread

service_tier
string or null
Enum: "Lite" "Premium"

An optional service tier to use for the thread

Responses

Response samples

Content type
application/json
{
  • "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
  • "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
  • "thread_starter_message": "string",
  • "created_at": "2019-08-24T14:15:22Z"
}

Get Thread Info

Get Thread Info

This endpoint returns the info for a specific thread in the workspace.

Authorizations:
bearer_token
path Parameters
workspace_id
required
string

ID of the workspace for the thread

thread_id
required
string <uuid>

ID of the specific thread to retrieve info for

query Parameters
include_summary
boolean or null

An optional flag indicating whether to include the thread summary in the response

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9",
  • "title": "string",
  • "summary": "string",
  • "is_active": true,
  • "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  • "created_at": "2019-08-24T14:15:22Z"
}

Ask

Ask

This endpoint allows clients to pose questions to the assistant. Upon receiving a question, the assistant processes the request and streams the response back to the client using Server-Sent Events (SSE). The response type is text/event-stream. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.

Authorizations:
bearer_token
path Parameters
workspace_id
required
string

ID of the workspace for the thread

thread_id
required
string <uuid>

ID of the thread in which the question is posed

Request Body schema: application/json
input
required
string
thinking_mode
string or null
Enum: "Precise" "Balanced" "Creative"

Responses

Request samples

Content type
application/json
{
  • "input": "string",
  • "thinking_mode": "Precise"
}

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "category": "Malformed",
  • "message": "string",
  • "code": "string",
  • "details": {
    }
}

Set Thread Title

Set Thread Title

Updates the title of a specific thread within a designated workspace.

Authorizations:
bearer_token
path Parameters
workspace_id
required
string

ID of the workspace for the thread to be updated

thread_id
required
string <uuid>

ID of the thread whose title needs to be updated

Request Body schema: application/json
title
required
string

Responses

Request samples

Content type
application/json
{
  • "title": "string"
}

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "category": "Malformed",
  • "message": "string",
  • "code": "string",
  • "details": {
    }
}

Search Threads

Search Threads

This endpoint allows searching threads within a specific workspace. The search leverages NLP capabilities, operating at the word-level.

Authorizations:
bearer_token
path Parameters
workspace_id
required
string

Workspace ID in which to search threads

query Parameters
text
required
string

Text segment to match against thread posts

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Data Sources

Operations about Source Management

List Data Sources

List Data Sources

This endpoint retrieves a list of data sources associated with a specified vault. The vault_id parameter identifies which vault's sources are to be listed.

On successful retrieval, it returns a list of data sources within a SourcesListResponse structure. If there's any error in the process, an appropriate error message will be returned.

Authorizations:
bearer_token
path Parameters
vault_id
required
string

ID of the vault to list sources for

Responses

Response samples

Content type
application/json
{
  • "sources": [
    ]
}

New Source - File Upload

New Source - File Upload

This endpoint allows uploading a file to a vault as a Source. The file is uploaded as a base64 encoded string in the request body.

Authorizations:
bearer_token
path Parameters
vault_id
required
string

ID of the vault to upload file to

Request Body schema: application/json
file_name
required
string
data
required
string

Responses

Request samples

Content type
application/json
{
  • "file_name": "string",
  • "data": "string"
}

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "category": "Malformed",
  • "message": "string",
  • "code": "string",
  • "details": {
    }
}

Get a Data Source

Get a Data Source

This endpoint retrieves detailed information about a specific data source that belongs to a given vault. The vault_id parameter identifies the vault, and the source_id specifies which source within that vault to retrieve.

On successful retrieval, it returns the details of the data source in the Source structure. If the source with the specified ID is not found within the vault, a 404 Not Found status code is returned. Other errors during the process will return appropriate error messages.

Authorizations:
bearer_token
path Parameters
vault_id
required
string

ID of the vault to get source for

source_id
required
string <uuid>

ID of the source to get

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "vault_id": "432b199b-1f71-42bf-ba0b-33d512afa9de",
  • "source_type": "Upload",
  • "provider": {
    },
  • "hash": "string",
  • "size": 0,
  • "content_type": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "events": [
    ]
}

Delete a Data Source

Delete a Data Source

This endpoint deletes a data source from a vault.

Authorizations:
bearer_token
path Parameters
vault_id
required
string

ID of the vault to delete source from

source_id
required
string <uuid>

ID of the source to delete

Responses

Response samples

Content type
application/json
{
  • "timestamp": "2019-08-24T14:15:22Z",
  • "category": "Malformed",
  • "message": "string",
  • "code": "string",
  • "details": {
    }
}