FruxonDocs
IntegrationsAssets

Retrieves OAuth credentials obtained from a completed asset OAuth flow

Exchanges the short-lived credential key produced by the OAuth callback for the access/refresh token pair, then invalidates the key. Allowed anonymously because the OAuth success page runs before the user is reattached to a session; the key itself binds the response to the originating flow. Pass the returned tokens as the `auth` block when creating the asset via `POST /assets`. Calling this endpoint a second time with the same key returns 400.

GET
/v1/tenants/{tenant}/assets/oauthCredentials

Path Parameters

tenant*string

The tenant identifier

Query Parameters

credentialKey?string

The encrypted credential key from the OAuth success redirect.

Response Body

curl -X GET "https://api.fruxon.com/v1/tenants/string/assets/oauthCredentials"
{
  "accessToken": "string",
  "refreshToken": "string",
  "tokenType": "string",
  "expiresAt": 0
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Looks up an asset, and optionally one of its documents, by the ids the search index reports.

A search hit — from `POST /assets/{asset}:search`, or a `search_assets` result in a run's trace — names its asset and document by the search index's own ids, not the ones the other asset endpoints take. This translates them: it returns the asset's id and name, and the knowledge base the asset backs, if any. With `documentId` it also says where that document stands now. The index deletes a document and creates a new one whenever its source changes, so an id recorded earlier may be gone even though its source is still indexed. `CURRENT` means the id is still indexed and its text is unchanged. `REINDEXED` means one document from the same source replaced it; `current` is the replacement and its text may differ. `MISSING` means nothing in the asset can be told apart as its replacement. Pass whatever else the hit carries (`knowledgeDocumentId`, `sourceUrl`, `fileName`) so a replacement can be recognised. Read the document's text with `GET /assets/{asset}/documents/{document}/chunks`, using `assetId` and `document.current.id` from this response.

Lists ingestion operations for an asset.

Returns the history of long-running operations against the asset — initial ingestion, refreshes, and webhook-triggered updates — each annotated with state (`Pending`, `Running`, `Completed`, `Failed`, `Cancelled`), token counts, and per-operation embedding cost computed from the asset's model pricing. Operation IDs returned by `POST /assets` and `POST /assets/{asset}:refresh` appear here; clients poll this endpoint (or `GET /assets/{asset}/operations/{operation}`) to track progress.