This section is all about managing folders and files.
In this section we will cover how to manage folders and files, also referred to as nodes, with the Alfresco ReST API.
After walking through this section you should have a good understanding of how to list contents of a folder, create a folder, upload a file, set metadata for a folder or file, update a file, delete folders and files, and much more.
- List contents of a folder Listing the contents of a folder in the repository is really useful, here we walk through several examples of how to do that.
- Filter contents of a folder Listing the contents of a folder in the repository is really useful, here we also cover how to filter the contents we are listing.
- Get folder/file metadata Getting the metadata for a node returns the properties for the node type and applied aspects.
- Create a folder Creating a folder means creating a node with metadata.
- Upload a file Uploading a file to the Repository means creating a node with metadata and content.
- Upload a file with custom type Uploading a file with a custom type to the Repository means creating a node with a type other than cm:content.
- Upload a new version of file Uploading a new version of a file means replacing the content and creating a new entry in the version history.
- Get file version history When a file has versioning turned on you can get its version history.
- Download a file Downloading the file means getting the file content from the Repository, which has it stored on disk.
- Download multiple files It's possible to download multiple files as a ZIP.
- List file renditions A file can have a number of renditions generated for it. This is how you get a list these renditions.
- Get file rendition content Get the rendition file content, if it has been generated.
- Update metadata for a folder or file Update the properties, also referred to as metadata, for a folder or file.
- Add aspects to a folder or file Addning aspects to a folder or file is a bit more complicated than just updating properties. Here is how to do it.
- Remove aspects from a folder or file Removing aspects from a folder or file is a bit more complicated than just updating properties. Here is how to do it.
- Get and Set permissions for a folder or file Get and set permissions for a user or group on a folder or file node.
- Working with relationships between folders/files Setting up relationships, referred to as associations, between different types of nodes is useful when modelling a specific domain.
- Manage comments for a folder or file Get, add, update, and remove comments for a folder or file node.
- Manage tags for a folder or file Get, add, and remove tags for a folder or file node.
- Copy folders and files Copying folders and files means copying nodes.
- Move folders and files Moving folders and files means moving nodes.
- Lock a file for editing Locking a file is sometimes necessary when you want to edit it while no one else should be able to.
- Create a link to a file Create a link to a file or folder stored somewhere else.
- Delete a folder or file Deleting a node, such as a folder or file, is easy. Here is how to do it.
- List deleted folders and files (Trashcan) Listing the content of the so called trashcan is useful if you want to restore soft deleted nodes.
- Restore deleted folders and files (Trashcan) Folders and files are "soft deleted", meaning they are not physically gone from the system when deleted, so they can be restored as described on this page.
Parent topic: ReST API