Sync

同期のファイルを上げる

同期の計画(POST …/sync)が uploads_required で求めたファイルを 1 件ずつ上げる。計画が求めていないファイルは受けない。

本文はファイルのバイト列そのまま。Content-Type に形式、Content-Length に大きさを付ける。中身の SHA-256 が URL と違えば 422 upload_mismatch。

同じファイルを 2 度上げると、2 度目は 200 で何もしない。受け取ったファイルは 24 時間で消える(その間に実行の同期を呼ぶ)。

put/knowledge/sources/{source_id}/uploads/{sha256}

Request

  • Base URL: https://api.leafchat.app/api/v1
  • URL: https://api.leafchat.app/api/v1/knowledge/sources/{source_id}/uploads/{sha256}
  • Auth: HTTP bearer

Path parameters

source_idstring required
Example:k9x2m4q7w1e5r8t3y6u0i2o4
sha256string required

ファイルの中身の SHA-256(16 進の小文字)

Example:9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08

Request body

string binary required

Response

受け取り済み(何もしない)

sha256string required
sizeinteger required
already_uploadedboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.