The PUT method is used to create a new file system. If the file system already exists then it will return 409 Conflict
result.
Syntax
curl \
http://{serverUrl}/admin/fs/{newFileSystemName}?update={update} \
-X PUT \
--d "{filesystemDocument}"
Request
Payload |
The JSON formatted FileSystemDocument. The document containing all configuration options for a new file system (e.g. active bundles, name/id, data path) |
Query parameter |
Required |
Description |
newFileSystemName |
Yes |
The new file system name |
update |
No |
Determines whether it should create the new file system or update the existing one (default: false ) |
Response
Status code |
Description |
201 |
Created |
409 |
The file system already exists (if update parameter was false ) |
Return Value |
Description |
None |
The request does not return any message |
Example
Let's create a new file system or update the configuration of already existing one according to the specified document:
curl \
-X PUT http://localhost:8080/admin/fs/NorthwindFS?update=true \
-d "{'Id' : 'Raven/FileSystems/NorthwindFS', 'Settings' : {'Raven/FileSystem/DataDir' : '~/FileSystems/NorthwindFS'}}"
< HTTP/1.1 201 Created