Hey, human!
HTTP/2 200 OK content-type: text/markdown; charset=utf-8 vary: accept, user-agent x-agent: [ai_agent]
Loading the agent response…
Finish the upload into the folder chosen at the start; optional body: sha256, modified_at (multipart_id is stored by the server); returns the file
Finishes the upload: puts the file in the folder chosen at the start and returns it. If bytes are missing the answer is 409 incomplete and nothing is lost: details.missing_parts lists the parts to send (at most 1000 are listed); send them and call again. Calling it again after success returns the same file. Optional sha256 (checked by the server up to 100 MiB, kept as the client's claim above that) and modified_at (the file's own modification time) are recorded on the file. For a version upload, version_created says whether a new version was made (false when the bytes equal the current version). Bytes that do not match the announced size or the sha256 are 422. Needs files:write.
What you provide
- Multipart idoptional: For a multipart version upload: the multipart_id that startUpload returned
- Sha256optional: The SHA-256 of the file's bytes as 64 hexadecimal characters
- Modified atoptional: The file's own modification time: ISO 8601 with a time zone, after 1970-01-02 and at most one day ahead
Do this with AI
I want to finish the upload into the folder chosen at the start; optional body: sha256, modified_at (multipart_id is stored by the server); returns the file. Use the Tarkle API. Read the reference for this operation and follow it exactly: https://project-03b42162.restlessdocs.com/endpoint/completeupload.md Authenticate with your API key as a Bearer token in the Authorization header. Then make the request for me and tell me what came back.
Paste this into Claude, Cursor, or any AI assistant and it will do it for you.
https://tarkle.com/api/v1/uploads/{id}/completecurl --request POST \
--url https://tarkle.com/api/v1/uploads/3fa85f64-5717-4562-b3fc-2c963f66afa6/complete \
--header 'Authorization: Bearer $API_KEY' \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Key: X-Workspace-Key' \
--data '
{
"multipart_id": "multipart_id",
"sha256": "sha256",
"modified_at": "2024-01-01T00:00:00Z"
}
'Path parameters
idstring · uuidrequiredAn upload id (uuid)
Query parameters
workspace_keystringThe same key as the X-Workspace-Key header, for clients that cannot set headers. Send one of the two, or both with the same value (different values are 400 conflicting_workspace)
Header parameters
X-Workspace-KeystringrequiredThe 8-character key of the workspace this call acts on; GET /workspaces lists the keys a token can use. A workspace id is refused (400 workspace_key_required)
Idempotency-KeystringMakes a write safe to repeat. Send a random value (a UUID is fine) of up to 255 visible characters. A repeat of the same request gets the first answer again, with the header `Idempotent-Replayed: true`, and does nothing twice. The same key for a different request is 422 `idempotency_key_reused`; the same request while the first one is still running is 409 `idempotency_in_progress`. A 5xx or 429 is not remembered, so retrying it runs the request again. Keys last 24 hours and belong to the account that created the token.
Body
application/jsonmultipart_idstringFor a multipart version upload: the multipart_id that startUpload returned
sha256stringThe SHA-256 of the file's bytes as 64 hexadecimal characters
modified_atstring · date-timeThe file's own modification time: ISO 8601 with a time zone, after 1970-01-02 and at most one day ahead