Update Folder or File
Move or rename a folder or file on file staging. You can move and rename an item in the same request.
PUT
/api/{version}/services/file_staging/items/{item}Headers
Section link for Headers| Name | Description |
|---|---|
Content-Type | application/x-www-form-urlencoded |
Accept | application/json (default) or application/xml |
URI Path Parameters
Section link for URI Path Parameters| Name | Description |
|---|---|
item | The absolute path to a file or folder. This path is specific to the authenticated user. Admin users can access the root directory. All other users can only access their own user directory. |
Body Parameters
Section link for Body ParametersAt least one of the following parameters is required:
| Name | Description |
|---|---|
parentconditional | When moving a file or folder, specifies the absolute path to the parent directory in which to place the file. |
nameconditional | When renaming a file or folder, specifies the new name. |
Request
Section link for Requestcurl -L -X PUT -H "Authorization: {SESSION_ID}"\
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "parent=/u10001400/cholecap-2021" \
--data-urlencode "name=cholecap-2021-brochure" \
https://myvault.veevavault.com/api/v26.1/services/file_staging/items/Cholecap-References/cholecap-brochureResponse
Section link for Response{
"responseStatus": "SUCCESS",
"data": {
"job_id": 100949,
"url": "/api/v26.1/services/jobs/100949"
}
}Response Details
Section link for Response DetailsOn SUCCESS, the response contains the following information:
| Name | Description |
|---|---|
job_id | The Job ID value to retrieve the status and results of the request. |
url | URL to retrieve the current job status of this request. |
Updating Files in the Inbox Directory
Section link for Updating Files in the Inbox DirectoryRenaming a file in your Vault's Inbox directory creates a new Staged document in your Vault and does not rename, remove, or update the previously created corresponding Staged document. Learn more in Vault Help