Nexfs Management API Documentation

Method Index

CreateFolder

Create a new folder within the Nexfs Filesystem using the management API


Action: CreateFolder

Creates a new folder (directory) within the Nexfs Filesystem

Permissions

The requesting session must have the nexfs/CreateDirectories role enabled.


Request Parameters

A request must be made against the nexfs management console api with the CreateFolder action.

The request must be signed with a valid AWS V4 style Signature using an active temporary session security token.


Action

CreateFolder

RequestJson

A URI encoded json string containing a list of new folder properties

RequestJson Format

{

"Folders": [

{

"Name": "string",

"Owner": "string",

"Group": "string",

"OwnerRead": integer,

"OwnerWrite": integer,

"OwnerExec": integer,

"GroupRead": integer,

"GroupWrite": integer,

"GroupExec": integer,

"OtherRead": integer,

"OtherWrite": integer,

"OtherExec": integer,

"Path": "string"

} ]

}


RequestJson Elements

Name

The name of the new folder to be created


Owner

(Optional) The POSIX Owner to attach to the new folder

Default: root


Group

(Optional) The POSIX Group to attach to the new folder

Default: root

OwnerRead (Optional)

0 (Owner DOES NOT have posix READ access to the new folder) or

1 (Owner HAS posix READ access to the new folder)

Default: 0

OwnerWrite (Optional)

0 (Owner DOES NOT have posix WRITE access to the new folder) or

1 (Owner HAS posix WRITE access to the new folder)

Default: 0


OwnerExec (Optional)

0 (Owner DOES NOT HAVE posix ACCESS to enter the new folder) or

1 (Owner HAS posix ACCESS to the new folder)

Default: 0


GroupRead (Optional)

0 (Group DOES NOT have posix READ access to the new folder) or

1 (Group HAS posix READ access to the new folder)

Default: 0


GroupWrite (Optional)

0 (Group DOES NOT have posix WRITE access to the new folder) or

1 (Group HAS posix WRITE access to the new folder)

Default: 0


GroupExec (Optional)

0 (Group DOES NOT HAVE posix ACCESS to enter the new folder) or

1 (Group HAS posix ACCESS to the new folder)

Default: 0


OtherRead (Optional)

0 (Others DO NOT have posix READ access to the new folder) or

1 (Others HAVE posix READ access to the new folder)

Default: 0

OtherWrite (Optional)

0 (Others DO NOT have posix WRITE access to the new folder) or

1 (Others HAVE posix WRITE access to the new folder)

Default: 0


OtherExec (Optional)

0 (Others DO NOT HAVE posix ACCESS to enter the new folder) or

1 (Others HAVE posix ACCESS to the new folder)

Default: 0


Path

The name of the existing folder within the Nexfs filesystem for the new folder to be created within, or / to create at the start (root) of the Nexfs filesystem


Request Body

The request does not have a request body.


Response Syntax


HTTP1/1 200

<?xml version="1.0" encoding="UTF-8"?>

<RequestCompleted>

<Code>string</Code>

<Message>string</Message>

<Resource>string</Resource>

<RequestId>integer</RequestId>

</RequestCompleted>


Response Elements

If the action is successful, the service sends back an HTTP 200 response.


The following data is returned in XML format by the service:

RequestCompleted

Root Level tag for the successful Revoke Session response


Code

OK


Message

Request Completed


Resource

/nexfsconsoleapi

RequestId

A requestid number that identifies the request made against the management api


Errors

Also See Rest Error Responses


400 BadRequest The request was Malformed

A BadRequest is returned if RequestJSON missing from the request


400 BadRequest The request was Malformed

A BadRequest is returned if the RequestJSON format is invalid


400 BadRequest <POSIX MESSAGE>

An error occured while preforming the request, examples: folder exists, user does not exist, group does not exist etc,


401 Unauthorized The request cannot be authenticated


403 Forbidden Session does not have the rights to perform the requested action


500 InternalServerError An Internal Error was encountered

Example Request

GET http://nexfsdemo:9200/nexfsconsoleapi?Action=CreateFolder&RequestJSON={%20%22Folders%22:%20[%20{%20%22Name%22:%20%22jkjk%22,%22Path%22:%20%22/%22%20}%20]%20}

Authorization: AWS4-HMAC-SHA256 Credential=e14cb5cc491d4674bc657dba534716da/20220829/nexfs/nexfsconsoleapi/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=d92d9bae7db2a80baa16109cde1ae2638164778e65f6977ed18c15d528ec8dc1

host: nexfs.example.com

x-amz-date: 20220829T114639Z


Example Response


<?xml version="1.0" encoding="UTF-8"?>

<RequestCompleted>

<Code>Ok</Code>

<Message>Request Completed</Message>

<Resource>/nexfsconsoleapi</Resource>

<RequestId>38</RequestId>

</RequestCompleted>