# Chat with agent Source: https://docs.peaka.com/api-reference/ai--agentv2/chat-with-agent post /ai-agent/{projectId}/chat # Chat with agent via stream Source: https://docs.peaka.com/api-reference/ai--agentv2/chat-with-agent-via-stream post /ai-agent/{projectId}/chat/stream # Delete ai-agent thread Source: https://docs.peaka.com/api-reference/ai--agentv2/delete-ai-agent-thread delete /ai-agent/{projectId}/threads/{threadId} # Get ai-agent thread Source: https://docs.peaka.com/api-reference/ai--agentv2/get-ai-agent-thread get /ai-agent/{projectId}/threads/{threadId} # Get png image of current ai workflow Source: https://docs.peaka.com/api-reference/ai--agentv2/get-png-image-of-current-ai-workflow get /ai-agent/workflow/png # List ai-agent threads Source: https://docs.peaka.com/api-reference/ai--agentv2/list-ai-agent-threads get /ai-agent/{projectId}/threads # Update ai-agent thread display name Source: https://docs.peaka.com/api-reference/ai--agentv2/update-ai-agent-thread-display-name put /ai-agent/{projectId}/threads/{threadId} # Authentication Source: https://docs.peaka.com/api-reference/authentication API Authentication ## Overview The Peaka Partner API uses API keys for authentication. There are two types of API keys: * **Partner API Key**: Grants access to all resources for partner-level access. [Learn how to manage a Partner API Key](https://www.peaka.com/docs/cookbook/how-to-manage-partner-api-key) * **Project API Key**: Grants access to resources specific to the project for which the key was created. [Learn how to generate API Keys](https://www.peaka.com/docs/cookbook/how-to-generate-api-keys) While **Project API Keys** are restricted to project-specific resources, **Partner API Keys** provide broader access across all available resources. You will see badges next to the API endpoint descriptions to indicate which type of API key can be used to access the endpoint. ## Authentication To authenticate requests, include the API key in the `Authorization` header as a Bearer token. The format is as follows: ```http theme={null} Authorization: Bearer ``` This ensures secure authentication for API requests, with access based on the type of API key used. **Example: Using a Partner API Key** A **Partner API Key** can perform all actions that a **Project API Key** can, plus additional partner-level operations. For example, to list all organizations accessible by the partner: ```http theme={null} GET api/v1/organizations Authorization: Bearer ``` This returns all organizations and related resources the partner has access to. You can also use a **Partner API Key** to access endpoints scoped to a specific project. For example, to list catalogs within a project: ```http theme={null} GET api/v1/data/projects/{projectId}/catalogs Authorization: Bearer ``` This returns data catalogs associated only with that project. **Example: Using a Project API Key** You can use a **Project API Key** to access endpoints scoped to a specific project. (Whenever you see `projects/{projectId}` in the path of an endpoint, it is scoped to the project.) For example, to list catalogs within a project: ```http theme={null} GET api/v1/data/projects/{projectId}/catalogs Authorization: Bearer ``` Replace `{projectId}` with the ID of your project. This returns data catalogs associated only with that project. # Create Connection Source: https://docs.peaka.com/api-reference/connections/create-connection post /connections/{projectId} This endpoint allows you to create a new connection for a specified project. You need to provide the project ID and the connection details in the request body. The connection details include the name, type, and credentials required for the connection. Depending on the connection type, additional parameters may be required under credentials. You can view the list of supported connection types by calling the /connections/config endpoint. You can switch examples from the second dropdown of the sample request component. (cURL (first dropdown) - Stripe Connection Request (second dropdown)) **Note**: Typically, the connection creation process involves the following steps: 1. First, learn about the connection type and the required parameters by calling the /connections/config endpoint. 2. Create a connection request with the required parameters. 3. If the connection requires Oauth2 authorization, there may be additional steps to follow. See https://docs.peaka.com/how-to-guides/how-to-create-oauth2-based-connections-via-peaka for more information. **Example**: - POSTGRES Connection Configuration: GET /connections/config endpoint displays all of the connection types. GET /connection/config/POSTGRES endpoint displays the POSTGRES connection configuration. The definition of the POSTGRES connection configuration is as follows: ``` json { "connectionType": "POSTGRES", "connectionTypeLabel": "PostgreSQL", "name": "PostgreSQL", "authorizationType": "custom", "credentialSchemaType": "postgres_credential_schema", "category": "Database", "configuration": [ { "fieldName": "url", "fieldType": "text", "required": true, "description": "URL" }, { "fieldName": "port", "fieldType": "number", "required": true, "description": "Port" }, { "fieldName": "user", "fieldType": "text", "required": true, "description": "User" }, { "fieldName": "password", "fieldType": "text", "required": true, "description": "Password" }, { "fieldName": "databaseName", "fieldType": "text", "required": true, "description": "Database Name" }, { "fieldName": "useSsl", "fieldType": "boolean", "required": true, "description": "Use SSL" } ], "documentationUrl": "https://docs.peaka.com/integrations/postgresql" } ``` According to the POSTGRES connection configuration, the connection request should include the following parameters (respecting to the required flag): - url: URL of the host IP or domain - port: Port number - user: User of the database - password: Password of the user - databaseName: Name of the database - useSsl: Boolean value to indicate whether to use SSL ``` json { "name": "examplePostgre", "type": "POSTGRES", "credential": { "url": "", "port": 5432, "user": "userOfYourDB", "password": "passwordOfUser", "databaseName": "yourDBName", "useSsl": false } } ``` # Delete Connection Source: https://docs.peaka.com/api-reference/connections/delete-connection delete /connections/{projectId}/{connectionId} Deletes the specified Connection. Any catalogs using this connection will lose access to their data source. # Get Connection Source: https://docs.peaka.com/api-reference/connections/get-connection get /connections/{projectId}/{connectionId} Returns details of a specified Connection. # Get Connection Config Source: https://docs.peaka.com/api-reference/connections/get-connection-config get /connections/config/{connectionType} Returns the configuration schema for a specific connection type, including required credential fields and their types. Use this to understand what parameters are needed when creating a connection of this type. # Get Connection Detail Source: https://docs.peaka.com/api-reference/connections/get-connection-detail get /connections/{projectId}/{connectionId}/detail Get connection detail by ID. Returns only non-sensitive information. # List Connection Config Source: https://docs.peaka.com/api-reference/connections/list-connection-config get /connections/config List all connection configurations. This will return a list of all connection configurations available in the system. # List Connections Source: https://docs.peaka.com/api-reference/connections/list-connections get /connections/{projectId} Retrieves all connections for the specified Project. A Connection represents an authenticated link to an external data source (e.g., Stripe, Airtable, PostgreSQL). # Oauth2 Callback Source: https://docs.peaka.com/api-reference/connections/oauth2-callback post /connections/{projectId}/oauth2 This callback/webhook is used while creating a new connection with Oauth2. See https://docs.peaka.com/how-to-guides/how-to-create-oauth2-based-connections-via-peaka for more information. # Update Connection Source: https://docs.peaka.com/api-reference/connections/update-connection put /connections/{projectId}/{connectionId} Updates the specified Connection. You can modify the name, credentials, or other parameters. The request body follows the same structure as the Create Connection endpoint. # Cancel Running Full Refresh Source: https://docs.peaka.com/api-reference/data--cache/cancel-running-full-refresh post /data/projects/{projectId}/cache/{cacheId}/cancelFullRefreshUpdate Cancels a currently running full refresh (resync) workflow for the specified cache. This sends a cancellation signal to the underlying Temporal workflow. The cancellation is best-effort: if the workflow has already completed or is in its final stages, the cancel request may have no effect. Only workflows with a RUNNING status can be cancelled. After successful cancellation, the cache status transitions to CANCELLED. The previously cached data remains intact (the partial refresh data is discarded). A new full refresh or incremental sync can be triggered after cancellation. This endpoint only affects the full refresh workflow. To cancel an incremental sync, use the Cancel Incremental Update endpoint instead. # Cancel Running Incremental Update Source: https://docs.peaka.com/api-reference/data--cache/cancel-running-incremental-update post /data/projects/{projectId}/cache/{cacheId}/cancelIncrementalUpdate Cancels a currently running incremental sync workflow for the specified cache. This sends a cancellation signal to the underlying Temporal workflow. The cancellation is best-effort: if the workflow has already completed or is in its final stages, the cancel request may have no effect. Only workflows with a RUNNING status can be cancelled. After successful cancellation, the cache status transitions to CANCELLED. Data that was already synced before the cancellation remains in the cache. A new incremental sync or full refresh can be triggered after cancellation. This endpoint only affects the incremental sync workflow. To cancel a full refresh, use the Cancel Full Refresh Update endpoint instead. # Create Batch Cache Source: https://docs.peaka.com/api-reference/data--cache/create-batch-cache post /data/projects/{projectId}/cache/batch Creates multiple caches in a single request. Each item in the array follows the same schema as the single create cache endpoint. Caches are created independently; if one fails, the others may still succeed. The response contains a list of results, one per requested cache, each indicating success or failure. On success, the created cache object is included. On failure, the error message is provided. This is useful when enabling caching for multiple tables at once (e.g. during initial project setup). # Create Cache Source: https://docs.peaka.com/api-reference/data--cache/create-cache post /data/projects/{projectId}/cache Creates a new cache for a specific table in a catalog. Caching copies data from an external data source into the internal Peaka BigTable store for faster query performance. Not every table can be cached: check `isCacheable` and `supportedCacheTypes` in the List Tables response before creating a cache. `supportedCacheTypes` tells which of the modes below are available for the table (`FULL_REFRESH`, `INCREMENTAL`). The cache can be configured in three modes: - **One-time cache**: No schedules provided. Data is cached once during creation and never automatically refreshed. - **Scheduled incremental updates**: Provide `incrementalCacheSchedule` to periodically sync only the changes (inserts, updates, deletes) since the last sync. - **Scheduled full refresh + incremental**: Provide both `fullRefreshCacheSchedule` and `incrementalCacheSchedule`. Full refresh drops and rebuilds the entire cached table periodically, while incremental updates run more frequently between full refreshes. After creation, the initial sync is triggered automatically based on the provided schedules. If only an incremental schedule is given, an incremental sync starts immediately. If a full refresh schedule is given, a full refresh starts immediately. The schedule `expression` uses ISO-8601 duration format (e.g. `PT6H` = every 6 hours, `PT15M` = every 15 minutes, `P1D` = every day). # Delete Cache Source: https://docs.peaka.com/api-reference/data--cache/delete-cache delete /data/projects/{projectId}/cache/{cacheId} Permanently deletes a cache and all its associated data. This operation: - Cancels any running or scheduled sync workflows (both incremental and full refresh). - Drops the cached table from the internal BigTable store. - Removes all cache settings, execution history, and status records. This action is irreversible. To re-cache the table, a new cache must be created from scratch. # Get All Cache Statuses of a Catalog Source: https://docs.peaka.com/api-reference/data--cache/get-all-cache-statuses-of-a-catalog get /data/projects/{projectId}/catalog/{catalogId}/cache/status Returns the status of all caches within a specific catalog of a project. This filters the cache list to only those belonging to the given catalog, which is useful when managing caches per data source connection. Each entry in the response array contains the same status information as the single cache status endpoint. # Get All Cache Statuses of a Project Source: https://docs.peaka.com/api-reference/data--cache/get-all-cache-statuses-of-a-project get /data/projects/{projectId}/cache/status Returns the status of all caches within a project. Each entry in the response array contains the same status information as the single cache status endpoint, including execution details for both sync types. This is useful for building a dashboard view that shows the health and progress of all cached tables in a project. # Get All Cache Statuses of a Schema Source: https://docs.peaka.com/api-reference/data--cache/get-all-cache-statuses-of-a-schema get /data/projects/{projectId}/catalog/{catalogId}/schema/{schemaName}/cache/status Returns the status of all caches within a specific schema of a catalog. This is a narrower filter than the catalog-level status endpoint, useful when a single catalog contains many schemas and only a subset is of interest. Each entry in the response array contains the same status information as the single cache status endpoint. # Get Cache Execution History Source: https://docs.peaka.com/api-reference/data--cache/get-cache-execution-history get /data/projects/{projectId}/cache/{cacheId}/executionHistory Returns a paginated list of past sync executions for the specified cache, ordered from most recent to oldest. Each entry corresponds to one sync run (either incremental or full refresh) and includes its status, progress counters, error details (if failed), and lifecycle timestamps. The `executionMode` field on each entry indicates whether that run was an incremental sync or a full refresh. Use the `limit` and `offset` query parameters to page through history; defaults are `limit=10` and `offset=0`. Execution records have a retention window of 14 days after the cache or run is finalised, after which they are automatically removed. # Get Cache Settings Source: https://docs.peaka.com/api-reference/data--cache/get-cache-settings get /data/projects/{projectId}/cache/{cacheId} Retrieves the configuration of a specific cache, including the target catalog, schema, table, and the configured incremental and full refresh schedules. Use this endpoint to inspect a cache's current settings before updating them, or to confirm the schedule configuration of a cache after creation. To check the runtime status (last execution, progress, errors) of the cache, use the Get Cache Status endpoint instead. # Get Cache Status Source: https://docs.peaka.com/api-reference/data--cache/get-cache-status get /data/projects/{projectId}/cache/{cacheId}/status Returns the current status of a specific cache, including execution details for both the last incremental sync and the last full refresh. The top-level `status` field is computed from the most recent execution across both sync types: - `NOT_INITIALIZED`: No sync has ever been executed for this cache. - `RUNNING`: At least one sync (incremental or full refresh) is currently in progress. - `COMPLETED`: The most recent sync completed successfully. - `FAILED`: The most recent sync failed. Check the `error` field in the relevant execution info for details. - `CANCELLED`: The most recent sync was cancelled via a cancel endpoint. Each execution info object (`lastIncrementalCacheExecution`, `lastFullRefreshCacheExecution`) contains: - `id`: Unique execution identifier. - `status`: Execution-specific status (RUNNING, COMPLETED, FAILED, CANCELLED). - `progress`: Real-time progress with record counts (cached, inserted, updated, deleted). - `error`: Error details if the execution failed. - `createdAt`, `updatedAt`, `finishedAt`: Timestamps tracking execution lifecycle. Use `excludeLogs=true` to omit the `cacheActionLogs` array for a lighter response, especially when polling for status during an active sync. # Trigger Full Refresh Cache Update Source: https://docs.peaka.com/api-reference/data--cache/trigger-full-refresh-cache-update post /data/projects/{projectId}/cache/{cacheId}/fullRefreshUpdate Manually triggers a full refresh (resync) for the specified cache. This drops all existing cached data and rebuilds the cache from scratch by re-reading the entire source table. Full refresh is more expensive than incremental sync but ensures complete data consistency. It is useful when the source data has drifted or when schema changes have occurred. This is a one-time manual trigger that runs independently of any configured schedule. Use the Get Cache Status endpoint to monitor the progress of the triggered refresh. The `lastFullRefreshCacheExecution` field in the status response will reflect the new execution. # Trigger Incremental Cache Update Source: https://docs.peaka.com/api-reference/data--cache/trigger-incremental-cache-update post /data/projects/{projectId}/cache/{cacheId}/incrementalUpdate Manually triggers an incremental (delta) sync for the specified cache. This syncs only the rows that have changed (inserted, updated, or deleted) since the last successful sync. Incremental sync is faster than a full refresh because it processes only the delta. This is a one-time manual trigger that runs independently of any configured schedule. If an incremental sync is already running, this call may start a new workflow that will be queued. Use the Get Cache Status endpoint to monitor the progress of the triggered sync. The `lastIncrementalCacheExecution` field in the status response will reflect the new execution. # Update Cache Settings Source: https://docs.peaka.com/api-reference/data--cache/update-cache-settings put /data/projects/{projectId}/cache/{cacheId} Updates the sync schedules of an existing cache. Use this to change how frequently the cache is refreshed. Only schedule fields are updated; the target table, catalog, and schema cannot be changed after creation. When a schedule is changed, any previously running scheduled workflow for that mode is replaced with the new schedule. Set a schedule's `type` to `NONE` to disable that particular sync mode. The schedule `expression` uses ISO-8601 duration format (e.g. `PT6H` = every 6 hours, `PT15M` = every 15 minutes, `P1D` = every day). # Create Catalog Source: https://docs.peaka.com/api-reference/data--catalogs/create-catalog post /data/projects/{projectId}/catalogs Creates a new catalog in the specified project. A catalog represents a connected data source — such as Airtable, Stripe, or Google Sheets — that exposes its schemas and tables for querying within Peaka. Requires a `name` and a `connectionId` referencing an existing connection. Some connectors accept additional `extraParameters` (e.g., Google Sheets requires specifying which sheets to include). # Delete Catalog Source: https://docs.peaka.com/api-reference/data--catalogs/delete-catalog delete /data/projects/{projectId}/catalogs/{catalogId} Permanently removes the specified catalog from the project. This disconnects the underlying data source and makes all its schemas and tables unavailable for querying. This action is irreversible. # List Catalogs Source: https://docs.peaka.com/api-reference/data--catalogs/list-catalogs get /data/projects/{projectId}/catalogs Returns all catalogs registered in the specified project. Each catalog represents a data source connected to Peaka, such as Airtable, Stripe, or an internal Peaka storage. Built-in catalog types like `internal` (Peaka Tables and BI Tables) and `query` (Peaka Queries) are always present. # List Columns Source: https://docs.peaka.com/api-reference/data--catalogs/list-columns get /data/projects/{projectId}/catalogs/{catalogId}/schemas/{schemaName}/tables/{tableName}/columns Lists all columns for a specific table within a catalog. Returns full column metadata including name, data type, display name, default value, and constraints (nullability, uniqueness). Some connectors expose additional virtual columns (prefixed with `_q_`) that can be used to pass query-time parameters to the data source. # List Schemas Source: https://docs.peaka.com/api-reference/data--catalogs/list-schemas get /data/projects/{projectId}/catalogs/{catalogId}/schemas Returns all schemas available under the specified catalog. Schemas are logical groupings of tables within a catalog. For external connectors, schemas typically correspond to databases or namespaces exposed by the data source. # List Tables Source: https://docs.peaka.com/api-reference/data--catalogs/list-tables get /data/projects/{projectId}/catalogs/{catalogId}/schemas/{schemaName}/tables Lists all tables available under the specified schema of a catalog. Each table entry includes its catalog and schema context along with caching metadata (`isCacheable`, `isDynamicTable`, `isCached`, `supportedCacheTypes`). `supportedCacheTypes` lists the cache types (`FULL_REFRESH`, `INCREMENTAL`) that can be used when creating a cache for the table; it is empty when the table is not cacheable, and absent when capability information could not be resolved. For the internal catalog, this includes [Peaka Tables](https://docs.peaka.com/connecting-your-data/peaka-table) and [Peaka BI Tables](https://docs.peaka.com/connecting-your-data/peaka-big-table). # Read Catalog Source: https://docs.peaka.com/api-reference/data--catalogs/read-catalog get /data/projects/{projectId}/catalogs/{catalogId} Retrieves the details of a single catalog by its ID. Returns the catalog's name, display name, catalog type, and the associated connection ID. # Search Source: https://docs.peaka.com/api-reference/data--catalogs/search post /data/projects/{projectId}/search Search for catalogs, schemas, and tables across the project. You can filter the search results by specifying a catalog or schema. You can also specify a limit and offset for pagination. See the request body for more details. # Share Catalog Source: https://docs.peaka.com/api-reference/data--catalogs/share-catalog post /data/projects/{projectId}/catalogs/{catalogId}/share Shares a catalog from the current project with another Peaka project. The target project gains read access to the catalog's schemas and tables. Provide the `targetProjectId` of the project you want to share the catalog with. # Table is Cached Source: https://docs.peaka.com/api-reference/data--catalogs/table-is-cached get /data/projects/{projectId}/catalogs/{catalogId}/schemas/{schemaName}/tables/{tableName}/isCached Checks whether the specified table has an active cache in Peaka. When a table is cached, its data is stored locally in Peaka, enabling significantly faster query performance compared to live queries against the original data source. Returns `isCached: true` if a cache is currently active, or `false` otherwise. The response also carries `isCacheable` and `supportedCacheTypes` (`FULL_REFRESH`, `INCREMENTAL`), so a single call is enough to decide whether — and with which schedule types — a cache can be created for the table. `supportedCacheTypes` is empty when the table is not cacheable; both fields are absent when the information could not be resolved. # Table Statistics Source: https://docs.peaka.com/api-reference/data--catalogs/table-statistics get /data/projects/{projectId}/catalogs/{catalogId}/schemas/{schemaName}/tables/{tableName}/statistics Returns statistical metadata for the specified table. Includes per-column `distinctFraction` values, which represent the estimated fraction of distinct values in a column relative to the total row count. These statistics are used internally by Peaka's query optimizer to improve query planning and execution performance. # Cancel Export Source: https://docs.peaka.com/api-reference/data--exports/cancel-export delete /data/projects/{projectId}/exports/{exportId} Cancels a PENDING/RUNNING export (kills the running query and cleans up partial artifacts). A no-op on an already-finished job. Idempotent. # Export Query (async) Source: https://docs.peaka.com/api-reference/data--exports/export-query-async post /data/projects/{projectId}/queries/{queryId}/exports Submits an async export of a saved query as CSV or JSONL. Returns immediately with a job id; poll the status endpoint for the download URLs. # Export Table (async) Source: https://docs.peaka.com/api-reference/data--exports/export-table-async post /data/projects/{projectId}/catalogs/{catalogId}/schemas/{schemaName}/tables/{tableName}/exports Submits an async export of a table as CSV or JSONL. Returns immediately with a job id; poll the status endpoint for the download URLs. # List Exports Source: https://docs.peaka.com/api-reference/data--exports/list-exports get /data/projects/{projectId}/exports Returns the project's export jobs, newest first. Files are omitted from the list (call the single-export endpoint for download URLs); each item still carries `downloadable`. # Read Export Source: https://docs.peaka.com/api-reference/data--exports/read-export get /data/projects/{projectId}/exports/{exportId} Returns the status of a single export job. For a SUCCEEDED job owned by the caller, `files` carries freshly-presigned download URLs; non-owners get the row with `downloadable=false`. # Add BI Column Source: https://docs.peaka.com/api-reference/data--internal-tables/add-bi-column post /data/projects/{projectId}/bitable/{tableName}/columns Adds one or more columns to the specified [Peaka BI Table](https://docs.peaka.com/connecting-your-data/peaka-bi-table). Each column definition includes its name, data type, display name, optional default value, and constraints (nullability, uniqueness). Peaka BI Table supports VARCHAR, BIGINT, BOOLEAN, TIMESTAMP, TIME, DATE, UUID, and DECIMAL data types. Note that JSON data type is not supported in Peaka BI Table. # Add Column Source: https://docs.peaka.com/api-reference/data--internal-tables/add-column post /data/projects/{projectId}/table/{tableName}/columns Adds one or more columns to the specified [Peaka Table](https://docs.peaka.com/connecting-your-data/peaka-table). Each column definition includes its name, data type, display name, optional default value, and constraints (nullability, uniqueness). Peaka Table supports a wide range of data types including VARCHAR, BIGINT, BOOLEAN, TIMESTAMP, TIME, DATE, UUID, DECIMAL, and JSON. # Create BI Table Source: https://docs.peaka.com/api-reference/data--internal-tables/create-bi-table post /data/projects/{projectId}/bitable/{tableName} Creates a new [Peaka BI Table](https://docs.peaka.com/connecting-your-data/peaka-bi-table) with the given name in the specified project. Peaka BI Table uses a column-oriented storage approach optimized for large datasets of over one million records, offering fast filtering and grouping performance without additional indexing. It is particularly well-suited for event data and bulk insertions. Note that JSON data type is not supported. See also: [Differences of Peaka Table and Peaka BI Table](https://docs.peaka.com/connecting-your-data/differences-of-peaka-table-and-peaka-bi-table) # Create Table Source: https://docs.peaka.com/api-reference/data--internal-tables/create-table post /data/projects/{projectId}/table/{tableName} Creates a new [Peaka Table](https://docs.peaka.com/connecting-your-data/peaka-table) with the given name in the specified project. Peaka Table is an internal relational database within Peaka that supports structured data storage with full CRUD operations. It accommodates a wide range of data types including JSON, and is best suited for smaller datasets that require frequent edits and precise changes. See also: [Differences of Peaka Table and Peaka BI Table](https://docs.peaka.com/connecting-your-data/differences-of-peaka-table-and-peaka-bi-table) # Delete BI Column Source: https://docs.peaka.com/api-reference/data--internal-tables/delete-bi-column delete /data/projects/{projectId}/bitable/{tableName}/columns/{columnName} Permanently removes a column from the specified [Peaka BI Table](https://docs.peaka.com/connecting-your-data/peaka-bi-table). This action is irreversible — the column and all its stored data will be deleted from the BI Table. # Delete BI Table Source: https://docs.peaka.com/api-reference/data--internal-tables/delete-bi-table delete /data/projects/{projectId}/bitable/{tableName} Permanently deletes the specified [Peaka BI Table](https://docs.peaka.com/connecting-your-data/peaka-bi-table) and all its data from the project. This action is irreversible — all rows, columns, and schema definitions associated with the BI Table will be removed. # Delete Column Source: https://docs.peaka.com/api-reference/data--internal-tables/delete-column delete /data/projects/{projectId}/table/{tableName}/columns/{columnName} Permanently removes a column from the specified [Peaka Table](https://docs.peaka.com/connecting-your-data/peaka-table). This action is irreversible — the column and all its stored data will be deleted from the table. # Delete Table Source: https://docs.peaka.com/api-reference/data--internal-tables/delete-table delete /data/projects/{projectId}/table/{tableName} Permanently deletes the specified [Peaka Table](https://docs.peaka.com/connecting-your-data/peaka-table) and all its data from the project. This action is irreversible — all rows, columns, and schema definitions associated with the table will be removed. # Get Sample CSV Source: https://docs.peaka.com/api-reference/data--internal-tables/get-sample-csv get /data/projects/{projectId}/table/{tableName}/sample Returns a downloadable sample CSV file for the specified internal table in a project. This CSV sample contains a few rows of mock or representative data from the table's schema. It helps users understand the structure of the table and prepare matching CSV files for import. #### Response - Content-Type: `text/csv` - Disposition: Attachment (`sample.csv`) - The first row contains column headers. - The following rows contain example values for each column. #### Example Output ``` text,num19,numcol,decimalcol "sample text",1176,1044,77.3711303273 "sample text",9354,7923,96.6658831270 "sample text",7658,8750,30.3928941706 ``` This sample can be used as a template when preparing files to upload using the `/import` endpoint. # Import CSV Source: https://docs.peaka.com/api-reference/data--internal-tables/import-csv post /data/projects/{projectId}/table/{tableName}/import Imports data from a CSV file into a specified internal table in a given project. This endpoint accepts a `multipart/form-data` request with two parts: - **file**: The CSV file to be imported. - **request**: A JSON string describing how the CSV columns map to the table's columns. CSV file format can be get from `/projects/{projectId}/table/{tableName}/sample`. #### Request JSON syntax The `request` part must contain: - `mappings`: A list of objects, each with: - `name`: The name of the target column in the internal table. - Either `csvColumnName` or `csvColumnIndex` to define the corresponding column in the CSV. - `containsHeader`: A boolean indicating whether the CSV includes a header row. #### Examples With column names: ``` { "mappings": [ { "name": "numcol", "csvColumnName": "numcol" }, { "name": "text", "csvColumnName": "text" }, { "name": "decimalcol", "csvColumnName": "decimalcol" } ], "containsHeader": true } ``` With column indexes: ``` { "mappings": [ { "name": "numcol", "csvColumnIndex": 0 }, { "name": "text", "csvColumnIndex": 1 }, { "name": "decimalcol", "csvColumnIndex": 2 } ], "containsHeader": false } ``` - When the CSV contains a header row (`containsHeader: true`), you can use either `csvColumnName` or `csvColumnIndex`. - When the CSV does **not** contain a header row (`containsHeader: false`), you **must** use `csvColumnIndex`. #### Response The endpoint currently runs synchronously and returns an `ImportJob` object with the job status and number of processed rows. In future versions, this endpoint will return only the `jobId`, and the progress/result will be tracked via a separate job status endpoint: `GET /jobs/{id}` # List BI Columns Source: https://docs.peaka.com/api-reference/data--internal-tables/list-bi-columns get /data/projects/{projectId}/bitable/{tableName}/columns Lists all columns defined in the specified [Peaka BI Table](https://docs.peaka.com/connecting-your-data/peaka-bi-table). Returns column metadata including name, data type, display name, default value, and constraints such as nullability and uniqueness. Note that Peaka BI Table does not support JSON data types. # List BI Tables Source: https://docs.peaka.com/api-reference/data--internal-tables/list-bi-tables get /data/projects/{projectId}/bitable Lists all [Peaka BI Tables](https://docs.peaka.com/connecting-your-data/peaka-bi-table) in the project. Peaka BI Table is a robust data management solution optimized for handling large datasets of over one million records. It uses a column-oriented data storage approach, resulting in exceptionally fast filtering and grouping performance without requiring additional indexing. It is particularly well-suited for event data and bulk insertions, though it does not support JSON data types. See also: [Differences of Peaka Table and Peaka BI Table](https://docs.peaka.com/connecting-your-data/differences-of-peaka-table-and-peaka-bi-table) # List Columns Source: https://docs.peaka.com/api-reference/data--internal-tables/list-columns get /data/projects/{projectId}/table/{tableName}/columns Lists all columns defined in the specified [Peaka Table](https://docs.peaka.com/connecting-your-data/peaka-table). Returns column metadata including name, data type, display name, default value, and constraints such as nullability and uniqueness. # List Tables Source: https://docs.peaka.com/api-reference/data--internal-tables/list-tables get /data/projects/{projectId}/table Lists all [Peaka Tables](https://docs.peaka.com/connecting-your-data/peaka-table) in the project. Peaka Table is an internal relational database within Peaka that allows you to organize and manage data efficiently. It supports structured data storage and enables you to add, delete, filter, and edit your data, including JSON data types. It is best suited for smaller datasets requiring frequent edits and broader data type support. See also: [Differences of Peaka Table and Peaka BI Table](https://docs.peaka.com/connecting-your-data/differences-of-peaka-table-and-peaka-bi-table) # Update BI Column Source: https://docs.peaka.com/api-reference/data--internal-tables/update-bi-column put /data/projects/{projectId}/bitable/{tableName}/columns/{columnName} Updates the definition of an existing column in the specified [Peaka BI Table](https://docs.peaka.com/connecting-your-data/peaka-bi-table). Allows modifying the column's name, display name, data type, default value, and constraints such as nullability and uniqueness. # Update Column Source: https://docs.peaka.com/api-reference/data--internal-tables/update-column put /data/projects/{projectId}/table/{tableName}/columns/{columnName} Updates the definition of an existing column in the specified [Peaka Table](https://docs.peaka.com/connecting-your-data/peaka-table). Allows modifying the column's name, display name, data type, default value, and constraints such as nullability and uniqueness. # Cancel Materialized Query Refresh Source: https://docs.peaka.com/api-reference/data--materialized-queries/cancel-materialized-query-refresh post /data/projects/{projectId}/materialized-queries/{queryId}/cancel Cancels the in-progress refresh of a materialized query, if any. # List Materialized Query Statuses Source: https://docs.peaka.com/api-reference/data--materialized-queries/list-materialized-query-statuses get /data/projects/{projectId}/materialized-queries/status Returns refresh status and schedule information for all materialized queries in the project. # Read Materialized Query Status Source: https://docs.peaka.com/api-reference/data--materialized-queries/read-materialized-query-status get /data/projects/{projectId}/materialized-queries/{queryId}/status Returns refresh status and schedule information for a single materialized query. # Refresh Materialized Query Source: https://docs.peaka.com/api-reference/data--materialized-queries/refresh-materialized-query post /data/projects/{projectId}/materialized-queries/{queryId}/refresh Triggers an immediate refresh of a materialized query. If the query has an existing schedule, the scheduled workflow is invoked; otherwise a one-time refresh is started. # Add Relation To Metadata Source: https://docs.peaka.com/api-reference/data--metadata/add-relation-to-metadata post /metadata/{projectId}/relations/{catalogId}/{schemaName}/{tableName}/{columnName} # Create golden sql for the project Source: https://docs.peaka.com/api-reference/data--metadata/create-golden-sql-for-the-project post /metadata/{projectId}/golden-sqls # Delete categorical values from the column meta and remove the scheduled job Source: https://docs.peaka.com/api-reference/data--metadata/delete-categorical-values-from-the-column-meta-and-remove-the-scheduled-job delete /metadata/{projectId}/categorical/{catalogId}/{schemaName}/{tableName}/{columnName} # Delete golden sql from the project. Source: https://docs.peaka.com/api-reference/data--metadata/delete-golden-sql-from-the-project delete /metadata/{projectId}/golden-sqls/{id} # Delete Relation From Metadata Source: https://docs.peaka.com/api-reference/data--metadata/delete-relation-from-metadata delete /metadata/{projectId}/relations/{catalogId}/{schemaName}/{tableName}/{relationId} # Generate categorical values from the column. Source: https://docs.peaka.com/api-reference/data--metadata/generate-categorical-values-from-the-column put /metadata/{projectId}/categorical/{catalogId}/{schemaName}/{tableName}/{columnName} # Generate sample ai questions for the project Source: https://docs.peaka.com/api-reference/data--metadata/generate-sample-ai-questions-for-the-project get /metadata/{projectId}/questions/generate # Generate semantics for the table Source: https://docs.peaka.com/api-reference/data--metadata/generate-semantics-for-the-table post /metadata/{projectId}/semantics/{catalogId}/{schemaName}/{tableName} # Get Metadata Refresh Job Callback Source: https://docs.peaka.com/api-reference/data--metadata/get-metadata-refresh-job-callback get /metadata/{projectId}/refresh/callback # Get Metadata Refresh Job Status Source: https://docs.peaka.com/api-reference/data--metadata/get-metadata-refresh-job-status get /metadata/{projectId}/refresh/{catalogId} # Get Project Catalog Metadata Relations Source: https://docs.peaka.com/api-reference/data--metadata/get-project-catalog-metadata-relations get /metadata/{projectId}/relations/{catalogId} # Get Project Metadata Source: https://docs.peaka.com/api-reference/data--metadata/get-project-metadata get /metadata/{projectId} # List of golden sqls for the project. Source: https://docs.peaka.com/api-reference/data--metadata/list-of-golden-sqls-for-the-project get /metadata/{projectId}/golden-sqls # Refresh Project Metadata Source: https://docs.peaka.com/api-reference/data--metadata/refresh-project-metadata post /metadata/{projectId}/refresh # Register Metadata Refresh Job Callback Source: https://docs.peaka.com/api-reference/data--metadata/register-metadata-refresh-job-callback post /metadata/{projectId}/refresh/callback # Semantic query golden sqls for the project. Source: https://docs.peaka.com/api-reference/data--metadata/semantic-query-golden-sqls-for-the-project get /metadata/{projectId}/golden-sql/query # Semantic query metadata for the project. Source: https://docs.peaka.com/api-reference/data--metadata/semantic-query-metadata-for-the-project get /metadata/{projectId}/query # Unregister Metadata Refresh Job Callback Source: https://docs.peaka.com/api-reference/data--metadata/unregister-metadata-refresh-job-callback delete /metadata/{projectId}/refresh/callback # Update Metadata Source: https://docs.peaka.com/api-reference/data--metadata/update-metadata put /metadata/{projectId}/{catalogId}/{schemaName}/{tableName} # Update Metadata ai usage per catalog level Source: https://docs.peaka.com/api-reference/data--metadata/update-metadata-ai-usage-per-catalog-level put /metadata/{projectId}/{catalogId} # Update Metadata ai usage per schema level Source: https://docs.peaka.com/api-reference/data--metadata/update-metadata-ai-usage-per-schema-level put /metadata/{projectId}/{catalogId}/{schemaName} # Update Relation From Metadata Source: https://docs.peaka.com/api-reference/data--metadata/update-relation-from-metadata put /metadata/{projectId}/relations/{catalogId}/{schemaName}/{tableName}/{relationId} # Create Parametric Table Source: https://docs.peaka.com/api-reference/data--parametric-tables/create-parametric-table post /data/projects/{projectId}/catalogs/{catalogId}/parametricTables Creates a new Parametric Table under the specified catalog. A Parametric Table binds specific query parameter values to a source table from a REST catalog, producing a new named table (e.g., `xyz_customers`) that can be queried directly without supplying those parameters at query time. For example, if the source table `customers` requires a `_q_account` parameter, you can create a Parametric Table that fixes this value and exposes the result as a standalone table. Date and timestamp parameters also accept **relative-date macros**, re-evaluated on every query, so a table saved as "this week's sales" always returns the current week. Grammar: `@[(+|-)]` - Anchors: `@today`, `@yesterday`, `@now` (current instant), `@sow` / `@eow` (week, Monday start), `@som` / `@eom` (month), `@soq` / `@eoq` (quarter), `@soy` / `@eoy` (year) - Units: `d` day, `w` week, `M` month, `q` quarter, `y` year, `h` hour, `m` minute (lowercase `m` is minute, uppercase `M` is month) - Offsets can be chained: `@today-7d`, `@som-1M`, `@now-24h` - Whitelisted Trino date expressions (e.g. `date_trunc('month', current_date)`) are accepted as well # Delete Parametric Table Source: https://docs.peaka.com/api-reference/data--parametric-tables/delete-parametric-table delete /data/projects/{projectId}/catalogs/{catalogId}/parametricTables Deletes a Parametric Table identified by its target schema and table name. The original source table is not affected. # List Parametric Tables Source: https://docs.peaka.com/api-reference/data--parametric-tables/list-parametric-tables get /data/projects/{projectId}/catalogs/{catalogId}/parametricTables Lists all Parametric Tables defined under the specified catalog. A Parametric Table is a pre-configured view of a REST-based table with fixed query parameter values (e.g., `_q_account`), allowing it to be queried like a regular table without passing those parameters each time. # Create Query Source: https://docs.peaka.com/api-reference/data--queries/create-query post /data/projects/{projectId}/queries Creates a new query under the given project. Supports plain and materialized query types. Optionally accepts a path to place the query in a folder hierarchy. A MATERIALIZED query is materialized immediately on create and its result is queryable as `"peaka"."mtquery".""`; an optional `schedule` keeps it refreshed. To materialize an existing query, send `inputQueryRefId` with the source query's id instead of `inputQuery`: a snapshot of the source SQL is taken at create time and stored as the new query's own `inputQuery` (the source query is left untouched, and later changes to it do not propagate). # Delete Query Source: https://docs.peaka.com/api-reference/data--queries/delete-query delete /data/projects/{projectId}/queries/{queryId} Permanently deletes a query by its ID. # Execute Query Source: https://docs.peaka.com/api-reference/data--queries/execute-query post /data/projects/{projectId}/queries/execute Executes a query and returns the result. Accepts a query builder object, a query ID, a query name, or a raw SQL statement. The **`format`** query parameter controls the shape of the `data` array in the response: | Value | Description | |-------|-------------| | `CELL_TYPED` *(default)* | Each cell is an object with `name`, `displayName`, `dataType`, `order`, and `value`. | | `SIMPLE` | Each row is a flat JSON object whose keys are the column names. | | `COMPACT` | Each row is a plain array of values ordered by column position. | # List Queries Source: https://docs.peaka.com/api-reference/data--queries/list-queries get /data/projects/{projectId}/queries Returns all queries belonging to the given project. Each query includes its path and folderId if it is placed in a folder. # Read Query Source: https://docs.peaka.com/api-reference/data--queries/read-query get /data/projects/{projectId}/queries/{queryId} Returns a single query by its ID. Includes path and folderId if the query is placed in a folder. # Update Query Source: https://docs.peaka.com/api-reference/data--queries/update-query put /data/projects/{projectId}/queries/{queryId} Updates the display name, SQL, or schedule of an existing query. Fields omitted from the request keep their current values. Sending `queryType: MATERIALIZED` converts a plain query into a materialized one. Sending `inputQueryRefId` re-resolves the referenced query's SQL and stores the fresh snapshot as this query's `inputQuery` — use it to re-sync a materialized query with its source. To move a query to a different folder use the Update Query Path endpoint. # Update Query Path Source: https://docs.peaka.com/api-reference/data--queries/update-query-path patch /data/projects/{projectId}/queries/{queryId}/path Moves a query to the specified folder path. The path is resolved by the backend service. # Add/Remove Queries In/From Folder Source: https://docs.peaka.com/api-reference/data--query-folders/addremove-queries-infrom-folder put /data/projects/{projectId}/queries/folders/{folderId} Moves queries into or out of a folder. Queries in queryIdsAdded are moved to the folder's path, queries in queryIdsRemoved are moved to root ("/"). # Create Query Folder Source: https://docs.peaka.com/api-reference/data--query-folders/create-query-folder post /data/projects/{projectId}/queries/folders Creates a new query folder at the root level. The folder name is used to build the path (e.g. folderName "Reports" becomes path "/Reports"). Intermediate parent folders are created automatically if a nested path is provided. # Create Query Folder Under Parent Source: https://docs.peaka.com/api-reference/data--query-folders/create-query-folder-under-parent post /data/projects/{projectId}/queries/folders/{parentFolderId} Creates a new query folder as a child of the specified parent folder. The gateway resolves the parent folder's path and creates the new folder at "{parentPath}/{folderName}". # Delete Query Folder Source: https://docs.peaka.com/api-reference/data--query-folders/delete-query-folder delete /data/projects/{projectId}/queries/folders/{folderId} Deletes a query folder by its ID. By default, only empty folders can be deleted. Set force=true to recursively delete the folder along with all its sub-folders and contained queries. # Get Query Folder Tree Source: https://docs.peaka.com/api-reference/data--query-folders/get-query-folder-tree get /data/projects/{projectId}/queries/folders/tree Returns the folder hierarchy as a tree structure. Optionally includes queries within each folder node. Use rootFolderId to get a subtree starting from a specific folder. # List Query Folders Source: https://docs.peaka.com/api-reference/data--query-folders/list-query-folders get /data/projects/{projectId}/queries/folders Returns all query folders belonging to the given project as a flat list. # Move Query Folder Source: https://docs.peaka.com/api-reference/data--query-folders/move-query-folder patch /data/projects/{projectId}/queries/folders/{folderId}/path Moves a query folder to a new path in the hierarchy. All child folders and their paths are updated accordingly. # Read Query Folder Source: https://docs.peaka.com/api-reference/data--query-folders/read-query-folder get /data/projects/{projectId}/queries/folders/{folderId} Returns a single folder by its ID, including its direct child folders and the queries it contains. # Rename Query Folder Source: https://docs.peaka.com/api-reference/data--query-folders/rename-query-folder patch /data/projects/{projectId}/queries/folders/{folderId}/name Renames a query folder. The folder's path segments are updated to reflect the new name. # Create a semantic catalog Source: https://docs.peaka.com/api-reference/data--semantic-catalogs/create-a-semantic-catalog post /data/projects/{projectId}/semantic-catalogs Creates a new Semantic Catalog in the specified Project. A Semantic Catalog is a virtual catalog that groups Semantic Tables, which are backed by saved queries. # Create a semantic table Source: https://docs.peaka.com/api-reference/data--semantic-catalogs/create-a-semantic-table post /data/projects/{projectId}/semantic-catalogs/{catalogId} Creates a new Semantic Table within a Semantic Catalog. A Semantic Table maps a saved query to a table, making it queryable via SQL like any other table. # Delete a semantic table Source: https://docs.peaka.com/api-reference/data--semantic-catalogs/delete-a-semantic-table delete /data/projects/{projectId}/semantic-catalogs/{catalogId}/table/{tableId} Deletes the specified Semantic Table from a Semantic Catalog. # Share Semantic Catalog Source: https://docs.peaka.com/api-reference/data--semantic-catalogs/share-semantic-catalog post /data/projects/{projectId}/semantic-catalogs/{catalogId}/share Shares a Semantic Catalog with another Project. The target Project gains read access to the catalog's schemas and tables. # Transpile SQL Source: https://docs.peaka.com/api-reference/data--sql/transpile-sql post /sql/transpile/{dialect} Transpiles a SQL query from Peaka's SQL dialect (Trino) into the specified target dialect (e.g., mysql, postgres, bigquery). Useful when you need to export or reuse queries written in Peaka in other database systems. # Init Session Source: https://docs.peaka.com/api-reference/embedded-peaka-api/init-session post /ui/initSession Initializes an Embedded Peaka session and returns a session URL that can be used to embed the Peaka UI in an iframe. [Embedded Peaka](https://docs.peaka.com/embedded-peaka/introduction) allows you to integrate Peaka's data management capabilities — including connections, catalogs, caching, queries, and a full UI — directly into your application. The returned sessionUrl should be loaded inside an iframe. For security, direct iframe embedding requires enabling "Embedded UI" in Developer Settings and registering your domain over HTTPS. #### Configuration options - theme / themeOverride: Customize the look and feel of the embedded UI, including custom CSS theming. - featureFlags: Control visibility of UI sections (e.g., enable/disable queries, connectors). - sessionMode: Choose between FULL_STUDIO (complete Peaka experience) or CONNECTOR_MODAL_ONLY (streamlined connector setup). - connectorType: Pre-select a specific connector type when using connector-only mode. - autoCreateCatalog: Automatically create a catalog after a connection is established. See also: [Data Management Tool with UI](https://docs.peaka.com/embedded-peaka/data-management-tool-with-ui) # Init Session (Deprecated) Source: https://docs.peaka.com/api-reference/embedded-peaka-api/init-session-deprecated get /ui/initSession Deprecated. Use POST /ui/initSession instead, which supports feature flags, session modes, and additional configuration options. Initializes an Embedded Peaka session and returns a session URL. The returned URL can be used to embed the Peaka UI in an iframe. # Introduction Source: https://docs.peaka.com/api-reference/introduction API endpoints ## Overview The Peaka Partner API is a powerful gateway that lets you seamlessly integrate Peaka's features into your own applications and services. With secure access provided through a unique API key, you can leverage the full potential of Peaka's capabilities to enhance your user experience and streamline operations. View the OpenAPI specification file Explore the Peaka Postman Collection ## Key Features * **Secure Authentication**: Access the API with confidence using the apiKey provided by Peaka, ensuring secure and authorized interactions. * **Robust Functionality**: Utilize a wide range of functions, from data retrieval to executing complex operations, all tailored to meet diverse integration needs. * **Real-Time Data Access**: Retrieve up-to-the-minute information to keep your services synchronized with the latest developments within Peaka. * **Customizable Integration**: Tailor the API's extensive features to fit your platform's specific requirements, providing a personalized experience for your users. * **Scalability**: Designed to handle requests at scale, the Peaka Partner API can accommodate growing traffic as your business expands. * **Dedicated Support**: Benefit from Peaka's dedicated support for API integration and usage. ## Getting Started * **API Key Activation**: Create your unique apiKey from the Developer section in Peaka Studio, following the [Partner API Key management guide](https://www.peaka.com/docs/cookbook/how-to-manage-partner-api-key). This key is essential for all API requests. * **Documentation**: Comprehensive documentation is provided to guide you through the integration process, detailing available endpoints, request/response formats, and best practices. ## Support and Assistance Our dedicated team is available to assist you throughout the integration process and beyond. Should you have any questions or require technical support, please reach out to our support channel. # List Organizations Source: https://docs.peaka.com/api-reference/organization--organizations/list-organizations get /organizations Retrieves all the organizations accessible by the authenticated user. An Organization is the highest-level resource that can contain multiple Workspaces. # Read Organization Source: https://docs.peaka.com/api-reference/organization--organizations/read-organization get /organizations/{organizationId} Returns the specified Organization. An Organization is the highest-level resource that can contain multiple Workspaces. # Create Project Source: https://docs.peaka.com/api-reference/organization--projects/create-project post /organizations/{organizationId}/workspaces/{workspaceId}/projects Creates a new Project within the given Workspace. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # Delete Project Source: https://docs.peaka.com/api-reference/organization--projects/delete-project delete /organizations/{organizationId}/workspaces/{workspaceId}/projects/{projectId} Deletes the specified Project within a Workspace. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # List Projects Source: https://docs.peaka.com/api-reference/organization--projects/list-projects get /organizations/{organizationId}/workspaces/{workspaceId}/projects Fetches all Projects within the given Workspace. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # Read Project Source: https://docs.peaka.com/api-reference/organization--projects/read-project get /organizations/{organizationId}/workspaces/{workspaceId}/projects/{projectId} Returns details of a specified Project. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # Update Project Source: https://docs.peaka.com/api-reference/organization--projects/update-project put /organizations/{organizationId}/workspaces/{workspaceId}/projects/{projectId} Updates the specified Project within a Workspace. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # Create Workspace Source: https://docs.peaka.com/api-reference/organization--workspaces/create-workspace post /organizations/{organizationId}/workspaces The endpoint allows you to create a new Workspace within an Organization. A Workspace is a collaborative environment within an Organization that groups Projects together. It facilitates team collaboration, resource management, and organization of data operations. The hierarchical structure in Peaka is: Organization (top-level) → Workspace → Project Projects contain data catalogs and workflows that teams manage within a Workspace. # Delete Workspace Source: https://docs.peaka.com/api-reference/organization--workspaces/delete-workspace delete /organizations/{organizationId}/workspaces/{workspaceId} Deletes a specified Workspace within an Organization. A Workspace is a collaborative environment that groups Projects to facilitate team collaboration and resource management. The hierarchical structure in Peaka is: Organization (top-level) → Workspace → Project # List Workspaces Source: https://docs.peaka.com/api-reference/organization--workspaces/list-workspaces get /organizations/{organizationId}/workspaces Returns all workspaces under the specified Organization. A Workspace is a collaborative environment within an Organization that groups Projects together. It facilitates team collaboration, resource management, and organization of data operations. The hierarchical structure in Peaka is: Organization (top-level) → Workspace → Project Projects contain data catalogs and workflows that teams manage within a Workspace. # Read Workspace Source: https://docs.peaka.com/api-reference/organization--workspaces/read-workspace get /organizations/{organizationId}/workspaces/{workspaceId} Returns details of a specified Workspace, which is a collaborative environment within an Organization that groups Projects together. A Workspace facilitates team collaboration, resource management, and organization of data operations. The hierarchical structure in Peaka is: Organization (top-level) → Workspace → Project Projects contain data catalogs and workflows that teams manage within a Workspace. # Update Workspace Source: https://docs.peaka.com/api-reference/organization--workspaces/update-workspace put /organizations/{organizationId}/workspaces/{workspaceId} Updates the specified Workspace within an Organization. A Workspace is a collaborative environment within an Organization that groups Projects together, facilitating team collaboration and resource management. The hierarchical structure in Peaka is: Organization (top-level) → Workspace → Project Projects contain data catalogs and workflows that teams manage within a Workspace. # Create API Key Source: https://docs.peaka.com/api-reference/projects--api-key/create-api-key post /projects/{projectId}/apiKeys Creates a new API Key for the specified Project. The API Key is used to authenticate requests to the Peaka API on behalf of the Project. The full key value is only returned once at creation time. Store it securely, as it cannot be retrieved later. # Delete API Key Source: https://docs.peaka.com/api-reference/projects--api-key/delete-api-key delete /projects/{projectId}/apiKeys/{apiKeyId} Deletes the specified API Key. Once deleted, any requests authenticated with this key will be rejected. # List API Keys Source: https://docs.peaka.com/api-reference/projects--api-key/list-api-keys get /projects/{projectId}/apiKeys Retrieves all API Keys associated with the specified Project. # Create Project Source: https://docs.peaka.com/api-reference/projects-deprecated/create-project post /projects Deprecated. Use the Create Project endpoint under Organization instead. Creates a new Project. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # Delete Project Source: https://docs.peaka.com/api-reference/projects-deprecated/delete-project delete /projects/{projectId} Deprecated. Use the Delete Project endpoint under Organization instead. Deletes the specified Project. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # List Projects Source: https://docs.peaka.com/api-reference/projects-deprecated/list-projects get /projects Deprecated. Use the List Projects endpoint under Organization instead. Retrieves all Projects accessible by the authenticated user. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # Read Project Source: https://docs.peaka.com/api-reference/projects-deprecated/read-project get /projects/{projectId} Deprecated. Use the Read Project endpoint under Organization instead. Returns details of a specified Project. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # Update Project Source: https://docs.peaka.com/api-reference/projects-deprecated/update-project put /projects/{projectId} Deprecated. Use the Update Project endpoint under Organization instead. Updates the specified Project. A Project is a unit of work where queries, data tables, and semantic catalogs are managed. Projects live inside Workspaces. # Servers Source: https://docs.peaka.com/api-reference/servers Available Servers ## Overview The Peaka API is hosted in two geographic zones to ensure optimal performance, compliance, and data residency for users worldwide. The available zones are the United States (US) and Europe (EU). Each zone has its own server endpoint, allowing you to choose the one that best suits your location, regulatory requirements, and latency needs. Below are the server endpoints for each zone: * **US Zone**: `https://partner.peaka.studio/api/v1` * **EU Zone**: `https://eu.partner.peaka.studio/api/v1` ## Choosing the Right Zone When deciding which server to use, consider the following factors: ### Geographic Proximity * Use the **US Zone** if your operations or users are primarily based in North America. This reduces latency and improves performance for users in that region. * Use the **EU Zone** if your operations or users are primarily based in Europe or if you need to comply with EU data protection regulations, such as GDPR. ### Compliance and Data Residency * The EU zone is designed to meet strict data residency and privacy requirements, making it ideal for organizations operating under European regulations. * The US zone is optimized for users in North America but may also be suitable for global operations outside the EU, depending on your compliance needs. ### API Functionality Both zones offer identical API functionality, endpoints, and features. The only difference is the geographic location of the servers and the domain used to access them. ## Making API Requests To interact with the Peaka API, include the appropriate base URL (depending on your chosen zone) in your API requests. For example: For a US-based request to retrieve data: ```bash theme={null} GET https://partner.peaka.studio/api/v1/supportedDrivers ``` For an EU-based request to retrieve data: ```bash theme={null} GET https://eu.partner.peaka.studio/api/v1/supportedDrivers ``` Ensure that your API key or authentication token is included in the request headers as specified in the section of this documentation. # Structure Source: https://docs.peaka.com/api-reference/structure Understanding the core components and their relationships in the Peaka API ecosystem. # Peaka API Architecture Overview Peaka provides a structured environment for managing data integrations and analytics. Understanding the hierarchy and relationships between its core components is essential for effective utilization. ```mermaid theme={null} graph TD A[Organization] B1[Workspace 1] B2[Workspace 2] C1[Project 1] C2[Project 2] C3[Project 3] E1[Catalog 1] E2[Catalog 2] E3[Catalog 3] E4[Catalog 4] E5[Catalog 5] E6[Catalog 6] A --> B1 A --> B2 B1 --> C1 B2 --> C2 B2 --> C3 C1 --> E1 C1 --> E2 C1 --> E3 C2 --> E4 C2 --> E5 C2 --> E6 ``` ## 🔹 Organization * **Definition**: The top-level entity representing a business or team within Peaka. * **Role**: Serves as the container for all workspaces, projects, and associated resources. * **API Endpoint**: `GET /organizations` to list all organizations. ## 🔹 Workspace * **Definition**: A collaborative environment within an organization where teams can manage projects. * **Role**: Facilitates team collaboration and resource management within an organization. * **API Endpoint**: `GET /organizations/{organizationId}/workspaces` to list workspaces within an organization. ## 🔹 Project * **Definition**: A unit within a workspace where data connections are established and workflows are executed. This is the core component of Peaka. Projects are isolated from other projects within the same workspace. You can create **Project Api Key**s to enable access to only this project without access to other projects. * **Role**: Central unit for data operations, including queries, tables, and integrations. * **API Endpoint**: `POST /organizations/{organizationId}/workspaces/{workspaceId}/projects` to create a new project. ## 🔹 Connection * **Definition**: A configuration that links a project to external data sources, such as databases or APIs, including necessary credentials. * **Role**: Holds the necessary details for connecting to external data sources. * **API Endpoint**: `POST /projects/{projectId}/connections` to establish a new connection. * **Note**: A single connection can be used to create multiple catalogs, allowing for the reuse of credentials across different catalogs of same external data source. ## 🔹 Catalog * **Definition**: A structured representation of data schemas and tables associated with a connection. * **Role**: Provides metadata and structure for querying and analyzing data. * **API Endpoint**: `POST /projects/{projectId}/catalogs` to create a catalog using a connection. * **Note**: Multiple catalogs can be created from a single connection, each representing different naming of same external source. # Get JDBC Driver Source: https://docs.peaka.com/api-reference/supported-drivers/get-jdbc-driver get /supportedDrivers/jdbc Returns the JDBC connection string for connecting to Peaka's query engine from JDBC-compatible tools. # Get SQL Alchemy Driver Source: https://docs.peaka.com/api-reference/supported-drivers/get-sql-alchemy-driver get /supportedDrivers/sql_alchemy Returns the SQL Alchemy connection string for connecting to Peaka's query engine. SQL Alchemy supports only one catalog at a time, so a catalogName must be provided. # List Supported Drivers Source: https://docs.peaka.com/api-reference/supported-drivers/list-supported-drivers get /supportedDrivers Returns connection strings for all supported drivers (JDBC, SQL Alchemy). These can be used to connect to Peaka's query engine from external tools.