Post Doc API
| Method | API | Description |
|---|---|---|
| POST | /{context}/{docId}/content | Upload the document specified by docId, where docId is the document ID in the third-party service. Returns the latest modification time of this document in JSON format. |
The platform server uploads files through formData. Content type is multipart/form-data. Not form_url_encoded, nor x-www-form-urlencoded.
| Parameter | Required | Location | Description | Type | Default Value |
|---|---|---|---|---|---|
| docId | Yes | Path | Specifies the file ID. Note that the file ID cannot contain colon ':' | string | |
| Content-Type | Yes | Header | Fixed as multipart/form-data | string | |
| file | Yes | Body(form data) | The file itself, contains two attributes: filename (fixed as content, please ignore. Currently, file names will not be modified through this API), contentType (the file's mimeType, e.g., 'application/octet-stream') | multipartfile |
After successful upload, the latest file modification time needs to be returned.
For example:
{
"modified_at": "2020-03-25T02:57:38.000Z" // Required, this time should be the latest save time of this file in the business system, and this save is brought about by this API.
}