Skip to content

Refresh Document

POST
/api/v1/documents/{document_id}/refresh
curl --request POST \
--url https://example.com/api/v1/documents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/refresh

The one deliberate exception to etag/size never changing after declaration (see models.Document's own note): a person looked at a stale document and decided the current S3 content is fine, actually — accept it as the new baseline rather than deleting and redeclaring. store is the shared staging store, only ever used here for its .client — building an ad hoc S3Store for document.bucket avoids asking the caller to repeat a workspace query param this route already knows from the document row itself.

document_id
required
Document Id
string format: uuid

Successful Response

Media typeapplication/json
DocumentDetail
object
id
required
Id
string format: uuid
bucket
required
Bucket
string
key
required
Key
string
name
required
Name
string
state
required
DocumentState
string
Allowed values: NORMAL PROCESSING SUCCESS ERROR
details
required
Any of:
string
etag
required
Any of:
string
size
required
Any of:
integer
properties
required
Properties
object
key
additional properties
any
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
created_by
required
Any of:
string
Example
{
"state": "NORMAL"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}