Reprocess a file

SDK platic.files.reprocess()

Read a file’s source again or retry failed processing. Send its fileId, with no body or with {}:

  • On a url file, it re-reads the page now (in the platform, Update now).
  • On a file or text file, it reprocesses the original that was stored (Reprocess).
  • On a file whose last processing failed, it tries again (Retry).

While it is processing, agents keep using the previous content. If the resulting text is the same as the one already in use, it ends in ready with result: "unchanged" and nothing changes.

Example

await platic.files.reprocess("file_123");

Path parameters

ParameterTypeDescriptionRequired
fileIdstringThe file✓

Request body

Empty. You can send no body or an empty object:

{}

Response

202 Accepted:

{
  "status": "success",
  "data": {
    "accepted": true,
    "fileId": "fH3kL9mQ2xR7",
    "uploadId": "up_3Hs8Kq1Vm5",
    "link": null,
    "statusUrl": "/v1/files/fH3kL9mQ2xR7/jobs/up_3Hs8Kq1Vm5"
  }
}

Response fields

The response uses the fields from Create a file, with link: null because connections do not change. Poll the processing job until terminal is true. Its trigger is reprocess; result shows whether the content changed. For a url file, completion updates refresh.lastRunAt, lastResult and nextRunAt.

Errors

Statusdetails.codeWhen
403RESOURCE_NOT_ACCESSIBLEYou do not have Integrations nor can you edit all the agents that use it.
409FILE_JOB_IN_PROGRESSThere is already an open processing on this file. Wait for it to finish.
409SOURCE_UNAVAILABLEThere is no stored original or page to read (for example, an upload that never finished). Replace it with new content.
410FILE_DELETEDThe file was already deleted.
429QUOTA_EXCEEDEDThere are already 30 open processings in the workspace.

The ones that apply to all operations are in common errors.