Nexfs Management API Documentation

Method Index

CreateUser

Create a New User using the Nexfs Management API

Action: CreateUser

Creates a new User

Permissions

To create a new role a requesting session must have the iam/eUpdateUsers role enabled.

Request Parameters

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

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


Action

CreateUser


AssumeRolePolicyDocument

A URI encoded json string containing a list of Role to attached to the user


AssumeRolePolicyDocument json Format


{

"Roles": [

"string"

,...

]

}


AssumeRolePolicyDocument json elements

Roles

A json array enclosure

string

Zero or more role names to be attached the the new user

Description

A URI encoded json string containing optional the description elements for the new user


Description json Format


{

"UserDescription1": "string",

"UserDescription2": "string",

}


Description json elements

UserDescription1

The json label for an optional user description


UserDescription2

The json label for an additional optional user description

string

Optional user description

Email

Optional email address for the user


NewSecretHash

The Users MD5 Hex encoded Secret

UserId

The Users Id (The account id/name used for that user to authenticate against the API)


UserName

A short description of the user, often the users or automated systems name

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>

<CreateUserResponse>

<CreateUserResult>

<User>

<UserName>String</UserName>

<UserId>String</UserId>

</User>

</CreateUserResult>

<ResponseMetadata>

<RequestId>integer</RequestId>

</ResponseMetadata>

</CreateUserResponse>

<Resource>String</Resource>

</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


CreateUserResponse

A section label with contains the create user response details


CreateUserResult

A section label which contains confirms the user that has been created


User

A section label which contains a summary of the user that has been created


UserId

The Users Id (The account id/name used for that user to authenticate against the API)

UserName

A short description of the user, often the users or automated systems name


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 will be returned if AssumeRolePolicyDocument, RoleName or Version is missing from the request


A BadRequest will also be returned if AssumeRolePolicyDocument is incorrectly formatted


401 Unauthorized The request cannot be authenticated


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


409 EntityAlreadyExists The request was rejected because it attempted to create a resource that already exists

500 InternalServerError An Internal Error was encountered


507 ToManyRoles Request exceed max roles allow for a user

Example Request

The following example create a user with the attributes

Action: CreateUser

AssumeRolePolicyDocument: {

"Roles": [

"Example Role Update"

]}

Description: {

"UserDescription1": "The is a example user",

"UserDescription2": ""

}

Email: exampleuser@nexfs.net

NewSecretHash: cb56817123f26f61cad4d373b882e155

UserId: ExampleUser

UserName: Example User


GET http://nexfs.example.com:9200/nexfsconsoleapi?Action=CreateUser&AssumeRolePolicyDocument={%20%22Roles%22:%20[%20%22Example%20Role%20Update%22]}&Description={%20%22UserDescription1%22:%20%22The%20is%20a%20example%20user%22,%22UserDescription2%22:%20%22%22%20}&Email=exampleuser@nexfs.net&NewSecretHash=cb56817123f26f61cad4d373b882e155&UserId=ExampleUser&UserName=Example%20User

Authorization: AWS4-HMAC-SHA256 Credential=65dfa6ebede0462da9439f3dde7976f6/20220831/nexfs/nexfsconsoleapi/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=b278c0f055af3f2d633ef21b3289adaa963abca0e4c67767c53ca5204628edb1content-type: application/x-www-form-urlencoded; charset=utf-8

host: nexfs.example.com

x-amz-date: 20220831T132709Z

Example Response


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

<RequestCompleted>

<Code>Ok</Code>

<CreateUserResponse>

<CreateUserResult>

<User>

<UserName>Example User</UserName>

<UserId>ExampleUser</UserId>

</User>

</CreateUserResult>

<ResponseMetadata>

<RequestId>49</RequestId>

</ResponseMetadata>

</CreateUserResponse>

<Resource>/nexfsconsoleapi</Resource>

</RequestCompleted>