Creates a file system share of type CIFS or NFS.
HTTP request syntax (URI)
POST <base_URI>/v7/storage/filesystem-shares/{type}
Parameters
Name | Type | Required | Values | Description |
---|---|---|---|---|
name | BODY | Y | string | Share name. |
type | URI_PARAM | Y | string | File system share type. The only possible values are cifs or nfs. |
virtualServerId | BODY | Y | number | ID of the virtual server to which the file system is assigned. |
filesystemId | BODY | Y | string | ID of the file system that the share belongs to. |
fileSystemPath | BODY | Y | string | Absolute filesystem path where the share resides - for NFS exports, the path should be UNIX format, for CIFS shares the path should be Windows format, and the \ character needs to be escaped. |
settings | BODY | Y | object | Share setting. Depending on what value type is, the value for a share setting is either the object of the CIFS settings or the object of the NFS settings. |
Return codes
Code | Data | Description |
---|---|---|
201 | filesystemShare | File system share object created successfully. |
400 | No Data | Missing or invalid request contents. |
404 | Error Message | Requested resource not found. |
500 | Error message | Error associated with the storage system. |
501 | No Data | Server has not implemented the request operation on the resource. |
Any HTTP status code other than 201 indicates that the API did not complete successfully.
Request example 1
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.57.75:8444/v7/storage/filesystem-shares/nfs -d '{"name":"xyz-test-nfs-01-21-3","virtualServerId":5, "filesystemId":"75412709E1CB9AAB0000000000000000","filesystemPath":"/xyz/ test/path/1204","settings":{"accessConfig":"*", "snapshotOption":"SHOW_AND_ALLOW_ACCESS","localReadCacheOption":"DISABLED", "transferToReplicationTargetSetting":"DO_NOT_TRANSFER"}}' -X POST
Response example 1
HTTP/1.1 201 Created { "filesystemShare" : { "filesystemId" : "75412709E1CB9AAB0000000000000000", "objectId" : "353a3a3a65646430653862322d353462612d313164312d393131622d346265653366616163613362", "name" : "/xyz-test-nfs-01-21-3", "path" : "/xyz/test/path/1204", "settings" : { "accessConfig" : "*", "localReadCacheOption" : "DISABLED", "snapshotOption" : "SHOW_AND_ALLOW_ACCESS", "transferToReplicationTargetSetting" : "DO_NOT_TRANSFER" }, "shareId" : "edd0e8b2-54ba-11d1-911b-4bee3faaca3b", "virtualServerId" : 5 }, "uri" : "https://172.17.57.75:8444/v7/storage/filesystem-shares/nfs/353a3a3a65646430653862322d353462612d313164312d393131622d346265653366616163613362" }
Request example 2
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.57.75:8444/v7/storage/filesystem-shares/cifs -d '{"name":"xyz-test-cifs-01-21-4","virtualServerId":5, "filesystemId":"75412709E1CB9AAB0000000000000000","filesystemPath":"\\mypath-cifs-1","settings":{"accessConfig":"*","comment":"xyz comment", "userHomeDirectoryPath":"","isScanForVirusesEnabled":false, "maxConcurrentUsers":100,"snapshotOption":"SHOW_AND_ALLOW_ACCESS", "cacheOption":"MANUAL_CACHING_DOCS", "transferToReplicationTargetSetting":"DO_NOT_TRANSFER", "userHomeDirectoryMode":"OFF","isFollowSymbolicLinks":false, "isFollowGlobalSymbolicLinks":false,"isForceFileNameToLowercase":false, "isABEEnabled":false}}' -X POST
Response example 2
HTTP/1.1 201 Created { "filesystemShare" : { "filesystemId" : "75412709E1CB9AAB0000000000000000", "objectId" : "353a3a3a39316331336136382d353462612d313164312d393131612d346265653366616163613362", "name" : "xyz-test-cifs-01-21-4", "path" : "\\mypath-cifs-1", "settings" : { "accessConfig" : "*", "cacheOption" : "MANUAL_CACHING_DOCS", "comment" : "xyz comment", "isABEEnabled" : false, "isFollowGlobalSymbolicLinks" : false, "isFollowSymbolicLinks" : false, "isForceFileNameToLowercase" : false, "isScanForVirusesEnabled" : false, "maxConcurrentUsers" : 100, "snapshotOption" : "SHOW_AND_ALLOW_ACCESS", "transferToReplicationTargetSetting" : "DO_NOT_TRANSFER", "userHomeDirectoryMode" : "OFF", "userHomeDirectoryPath" : "" }, "shareId" : "91c13a68-54ba-11d1-911a-4bee3faaca3b", "virtualServerId" : 5 }, "uri" : "https://172.17.57.75:8444/v7/storage/filesystem-shares/cifs/353a3a3a39316331336136382d353462612d313164312d393131612d346265653366616163613362" }