Doc Store

sfp server API reference for Doc Store: 5 endpoints.

POST/sfp/api/doc-store/docs/{key}

Stores or updates a document with the specified key. Supports optimistic concurrency control via version parameter. If version is provided, it must match the current version for updates. For new documents, version should not be provided.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X POST "https://example.com/sfp/api/doc-store/docs/string" \  -H "Content-Type: application/json" \  -d '{}'
Empty
GET/sfp/api/doc-store/docs/{key}

Retrieves the document content and version for the specified key. Returns 404 if the key does not exist. The version can be used for optimistic concurrency control in subsequent updates.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Response Body

curl -X GET "https://example.com/sfp/api/doc-store/docs/string"
Empty
DELETE/sfp/api/doc-store/docs/{key}

Permanently removes a document from the store. This operation cannot be undone. Returns 404 if the key does not exist. Only users with owner role or application tokens can perform this operation.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

curl -X DELETE "https://example.com/sfp/api/doc-store/docs/string" \  -H "Content-Type: application/json" \  -d '{}'
Empty
GET/sfp/api/doc-store/docs/{key}/version

Retrieves only the version number for the specified key without the document content. Useful for checking if a document has been modified before fetching the full content. Returns 404 if the key does not exist.

Authorization

access-token
AuthorizationBearer <token>

In: header

Path Parameters

key*string

Response Body

curl -X GET "https://example.com/sfp/api/doc-store/docs/string/version"
Empty
GET/sfp/api/doc-store/docs

Returns an array of all document keys in the store. This operation may be expensive for large stores. Keys are returned in no particular order. Use with caution in production environments with many documents.

Authorization

access-token
AuthorizationBearer <token>

In: header

Query Parameters

standaloneDocumentsOnly?boolean

When true, returns only documents that are not part of any collection (collection_id is null). When false or omitted, returns all documents including those in collections.

Response Body

curl -X GET "https://example.com/sfp/api/doc-store/docs"
Empty