Library Item Updatesession File APIs

Library Item Updatesession File APIs

The File service provides operations for accessing files within an update session. After an update session is created against a library item, the File service can be used to make changes to the underlying library item metadata as well as the content of the files. The following changes can be made:

  • deleting an existing file within the library item. This deletes both the metadata and the content.
  • updating an existing file with new content.
  • adding a new file to the library item.

The above changes are not applied or visible until the session is completed. See UpdateSession.

Operations
POST
Create Update Session Id Item File
Requests file content to be changed (either created, or updated). Depending on the source type of the file, this operation will either return an upload endpoint where the client can push the content, or the server will pull from the provided source endpoint. If a file with the same name already exists in this session, this operation will be used to update the content of the existing file. When importing a file directly from storage, where the source endpoint is a file or datastore URI, you will need to have the ContentLibrary.ReadStorage privilege on the library item. If the file is located in the same directory as the library storage backing folder, the server will move the file instead of copying it, thereby allowing instantaneous import of files for efficient backup and restore scenarios. In all other cases, a copy is performed rather than a move. if you do not have all of the privileges described as follows: - Operation execution requires System.Anonymous.
GET
List Update Session Id Item File
Lists all files in the library item associated with the update session. if you do not have all of the privileges described as follows: - Operation execution requires System.Anonymous.
GET
Get Update Session Id File Name Item
Retrieves information about a specific file in the snapshot of the library item at the time when the update session was created. if you do not have all of the privileges described as follows: - Operation execution requires System.Anonymous.
DELETE
Delete Update Session Id File Name Item
Requests a file to be removed. The file will only be effectively removed when the update session is completed. if you do not have all of the privileges described as follows: - Operation execution requires System.Anonymous.
POST
Validate Update Session Id File
Validates the files in the update session with the referenced identifier and ensures all necessary files are received. In the case where a file is missing, this operation will return its name in the File.ValidationResult.missing-files set. The user can add the missing files and try re-validating. For other type of errors, File.ValidationResult.invalid-files will contain the list of invalid files. if you do not have all of the privileges described as follows: - Operation execution requires System.Anonymous.