# Catalog Protocol
Use the runtime catalog as the source of truth. Generated references are a fast index; command execution details come from the CLI itself.
## Search
Run `trieve search "<intent>" --json` to find candidate commands. Use `--limit` to control result count. Treat search output as candidates only.
## Full Catalog
Run `trieve commands --json` to inspect the generated command catalog. Use `--include-hidden` only when hidden commands are relevant.
Key fields:
- `path`: command path to pass to `commands show` or execute after the CLI name.
- `shortcuts`: root-level commands that execute the same operation with preset flag values.
- `http`: HTTP method and path template.
- `http.default_hostname`: optional source-level host used after `--hostname`, `$TRIEVE_HOST`, and the host selected with `auth use`, and before the single-host fallback from `hosts.yml`.
- `flags`: CLI flags, parameter location, type, required state, defaults, enum values, format, input modes, and help.
- `body`: request body requirement, media type, and optional `runtime_schema` preflight source, including its active-context prerequisites.
- `auth`: `required`, declared `scopes`, and `requirements` — any one entry satisfies the command, every scheme inside an entry is required, `{}` allows anonymous access; execution fails with `not_authenticated` before sending when the stored credential plus header and query parameters satisfy no entry.
- `mutation`: `read`, `write`, or `unknown`. Do not infer write vs read from the HTTP method alone. Treat any value other than `read` as requiring preview when `dry_run.mode` is `http_preview`, or explicit user confirmation when preview is unavailable.
- `dry_run`: preview contract. `http_preview` is declared only when the generated runner can preview; use `--<flag>` and print the resolved HTTP request JSON. `unsupported` means the command has no preview, including all workflow commands. A `--dry-run` flag on a custom command is not a preview contract.
- `examples`: runnable examples with optional body shape, output hints, and follow-up commands.
- `output`: list path, default columns, response media type, pagination, streaming hints, and `binary.flag` for binary downloads; a streaming policy describes collection, terminal outcomes, and optional live projection.
- `output.column_formats`: `kind: count` shows an array length in table output only.
- `flags[].context`: an optional account-scoped default with explicit flag, declared environment, then stored-value precedence.
- `sets_context`: a successful operation persists its declared parameter as the selected host's active context.
- `notes`, `prerequisites`, and `known_errors`: overlay-provided operation context that is not inferred from the API spec.
## Command Detail
Run `trieve commands show <path...> --json` before executing an unfamiliar command. This is the source of truth for flags, body, auth, HTTP path, `mutation`, `dry_run`, and output hints.
## Schema
Run `trieve commands schema --json` to read `catalog_schema_version`, `surfaces`, and `dry_run.result` before parsing catalog JSON with durable tooling. `dry_run.result=http_preview` means a preview prints the resolved HTTP request JSON (`method`, `url`, `hostname`, `host_source`, `headers`, `body`, `auth`, `output`).
## Sensitive Flags
When a flag entry has `input_modes`, prefer safe modes over putting secrets directly in shell arguments.
- `flag`: pass the direct `--<flag>` value; keep this for compatibility or non-secret values.
- `env`: pass `--<flag>-env NAME` to read the value from an environment variable.
- `file`: pass `--<flag>-file path` to read the value from a file.
- `stdin`: pass `--<flag>-stdin` to read the value from stdin.
- Use only one input mode for the same flag.
## Request Bodies
- `--file path`: read a JSON body from a file.
- `--file -`: read a JSON body from stdin.
- `--set key.path=value`: build JSON with type inference for booleans, null, integers, and floats.
- `--set-str key.path=value`: build JSON while forcing the value to remain a string.
JSON `body.schema` validates compiled types, nullable values, nested properties/items, required fields, and resolved `allOf` structure before sending, including during dry-run and workflows. For templates, it validates `body.merge_path`. Enum, format, unions, additional properties, and unresolved references are outside this static preflight. Failures exit 2 and identify the body path without body values.
If `body.runtime_schema` is present, normal execution fetches that JSON Schema and validates the body before the target request. An `http_preview` dry-run does not fetch it.
## Output
Use `-o json` for machine-readable command output. Other supported formats are `table`, `yaml`, and `raw`. For collected streams, choose one mode: JSON or YAML for one document, `--stream` in the default output mode when `output.streaming.policy.live` is present, or raw for wire events.
When `output.binary` is present, success output is raw bytes. Pass `--<output.binary.flag> <new-path>` (it refuses existing paths; choose a path the user approved) or `-` only when piping to another program, never into the conversation. `-o` then affects only error output.
On a non-zero exit with JSON or YAML output, read `error.code`, `error.message`, and `error.hint`; optional `error.http` contains only `status`. A configured pause exits zero and is represented by the field mapping in its stream collection policy.
## Auth
If command detail returns `auth.required=true`, run `trieve auth status -o json` before execution and read `hostname` and `source`. Host resolution order: `--hostname` > `$TRIEVE_HOST` > the selected host (`trieve auth use <host>`) > `http.default_hostname` > the single host in `hosts.yml`. When more than one host is logged in and the host was chosen implicitly, the CLI also prints a `current host: <name>` line on stderr; read provenance from `auth status`, not from that line. If no matching host is logged in, stop and ask the user to authenticate. Map that status to declared schemes: bearer satisfies http bearer, oauth2, and openIdConnect; basic satisfies http basic; apikey satisfies an apiKey header whose name is `param`, or any http scheme when stored for the `Authorization` header; header or query parameters passed to the command can supply apiKey schemes.
## Cloudflare Access
Before Access setup, run `trieve commands --include-hidden --json`. Read `auth.required` for every entry in `commands`.
If no command has `auth.required=true`, report: "This CLI cannot enable Cloudflare Access in this version." Stop here. Do not run the Access login or API login steps below.
Only if at least one command has `auth.required=true`, continue with the following Access setup.
If the host requires Cloudflare Access, replace `api.example` below with its hostname, including any non-default port. Ask the user to complete these steps in order:
1. Install `cloudflared` on `PATH`.
2. Run `cloudflared access login --quiet https://api.example` for the actual HTTPS origin.
3. Run `trieve auth login --hostname api.example --cloudflare-access` and complete normal API login.
Access login does not replace API authentication. Use the same explicit `--hostname` for status and execution. In `auth status -o json`, `hosts[].cloudflare_access` reports only the saved switch, not token validity. Status does not contact the host or invoke `cloudflared`.
A later API login preserves the switch. Use `trieve auth login --hostname api.example --cloudflare-access=false` to disable it. The first real request obtains a token for the exact HTTPS origin and reuses it within the invocation. Lathe does not persist Access tokens or read or write the `cloudflared` cache. Disabled hosts, HTTP dry-runs, help, and verification never obtain Access tokens. The updater does not use host Access configuration.
Access requires HTTPS with certificate verification and conflicts with `--insecure` or a saved insecure setting. Tokens do not apply to subdomains or other ports. Enabled requests refuse redirects to another origin.
A 302 to `*.cloudflareaccess.com` supplies an error hint only. Never enable Access or run a command from that redirect. Lathe does not start Access browser login or automatically replay the request. If Access login expires, ask the user to repeat Access login before another API attempt.
One origin must use one Access application. Different application audiences by path are unsupported. A CLI whose commands all report `auth.required=false` cannot enable Access in this version. There is no separate configuration command. Credentials for an old proxy host are not migrated or deleted.
# Module `Trieve API`
## Source
- Backend: `openapi3`
- Default hostname: `api.trieve.ai`
- Source kind: `git`
- Repository: `https://github.com/devflowinc/trieve.git`
- Pinned tag: `a99b21e23f21025757b44efb594676c4a7b7495f`
- Files: `clients/ts-sdk/openapi.json`
- Resolved SHA: `a99b21e23f21025757b44efb594676c4a7b7495f`
- Reproducible: yes
## Analytics
- Description: Analytics endpoint. Used to get information for search and RAG analytics
### `trieve Trieve API analytics get-all-events`
- Summary: Get All User Events
- HTTP: `POST /api/analytics/events/all`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
- Output: list path `events`; columns `id`, `created_at`, `dataset_id`, `event_name`, `event_type`, `is_conversion`; response media `application/json`
### `trieve Trieve API analytics get-analytics`
- Summary: Get Analytics
- HTTP: `POST /api/analytics`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API analytics get-cluster-analytics`
- Summary: Get Cluster Analytics
- HTTP: `POST /api/analytics/search/cluster`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API analytics get-component-analytics`
- Summary: Get Component Analytics
- HTTP: `POST /api/analytics/events/component`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API analytics get-ctr-analytics`
- Summary: Get CTR Analytics
- HTTP: `POST /api/analytics/events/ctr`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API analytics get-event-by-id`
- Summary: Get User Event By ID
- HTTP: `GET /api/analytics/events/{event_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--event-id` (path, required, uuid): The event id to use for the request
- Output: list path `items`; response media `application/json`
### `trieve Trieve API analytics get-rag-analytics`
- Summary: Get RAG Analytics
- HTTP: `POST /api/analytics/rag`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API analytics get-recommendation-analytics`
- Summary: Get Recommendation Analytics
- HTTP: `POST /api/analytics/recommendations`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API analytics get-search-analytics`
- Summary: Get Search Analytics
- HTTP: `POST /api/analytics/search`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API analytics get-top-datasets`
- Summary: Get Top Datasets
- HTTP: `POST /api/analytics/top`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- Output: columns `dataset_id`, `dataset_tracking_id`, `total_queries`; response media `application/json`
### `trieve Trieve API analytics send-ctr-data`
- Summary: Send CTR Data
- HTTP: `PUT /api/analytics/ctr`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
### `trieve Trieve API analytics send-event-data`
- Summary: Send User Event Data
- HTTP: `PUT /api/analytics/events`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
### `trieve Trieve API analytics set-rag-query-rating`
- Summary: Rate RAG
- HTTP: `PUT /api/analytics/rag`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
### `trieve Trieve API analytics set-search-query-rating`
- Summary: Rate Search
- HTTP: `PUT /api/analytics/search`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
## Auth
- Description: Authentication endpoint. Serves to register and authenticate users.
### `trieve Trieve API auth create-api-only-user`
- Summary: create_api_only_user
- HTTP: `POST /api/auth/create_api_only_user`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
- Output: response media `application/json`
### `trieve Trieve API auth get-me`
- Summary: Get Me
- HTTP: `GET /api/auth/me`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: list path `orgs`; columns `name`, `id`, `created_at`, `deleted`, `partner_configuration`, `registerable`; response media `application/json`
### `trieve Trieve API auth login`
- Summary: Login
- HTTP: `GET /api/auth`
- Auth: required
- Body: none
- Flags:
- `--organization-id` (query, uuid): ID of organization to authenticate into
- `--redirect-uri` (query): URL to redirect to after successful login
- `--inv-code` (query, uuid): Code sent via email as a result of successful call to send_invitation
### `trieve Trieve API auth logout`
- Summary: Logout
- HTTP: `DELETE /api/auth`
- Auth: required
- Body: none
- Flags: none
### `trieve Trieve API auth oidc-callback`
- Summary: OpenID Connect callback
- HTTP: `GET /api/auth/callback`
- Auth: required
- Body: none
- Flags: none
- Output: list path `orgs`; columns `name`, `id`, `created_at`, `deleted`, `partner_configuration`, `registerable`; response media `application/json`
## Chunk
- Description: Chunk endpoint. Think of chunks as individual searchable units of information. The majority of your integration will likely be with the Chunk endpoint.
### `trieve Trieve API chunk autocomplete`
- Summary: Autocomplete
- HTTP: `POST /api/chunk/autocomplete`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- Output: response media `application/json`
### `trieve Trieve API chunk bulk-delete-chunk`
- Summary: Bulk Delete Chunks
- HTTP: `DELETE /api/chunk`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
### `trieve Trieve API chunk count-chunks`
- Summary: Count chunks above threshold
- HTTP: `POST /api/chunk/count`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API chunk create-chunk`
- Summary: Create or Upsert Chunk or Chunks
- HTTP: `POST /api/chunk`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API chunk delete-chunk`
- Summary: Delete Chunk
- HTTP: `DELETE /api/chunk/{chunk_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--chunk-id` (path, required, uuid): Id of the chunk you want to fetch.
### `trieve Trieve API chunk delete-chunk-by-tracking-id`
- Summary: Delete Chunk By Tracking Id
- HTTP: `DELETE /api/chunk/tracking_id/{tracking_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--tracking-id` (path, required): tracking_id of the chunk you want to delete
### `trieve Trieve API chunk generate-off-chunks`
- Summary: RAG on Specified Chunks
- HTTP: `POST /api/chunk/generate`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `text/plain`
### `trieve Trieve API chunk get-chunk-by-id`
- Summary: Get Chunk By Id
- HTTP: `GET /api/chunk/{chunk_id}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- `--chunk-id` (path, required, uuid): Id of the chunk you want to fetch.
- Output: response media `application/json`
### `trieve Trieve API chunk get-chunk-by-tracking-id`
- Summary: Get Chunk By Tracking Id
- HTTP: `GET /api/chunk/tracking_id/{tracking_id}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- `--tracking-id` (path, required): tracking_id of the chunk you want to fetch
- Output: response media `application/json`
### `trieve Trieve API chunk get-chunks-by-ids`
- Summary: Get Chunks By Ids
- HTTP: `POST /api/chunks`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- Output: response media `application/json`
### `trieve Trieve API chunk get-chunks-by-tracking-ids`
- Summary: Get Chunks By Tracking Ids
- HTTP: `POST /api/chunks/tracking`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- Output: response media `application/json`
### `trieve Trieve API chunk get-recommended-chunks`
- Summary: Get Recommended Chunks
- HTTP: `POST /api/chunk/recommend`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- Output: response media `application/json`
### `trieve Trieve API chunk get-suggested-queries`
- Summary: Generate suggested queries
- HTTP: `POST /api/chunk/suggestions`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: list path `queries`; response media `application/json`
### `trieve Trieve API chunk scroll-dataset-chunks`
- Summary: Scroll Chunks
- HTTP: `POST /api/chunks/scroll`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: list path `chunks`; columns `id`, `chunk_html`, `created_at`, `dataset_id`, `link`, `location`; response media `application/json`
### `trieve Trieve API chunk search-chunks`
- Summary: Search
- HTTP: `POST /api/chunk/search`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- Output: response media `application/json`
### `trieve Trieve API chunk split-html-content`
- Summary: Split HTML Content into Chunks
- HTTP: `POST /api/chunk/split`
- Auth: required
- Body: required; media type `application/json`
- Flags: none
- Output: list path `chunks`; columns `body`; response media `application/json`
### `trieve Trieve API chunk update-chunk`
- Summary: Update Chunk
- HTTP: `PUT /api/chunk`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
### `trieve Trieve API chunk update-chunk-by-tracking-id`
- Summary: Update Chunk By Tracking Id
- HTTP: `PUT /api/chunk/tracking_id/update`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
## Chunk Group
- Description: Chunk groups endpoint. Think of a chunk_group as a bookmark folder within the dataset.
### `trieve Trieve API chunk add-chunk-to-group`
- Summary: Add Chunk to Group
- HTTP: `POST /api/chunk_group/chunk/{group_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--group-id` (path, required, uuid): Id of the group to add the chunk to as a bookmark
### `trieve Trieve API chunk add-chunk-to-group-by-tracking-id`
- Summary: Add Chunk to Group by Tracking ID
- HTTP: `POST /api/chunk_group/tracking_id/{tracking_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--tracking-id` (path, required): Tracking id of the group to add the chunk to as a bookmark
### `trieve Trieve API chunk autocomplete-search-over-groups`
- Summary: Autocomplete Search Over Groups
- HTTP: `POST /api/chunk_group/group_oriented_autocomplete`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- Output: list path `results`; columns `file_id`; response media `application/json`
### `trieve Trieve API chunk count-group-chunks`
- Summary: Count Chunks in a Group
- HTTP: `POST /api/chunk_group/count`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API chunk create-chunk-group`
- Summary: Create or Upsert Group or Groups
- HTTP: `POST /api/chunk_group`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API chunk delete-chunk-group`
- Summary: Delete Group
- HTTP: `DELETE /api/chunk_group/{group_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--group-id` (path, required, uuid): Id of the group you want to fetch.
- `--delete-chunks` (query, required): Delete the chunks within the group
### `trieve Trieve API chunk delete-group-by-tracking-id`
- Summary: Delete Group by Tracking ID
- HTTP: `DELETE /api/chunk_group/tracking_id/{tracking_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--tracking-id` (path, required): Tracking id of the chunk_group to delete
- `--delete-chunks` (query, required): Delete the chunks within the group
### `trieve Trieve API chunk get-chunk-group`
- Summary: Get Group
- HTTP: `GET /api/chunk_group/{group_id}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--group-id` (path, required, uuid): Id of the group you want to fetch.
- Output: list path `tag_set`; response media `application/json`
### `trieve Trieve API chunk get-chunks-in-group`
- Summary: Get Chunks in Group
- HTTP: `GET /api/chunk_group/{group_id}/{page}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--group-id` (path, required, uuid): Id of the group you want to fetch.
- `--x-api-version` (header): The version of the API to use for the request
- `--page` (path, required, int64): The page of chunks to get from the group
- Output: response media `application/json`
### `trieve Trieve API chunk get-chunks-in-group-by-tracking-id`
- Summary: Get Chunks in Group by Tracking ID
- HTTP: `GET /api/chunk_group/tracking_id/{group_tracking_id}/{page}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--group-tracking-id` (path, required): The id of the group to get the chunks from
- `--x-api-version` (header): The version of the API to use for the request
- `--page` (path, required, int64): The page of chunks to get from the group
- Output: response media `application/json`
### `trieve Trieve API chunk get-group-by-tracking-id`
- Summary: Get Group by Tracking ID
- HTTP: `GET /api/chunk_group/tracking_id/{tracking_id}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--tracking-id` (path, required): The tracking id of the group to fetch.
- Output: list path `tag_set`; response media `application/json`
### `trieve Trieve API chunk get-groups-for-chunks`
- Summary: Get Groups for Chunks
- HTTP: `POST /api/chunk_group/chunks`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: columns `chunk_uuid`; response media `application/json`
### `trieve Trieve API chunk get-groups-for-dataset`
- Summary: Get Groups for Dataset
- HTTP: `GET /api/dataset/groups/{dataset_id}/{page}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--dataset-id` (path, required, uuid): The id of the dataset to fetch groups for.
- `--page` (path, required, int64): The page of groups to fetch. Page is 1-indexed. Only used if `use_cursor` = `false`.
- `--use-cursor` (query): Flag to enable `cursor` mode, this runs faster for large scroll operations. Defaults to false
- `--cursor` (query, uuid): The cursor offset for. Requires `use_cursor` = True. Defaults to `00000000-00000000-00000000-00000000`. Group ids are compared to the cursor using a greater than or equal to.
- Output: list path `groups`; columns `name`, `id`, `created_at`, `dataset_id`, `description`, `file_id`; response media `application/json`; pagination `cursor`
### `trieve Trieve API chunk get-recommended-groups`
- Summary: Get Recommended Groups
- HTTP: `POST /api/chunk_group/recommend`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- Output: response media `application/json`
### `trieve Trieve API chunk remove-chunk-from-group`
- Summary: Remove Chunk from Group
- HTTP: `DELETE /api/chunk_group/chunk/{group_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--group-id` (path, required, uuid): Id of the group you want to remove the chunk from.
- `--chunk-id` (query, uuid): Id of the chunk you want to remove from the group
### `trieve Trieve API chunk search-over-groups`
- Summary: Search Over Groups
- HTTP: `POST /api/chunk_group/group_oriented_search`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- Output: response media `application/json`
### `trieve Trieve API chunk search-within-group`
- Summary: Search Within Group
- HTTP: `POST /api/chunk_group/search`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--x-api-version` (header): The API version to use for this request. Defaults to V2 for orgs created after July 12, 2024 and V1 otherwise.
- Output: response media `application/json`
### `trieve Trieve API chunk update-chunk-group`
- Summary: Update Group
- HTTP: `PUT /api/chunk_group`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
## Crawl
- Description: Crawl endpoint. Used to create and manage crawls for datasets.
### `trieve Trieve API crawl create-crawl`
- Summary: Create a new crawl request
- HTTP: `POST /api/crawl`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- Output: response media `application/json`
### `trieve Trieve API crawl delete-crawl-request`
- Summary: Delete a crawl request
- HTTP: `DELETE /api/crawl/{crawl_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- `--crawl-id` (path, required, uuid): The id of the crawl to delete
### `trieve Trieve API crawl get-crawl-requests-for-dataset`
- Summary: Get all crawl requests for a dataset
- HTTP: `GET /api/crawl`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- `--page` (query, int64): The page number to retrieve
- `--limit` (query, int64): The number of items to retrieve per page
- Output: columns `id`, `attempt_number`, `crawl_type`, `created_at`, `dataset_id`, `interval`; response media `application/json`; pagination `offset`
### `trieve Trieve API crawl update-crawl-request`
- Summary: Update a crawl request
- HTTP: `PUT /api/crawl`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- Output: response media `application/json`
## Dataset
- Description: Dataset endpoint. Datasets belong to organizations and hold configuration information for both client and server. Datasets contain chunks and chunk groups.
### `trieve Trieve API dataset batch-create-datasets`
- Summary: Batch Create Datasets
- HTTP: `POST /api/dataset/batch_create_datasets`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- Output: columns `name`, `id`, `created_at`, `deleted`, `organization_id`, `server_configuration`; response media `application/json`
### `trieve Trieve API dataset clear-dataset`
- Summary: Clear Dataset
- HTTP: `PUT /api/dataset/clear/{dataset_id}`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--dataset-id` (path, required, uuid): The id of the dataset you want to clear.
### `trieve Trieve API dataset clone-dataset`
- Summary: Clone Dataset
- HTTP: `POST /api/dataset/clone`
- Auth: required
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- Output: response media `application/json`
### `trieve Trieve API dataset create-dataset`
- Summary: Create Dataset
- HTTP: `POST /api/dataset`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- Output: response media `application/json`
### `trieve Trieve API dataset create-etl-job`
- Summary: Create ETL Job
- HTTP: `POST /api/etl/create_job`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
### `trieve Trieve API dataset create-pagefind-index-for-dataset`
- Summary: Create Pagefind Index for Dataset
- HTTP: `PUT /api/dataset/pagefind`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
### `trieve Trieve API dataset delete-dataset`
- Summary: Delete Dataset
- HTTP: `DELETE /api/dataset/{dataset_id}`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--dataset-id` (path, required, uuid): The id of the dataset you want to delete.
### `trieve Trieve API dataset delete-dataset-by-tracking-id`
- Summary: Delete Dataset by Tracking ID
- HTTP: `DELETE /api/dataset/tracking_id/{tracking_id}`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--tracking-id` (path, required): The tracking id of the dataset you want to delete.
### `trieve Trieve API dataset get-all-tags`
- Summary: Get All Tags
- HTTP: `POST /api/dataset/get_all_tags`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: list path `tags`; columns `count`, `tag`; response media `application/json`
### `trieve Trieve API dataset get-dataset`
- Summary: Get Dataset By ID
- HTTP: `GET /api/dataset/{dataset_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--dataset-id` (path, required, uuid): The id of the dataset you want to retrieve.
- Output: response media `application/json`
### `trieve Trieve API dataset get-dataset-by-tracking-id`
- Summary: Get Dataset by Tracking ID
- HTTP: `GET /api/dataset/tracking_id/{tracking_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--tracking-id` (path, required): The tracking id of the dataset you want to retrieve.
- Output: response media `application/json`
### `trieve Trieve API dataset get-dataset-queue-lengths`
- Summary: Get file and chunk creation queue lengths
- HTTP: `GET /api/dataset/get_dataset_queue_lengths`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API dataset get-datasets-from-organization`
- Summary: Get Datasets from Organization
- HTTP: `GET /api/dataset/organization/{organization_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--organization-id` (path, required, uuid): id of the organization you want to retrieve datasets for
- `--limit` (query, int64): The number of records to return
- `--offset` (query, int64): The number of records to skip
- Output: response media `application/json`; pagination `offset`
### `trieve Trieve API dataset get-events`
- Summary: Get events for the dataset
- HTTP: `POST /api/dataset/events`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: list path `event_types`; response media `application/json`
### `trieve Trieve API dataset get-pagefind-index-for-dataset`
- Summary: Get Pagefind Index Url for Dataset
- HTTP: `GET /api/dataset/pagefind`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API dataset get-usage-by-dataset-id`
- Summary: Get Usage By Dataset ID
- HTTP: `GET /api/dataset/usage/{dataset_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--dataset-id` (path, required, uuid): The id of the dataset you want to retrieve usage for.
- Output: response media `application/json`
### `trieve Trieve API dataset update-dataset`
- Summary: Update Dataset by ID or Tracking ID
- HTTP: `PUT /api/dataset`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- Output: response media `application/json`
## Experiment
- Description: Experiment endpoint. Used to create and manage experiments
### `trieve Trieve API experiment ab-test`
- Summary: Ab Test
- HTTP: `POST /api/experiment/ab-test`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- Output: response media `application/json`
### `trieve Trieve API experiment create-experiment`
- Summary: Create Experiment
- HTTP: `POST /api/experiment`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- Output: response media `application/json`
### `trieve Trieve API experiment delete-experiment`
- Summary: Delete Experiment
- HTTP: `DELETE /api/experiment/{experiment_id}`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- `--experiment-id` (path, required, uuid): experiment_id
### `trieve Trieve API experiment get-experiment`
- Summary: Get Experiment by ID
- HTTP: `GET /api/experiment/{experiment_id}`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--experiment-id` (path, required, uuid): The experiment id to use for the request
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- Output: response media `application/json`
### `trieve Trieve API experiment get-experiments`
- Summary: Get Experiments
- HTTP: `GET /api/experiment`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- Output: columns `name`, `id`, `area`, `control_name`, `control_split`, `created_at`; response media `application/json`
### `trieve Trieve API experiment update-experiment`
- Summary: Update Experiment
- HTTP: `PUT /api/experiment`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id to use for the request
- Output: response media `application/json`
## File
- Description: File endpoint. When files are uploaded, they are stored in S3 and broken up into chunks with text extraction from Apache Tika. You can upload files of pretty much any type up to 1GB in size. See chunking algorithm details at `docs.trieve.ai` for more information on how chunking works. Improved default chunking is on our roadmap.
### `trieve Trieve API file create-presigned-url-for-csv-jsonl`
- Summary: Create Presigned CSV/JSONL S3 PUT URL
- HTTP: `POST /api/file/csv_or_jsonl`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API file delete-file-handler`
- Summary: Delete File
- HTTP: `DELETE /api/file/{file_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--file-id` (path, required, uuid): The id of the file to delete
- `--delete-chunks` (query, required): Delete the chunks within the group
### `trieve Trieve API file get-dataset-files-and-group-ids-handler`
- Summary: Get Files and Group IDs for Dataset
- HTTP: `GET /api/dataset/files/{dataset_id}/{page}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--dataset-id` (path, required, uuid): The id of the dataset to fetch files for.
- `--page` (path, required, int64): The page number of files you wish to fetch. Each page contains at most 10 files.
- Output: list path `file_and_group_ids`; columns `group_id`; response media `application/json`
### `trieve Trieve API file get-file-handler`
- Summary: Get File with Signed URL
- HTTP: `GET /api/file/{file_id}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--file-id` (path, required, uuid): The id of the file to fetch
- `--ttl` (query, int32): The time to live of the signed url in seconds
- `--content-type` (query): Optional field to override the presigned url's Content-Type header
- Output: list path `tag_set`; response media `application/json`
### `trieve Trieve API file get-files-cursor-handler`
- Summary: Scroll Files with Groups
- HTTP: `GET /api/dataset/scroll_files`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--cursor` (query, uuid): The cursor to fetch files from. If not specified, will fetch from the beginning. File ids are compared to the cursor using a greater than or equal to.
- `--page-size` (query, int64): The page size of files you wish to fetch. Defaults to 10.
- Output: list path `file_with_chunk_groups`; columns `id`, `created_at`, `dataset_id`, `file_name`, `link`, `metadata`; response media `application/json`; pagination `cursor`
### `trieve Trieve API file upload-file-handler`
- Summary: Upload File
- HTTP: `POST /api/file`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API file upload-html-page`
- Summary: Upload HTML Page
- HTTP: `POST /api/file/html_page`
- Auth: required
- Body: required; media type `application/json`
- Flags: none
## Health
- Description: Health check endpoint. Used to check if the server is up and running.
### `trieve Trieve API health check`
- Summary: Health Check
- HTTP: `GET /api/health`
- Auth: required
- Body: none
- Flags: none
## Invitation
- Description: Invitation endpoint. Exists to invite users to an organization.
### `trieve Trieve API invitation delete-invitation`
- Summary: Delete Invitation
- HTTP: `DELETE /api/invitation/{invitation_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--invitation-id` (path, required, uuid): The id of the invitation to delete
### `trieve Trieve API invitation get-invitations`
- Summary: Get Invitations
- HTTP: `GET /api/invitations/{organization_id}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--organization-id` (path, required, uuid): The organization id to get invitations for
- Output: columns `id`, `created_at`, `email`, `organization_id`, `role`, `updated_at`; response media `application/json`
### `trieve Trieve API invitation post-invitation`
- Summary: Send Invitation
- HTTP: `POST /api/invitation`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
## Message
- Description: Message chat endpoint. Messages are units belonging to a topic in the context of a chat with a LLM. There are system, user, and assistant messages.
### `trieve Trieve API message create-message`
- Summary: Create message
- HTTP: `POST /api/message`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `text/plain`
### `trieve Trieve API message edit-image`
- Summary: Edit Image
- HTTP: `POST /api/message/edit_image`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: list path `image_urls`; response media `application/json`
### `trieve Trieve API message edit-message`
- Summary: Edit message
- HTTP: `PUT /api/message`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
### `trieve Trieve API message generate-message-completions`
- Summary: Generate Message Completions
- HTTP: `POST /api/message/generate_message_completions`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `text/plain`
### `trieve Trieve API message get-all-topic-messages`
- Summary: Get all messages for a given topic
- HTTP: `GET /api/messages/{messages_topic_id}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--messages-topic-id` (path, required, uuid): The ID of the topic to get messages for.
- Output: columns `id`, `completion_tokens`, `content`, `created_at`, `dataset_id`, `deleted`; response media `application/json`
### `trieve Trieve API message get-message-by-id`
- Summary: Get a message by its ID
- HTTP: `GET /api/message/{message_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--message-id` (path, required, uuid): The ID of the message to get.
- Output: response media `application/json`
### `trieve Trieve API message get-tool-function-params`
- Summary: Get tool function parameters
- HTTP: `POST /api/message/get_tool_function_params`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API message regenerate-message`
- Summary: Regenerate message
- HTTP: `DELETE /api/message`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `text/plain`
### `trieve Trieve API message regenerate-message-patch`
- Summary: Regenerate message
- HTTP: `PATCH /api/message`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `text/plain`
### `trieve Trieve API message transcribe-audio`
- Summary: Transcribe Audio
- HTTP: `POST /api/message/transcribe_audio`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `text/plain`
## Metrics
- Description: Metrics endpoint. Used to get information for monitoring
### `trieve Trieve API metrics get-metrics`
- Summary: Get Prometheus Metrics
- HTTP: `POST /metrics`
- Auth: required; accepts: `X-API-KEY (apiKey header X-API-KEY)`
- Body: none
- Flags: none
- Output: response media `text/plain`
## Organization
- Description: Organization endpoint. Enables you to modify organization roles and information.
### `trieve Trieve API organization create-organization`
- Summary: Create Organization
- HTTP: `POST /api/organization`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
- Output: response media `application/json`
### `trieve Trieve API organization create-organization-api-key`
- Summary: Create Organization Api Key
- HTTP: `POST /api/organization/api_key`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request.
- Output: response media `application/json`
### `trieve Trieve API organization delete-organization`
- Summary: Delete Organization
- HTTP: `DELETE /api/organization/{organization_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--organization-id` (path, required, uuid): The id of the organization you want to fetch.
### `trieve Trieve API organization delete-organization-api-key`
- Summary: Delete Organization Api Key
- HTTP: `DELETE /api/organization/api_key/{api_key_id}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--api-key-id` (path, required, uuid): The id of the api key to delete
- `--tr-organization` (header, required, uuid): The organization id to use for the request.
### `trieve Trieve API organization get-organization`
- Summary: Get Organization
- HTTP: `GET /api/organization/{organization_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--organization-id` (path, required, uuid): The id of the organization you want to fetch.
- Output: response media `application/json`
### `trieve Trieve API organization get-organization-api-keys`
- Summary: Get Organization Api Keys
- HTTP: `GET /api/organization/api_key`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request.
- `--cursor` (query): The cursor to start the pagination from.
- `--limit` (query, int32): The number of items to return per page.
- Output: columns `name`, `id`, `created_at`, `organization_id`, `role`, `updated_at`; response media `application/json`; pagination `cursor`
### `trieve Trieve API organization get-organization-usage`
- Summary: Get Organization Usage
- HTTP: `POST /api/organization/usage/{organization_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--organization-id` (path, required, uuid): The id of the organization you want to fetch the usage of.
- Output: response media `application/json`
### `trieve Trieve API organization get-organization-users`
- Summary: Get Organization Users
- HTTP: `GET /api/organization/users/{organization_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--organization-id` (path, required, uuid): The id of the organization you want to fetch the users of.
- Output: columns `name`, `id`, `created_at`, `email`; response media `application/json`
### `trieve Trieve API organization update-all-org-dataset-configs`
- Summary: Update All Dataset Configurations
- HTTP: `POST /api/organization/update_dataset_configs`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
### `trieve Trieve API organization update-organization`
- Summary: Update Organization
- HTTP: `PUT /api/organization`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- Output: response media `application/json`
## Public
### `trieve Trieve API public page`
- Summary: public_page
- HTTP: `GET /api/public_page/{dataset_id}`
- Auth: required
- Body: none
- Flags:
- `--dataset-id` (path, required): The id or tracking_id of the dataset you want to get the demo page for.
### `trieve Trieve API public send-shopify-user-event`
- Summary: Send a Shopify user event
- HTTP: `POST /api/shopify/user_event`
- Auth: required
- Body: required; media type `application/json`
- Flags: none
## Shopify
### `trieve Trieve API shopify handle-shopify-plan-change`
- Summary: handle_shopify_plan_change
- HTTP: `POST /api/shopify/plan_change`
- Auth: required
- Body: required; media type `application/json`
- Flags: none
## Stripe
- Description: Stripe endpoint. Used for the managed SaaS version of this app. Eventually this will become a micro-service. Reach out to the team using contact info found at `docs.trieve.ai` for more information.
### `trieve Trieve API stripe cancel-subscription`
- Summary: Cancel Subscription
- HTTP: `DELETE /api/stripe/subscription/{subscription_id}`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--subscription-id` (path, required, uuid): id of the subscription you want to cancel
### `trieve Trieve API stripe direct-to-payment-link`
- Summary: Checkout
- HTTP: `GET /api/stripe/payment_link/{plan_id}/{organization_id}`
- Auth: required
- Body: none
- Flags:
- `--plan-id` (path, required, uuid): id of the plan you want to subscribe to
- `--organization-id` (path, required, uuid): id of the organization you want to subscribe to the plan
### `trieve Trieve API stripe estimate-bill-from-range`
- Summary: Estimate Bill From Range
- HTTP: `GET /api/stripe/estimate_bill/{plan_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--plan-id` (path, required, uuid): plan_id
- Output: list path `items`; columns `name`, `amount`, `clean_name`, `usage_amount`; response media `application/json`
### `trieve Trieve API stripe get-all-invoices`
- Summary: Get All Invoices
- HTTP: `GET /api/stripe/invoices/{organization_id}`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--organization-id` (path, required, uuid): The id of the organization to get invoices for.
- Output: columns `id`, `created_at`, `hosted_invoice_url`, `org_id`, `status`, `stripe_id`; response media `application/json`
### `trieve Trieve API stripe get-all-plans`
- Summary: Get All Plans
- HTTP: `GET /api/stripe/plans`
- Auth: required
- Body: none
- Flags: none
- Output: columns `name`, `id`, `amount`, `chunk_count`, `created_at`, `dataset_count`; response media `application/json`
### `trieve Trieve API stripe get-all-usage-plans`
- Summary: Get All Usage Plans
- HTTP: `GET /api/stripe/usage_plans`
- Auth: required
- Body: none
- Flags: none
- Output: columns `name`, `id`, `analytics_events_price_id`, `bytes_ingested_price_id`, `chunks_stored_price_id`, `created_at`; response media `application/json`
### `trieve Trieve API stripe update-payment-method`
- Summary: Update Payment Method
- HTTP: `POST /api/stripe/checkout/setup/{organization_id}`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--organization-id` (path, required, uuid): The id of the organization to create setup checkout session for.
- Output: response media `application/json`
### `trieve Trieve API stripe update-subscription-plan`
- Summary: Update Subscription Plan
- HTTP: `PATCH /api/stripe/subscription_plan/{subscription_id}/{plan_id}`
- Auth: required; scopes: `owner`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request
- `--subscription-id` (path, required, uuid): id of the subscription you want to update
- `--plan-id` (path, required, uuid): id of the plan you want to subscribe to
## Topic
- Description: Topic chat endpoint. Think of topics as the storage system for gen-ai chat memory. Gen AI messages belong to topics.
### `trieve Trieve API topic clone-topic`
- Summary: Clone Topic
- HTTP: `POST /api/topic/clone`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API topic create-topic`
- Summary: Create Topic
- HTTP: `POST /api/topic`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: response media `application/json`
### `trieve Trieve API topic delete-topic`
- Summary: Delete Topic
- HTTP: `DELETE /api/topic/{topic_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- `--topic-id` (path, required, uuid): The id of the topic you want to delete.
### `trieve Trieve API topic get-all-topics-for-owner-id`
- Summary: Get All Topics for Owner ID
- HTTP: `GET /api/topic/owner/{owner_id}`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--owner-id` (path, required): The owner_id to get topics of; A common approach is to use a browser fingerprint or your user's id
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
- Output: columns `name`, `id`, `created_at`, `dataset_id`, `deleted`, `owner_id`; response media `application/json`
### `trieve Trieve API topic update-topic`
- Summary: Update Topic
- HTTP: `PUT /api/topic`
- Auth: required; scopes: `admin`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-dataset` (header, required, uuid): The dataset id or tracking_id to use for the request. We assume you intend to use an id if the value is a valid uuid.
## User
- Description: User endpoint. Enables you to modify user roles and information.
### `trieve Trieve API user delete-user-api-key`
- Summary: Delete User Api Key
- HTTP: `DELETE /api/user/api_key/{api_key_id}`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags:
- `--api-key-id` (path, required, uuid): The id of the api key to delete
### `trieve Trieve API user get-user-api-keys`
- Summary: Get User Api Keys
- HTTP: `GET /api/user/api_key`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: columns `name`, `id`, `created_at`, `organization_id`, `role`, `updated_at`; response media `application/json`
### `trieve Trieve API user update-user`
- Summary: Update User Org Role
- HTTP: `PUT /api/user`
- Auth: required; scopes: `readonly`; accepts: `ApiKey (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--tr-organization` (header, required, uuid): The organization id to use for the request