Re-index a resource
Reads the resource again: a page is fetched again, a file re-read from its stored original, a site synchronised (new pages added, changed ones re-read, pages gone twice removed). Costs no credits.
POST/v1/resources/{resource_id}/reindex
Requires resources:write.
Re-indexing costs no credits and returns at once with 202. Poll Get a resource afterwards.
| Type | What happens |
|---|---|
| Text | The current text is indexed again. |
| File | The stored original is read again. Nothing is uploaded twice. |
| Web page | The page is fetched again. |
| Site | A synchronisation starts: new pages are added, changed pages are read again and pages gone twice in a row are removed. |
For a site, already_running is true when a synchronisation was already in progress and nothing new was started. While the new version is built, the resource stays searchable on its current one.
Authorizations
Authorizationbearerin headerrequiredPath parameters
resource_idstringrequiredpattern: ^res_[abcdefghjkmnpqrstuvwxyz23456789]{12}$Header parameters
Idempotency-Keystringlength: 1–255 charsA unique key for this request, such as a UUID, 1 to 255 visible ASCII characters. Send the same key when you retry: the first response is returned (with Idempotent-Replayed: true) instead of running the request again, for 24 hours, per credential. The same key on a different request is a 409 conflict. A streamed answer is not recorded.
Response
Re-index a resource, or sync a site
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked, invalid_access_key
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required, permission_denied
errorobjectrequiredrequest_idstringrequiredPossible codes: resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: conflict, assistant_has_no_resources
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large_for_plan
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired