Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

Users can be accessed and modified through this API using four services: GET, POST, PUT, and PATCH. These four services allow for the retrieval, creation, complete update, and partial update of users.

Info
titleBase URL for User REST API

http://host:port/flexdeploy/rest/administration/security/user

Table of Contents
maxLevel1

Each function returns a JSON user object. The user object has these attributes:

...

Additionally, each attribute in the list of attributes contains these attributes

...

Back to Top

GET

There are two implementations of GET. One will find a user with the given Id and return the JSON representation of the user . The other will find a list of users matching the parameters supplied to it.

GET by ID

This GET service will find a user with the given Id and return the JSON representation of the object. 

Info
titleAPI URL

http://host:port/flexdeploy/rest/administration/security/user/{Id}

Parameters

...

Parameter

...

Type

...

Required

...

Description

...

Id

...

Example

If we had a user in our database with an Id of 10000 and had the following attributes

...

themeEclipse
titleUser - 10000

...

Users can be accessed and modified through this API using four services: GET, POST, PUT, and PATCH. These four services allow for the retrieval, creation, complete update, and partial update of users.

Include Page
REST V1 Authentication
REST V1 Authentication

Table of Contents
maxLevel2

GET

There are two implementations of GET. One will find a user with the given Id and return the JSON representation of the user . The other will find a list of users matching the parameters supplied to it.

GET by ID

This GET service will find a user with the given Id and return the JSON representation of the object. 

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/administration/security/user/{Id}

Request

Parameter

Type

Required

Description

Id

URLYesThis is a URL parameter for the Id which is used to find and return a user

Include Page
REST V1 User Response
REST V1 User Response

Example

If we had a user in our database with an Id of 10000 and had the following attributes

Code Block
themeEclipse
titleUser - 10000
{
	"attributes": [
	{
		"description": "Notify on Approval Required",
		"attributeName": "SUBMITTER_PENDING_APPROVAL",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Scheduled",
		"attributeName": "SUBMITTER_SCHEDULED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Failed",
		"attributeName": "SUBMITTER_FAILED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Deploying",
		"attributeName": "SUBMITTER_READY",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Completed",
		"attributeName": "SUBMITTER_COMPLETED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Rejected",
		"attributeName": "SUBMITTER_REJECTED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	}
	],
	"userId": 10000,
	"userName": "username",
	"password": "password",
	"groups": [10010,10011],
	"isActive": true,
	"email": "email@company.com",
	"lastName": "Last",
	"firstName": "First",
	"isLocalUser": true
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/v1/administration/security/user/10000

The GET request would return the following JSON user object

Code Block
themeEclipse
titleUser - 10000
{
	"attributes": [
	{
		"description": "Notify on Approval Required",
		"attributeName": "SUBMITTER_PENDING_APPROVAL",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Scheduled",
		"attributeName": "SUBMITTER_SCHEDULED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Failed",
		"attributeName": "SUBMITTER_FAILED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Deploying",
		"attributeName": "SUBMITTER_READY",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Completed",
		"attributeName": "SUBMITTER_COMPLETED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Rejected",
		"attributeName": "SUBMITTER_REJECTED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	}
	],
	"userId": 10000,
	"userName": "username",
	"password": "password*****",
	"groups": [10010,10011],
	"isActive": true,
	"email": "email@company.com",
	"lastName": "Last",
	"firstName": "First",
	"isLocalUser": true
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/administration/security/user/10000

The GET request would return the following JSON user object

...

themeEclipse
titleUser - 10000

...

GET (Using Query Parameters)

This GET service will return a list of users in the form of JSON objects based on the query parameters user name, first name, last name and group id. Users are only returned if they match all of the specified query parameters. If no query parameters are given this request will return the entire list of users.

Info
titleAPI URLs

http://host:port/flexdeploy/rest/v1/administration/security/user?

Append the following character sequences to the above URL to specify Query parameters.
Use '&' between successive query parameters: 

userName={userName}

firstName={firstName} *

lastName={lastName} *

groupId={groupId}

Examples:
To search by user name only:

http://host:port/flexdeploy/rest/topology/administration/security/user?userName=fdadmin

To search by first name and last name:

http://host:port/flexdeploy/rest/topology/administration/security/user?firstName=John&lastName=Smith

To search by group id

http://host:port/flexdeploy/rest/topology/administration/security/user?groupId=11101

* searching by first and last name returns all users that contain the specified string in their first or last name

Tip

The query parameters are not case sensitive. Searching by userName=NAME is the same as searching by userName=name.

Request

AttributesTypeRequiredDescription
groupIdLongNoFind users that are member of specific group
userNameStringNoEquals search
firstNameStringNoContains ignore case search
lastNameStringNoContains ignore case search

Include Page
REST V1 User Response
REST V1 User Response

Example

If we had a user in our database with an Id of 10000 and had the following attributes

Code Block
themeEclipse
titleUser - 10000
{
	"attributes": [
	{
		"description": "Notify on RequestApproval CompletedRequired",
		"attributeName": "SUBMITTER_PENDING_COMPLETEDAPPROVAL",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request RejectedScheduled",
		"attributeName": "SUBMITTER_REJECTEDSCHEDULED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	],{
		"userIddescription": 10000 "Notify on Request Failed",
		"userNameattributeName": "usernameSUBMITTER_FAILED",
		"passwordattributeValue": "passwordtrue",
		"groupsattributeGroup": [10010,10011],"EMAIL_COMMUNICATION",
		"isActiveattributeDataType": true,
	"email"Boolean"
	},
	{
		"description": "Notify on Request Deploying",
		"attributeName": "email@company.comSUBMITTER_READY",
		"lastNameattributeValue": "Lasttrue",
		"firstNameattributeGroup": "FirstEMAIL_COMMUNICATION",
		"isLocalUserattributeDataType": true"Boolean"
}

Back to Top

GET (Using Query Parameters)

This GET service will return a list of users in the form of JSON objects based on the query parameters user name, first name, last name and group id. Users are only returned if they match all of the specified query parameters. If no query parameters are given this request will return the entire list of users.

Info
titleAPI URLs

http://host:port/flexdeploy/rest/administration/security/user?

Append the following character sequences to the above URL to specify Query parameters.
Use '&' between successive query parameters: 

userName={userName}

firstName={firstName} *

lastName={lastName} *

groupId={groupId}

Examples:
To search by user name only:

http://host:port/flexdeploy/rest/topology/administration/security/user?userName=fdadmin

To search by first name and last name:

http://host:port/flexdeploy/rest/topology/administration/security/user?firstName=John&lastName=Smith

To search by group id
http://host:port/flexdeploy/rest/topology/
	},
	{
		"description": "Notify on Request Completed",
		"attributeName": "SUBMITTER_COMPLETED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Rejected",
		"attributeName": "SUBMITTER_REJECTED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	}
	],
	"userId": 10000,
	"userName": "username",
	"password": "password",
	"groups": [10010,10011],
	"isActive": true,
	"email": "email@company.com",
	"lastName": "Last",
	"firstName": "First",
	"isLocalUser": true
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/v1/administration/security/user?groupId=

...

* searching by first and last name returns all users that contain the specified string in their first or last name

Tip

The query parameters are not case sensitive. Searching by userName=NAME is the same as searching by userName=name.

Parameters

...

Example

If we had a user in our database with an Id of 10000 and had the following attributes

...

themeEclipse
titleUser - 10000

...

10010

The GET request would return the  following JSON environment object

Code Block
themeEclipse
titleUser - 10000
[
{
	"attributes": [
	{
		"description": "Notify on Approval Required",
		"attributeName": "SUBMITTER_PENDING_APPROVAL",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Scheduled",
		"attributeName": "SUBMITTER_SCHEDULED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on ApprovalRequest RequiredFailed",
		"attributeName": "SUBMITTER_PENDING_APPROVALFAILED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request ScheduledDeploying",
		"attributeName": "SUBMITTER_SCHEDULEDREADY",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request FailedCompleted",
		"attributeName": "SUBMITTER_FAILEDCOMPLETED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request DeployingRejected",
		"attributeName": "SUBMITTER_READYREJECTED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{],
		"descriptionuserId": "Notify on Request Completed"10000,
		"attributeNameuserName": "SUBMITTER_COMPLETEDusername",
		"attributeValuepassword": "true*****",
		"attributeGroupgroups": "EMAIL_COMMUNICATION"[10010,10011],
		"attributeDataTypeisActive": "Boolean"
	},
	{true,
		"descriptionemail": "Notify on Request Rejectedemail@company.com",
		"attributeNamelastName": "SUBMITTER_REJECTEDLast",
		"attributeValuefirstName": "trueFirst",
		"attributeGroupisLocalUser": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	true
}
	],
	"userId": 10000,
	"userName": "username",
	"password": "password",
	"groups": [10010,10011],
	"isActive": true,
	"email": "email@company.com",
	"lastName": "Last",
	"firstName": "First",
	"isLocalUser": true
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/administration/security/user?groupId=10010

The GET request would return the  following JSON environment object

Code Block
themeEclipse
titleUser - 10000
[
{
	"attributes": [
	{
		"description": "Notify on Approval Required",
		"attributeName": "SUBMITTER_PENDING_APPROVAL",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},]

POST

This POST service will create a new user with the same attributes as the given JSON object.

Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/administration/security/user

Request

AttributesTypeRequiredDescription
attributesList<Attribute>NoThe list of attributes associated with the user. They will be defaulted if not provided
userNameStringYesThe user name of the user
passwordStringYesThe user's password. Note: this value is displayed as "*****" when retrieved.
groupsList<Long>NoThe ids of the groups that the user is a member of
isLocalUserBooleanNoWhether or not the user was made in FlexDeploy. Set to true upon creation.
isActiveBooleanNoWhether or not the user is active. Defaulted to true if not provided.
emailStringYesThe user's email
firstNameStringYesThe first name of the user
lastNameStringYesThe last name of the user

Include Page
REST V1 User Response
REST V1 User Response

Example

If the POST request receives the following JSON user object,

Code Block
themeEclipse
titleUser - 10000
{
	"userName": "username",
	"password": "password",
	"email": "email@company.com",
	"lastName": "Last",
	"firstName": "First"
}

The following user object will then be created as a new row in the database.

Code Block
themeEclipse
titleUser - 10000
{
	"attributes": [
	{
		"description": "Notify on RequestApproval ScheduledRequired",
		"attributeName": "SUBMITTER_PENDING_SCHEDULEDAPPROVAL",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request FailedScheduled",
		"attributeName": "SUBMITTER_FAILEDSCHEDULED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request DeployingFailed",
		"attributeName": "SUBMITTER_READYFAILED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request CompletedDeploying",
		"attributeName": "SUBMITTER_COMPLETEDREADY",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request RejectedCompleted",
		"attributeName": "SUBMITTER_REJECTEDCOMPLETED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	],{
		"userIddescription": 10000"Notify on Request Rejected",
		"userNameattributeName": "usernameSUBMITTER_REJECTED",
		"passwordattributeValue": "passwordtrue",
		"groupsattributeGroup": [10010,10011"EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	}
	],
	"isActiveuserId": true10000,
	"emailuserName": "email@company.comusername",
	"lastNamepassword": "Last*****",
	"firstNamegroups": "First"[],
	"isLocalUserisActive": true,
}
]

Back to Top

POST

...

	"email": "email@company.com",
	"lastName": "Last",
	"firstName": "First",
	"isLocalUser": true
}

PUT

This PUT service will update all attributes of a user with the given Id based on the attributes of a JSON object parameters. Attributes that are not provided will become their default values.

Info
titleAPI URL

http://host:port/flexdeploy/rest/administration/security/user

...

/{Id}

Request

AttributesTypeRequiredDescription
userId
Id
Long
URL
No
YesThe
id of
PUT will be performed on the user
. This
with the specified id that is
set when creating and returned
found in the
JSON
URL.
attributesList<Attribute>NoThe list of attributes associated with the user. They will be defaulted if not provided
userNameStringYesThe user name of the user
passwordStringYesThe user's password. Note: this value is displayed as "*****" when retrieved.
groupsList<Long>NoThe ids of the groups that the user is a member of
isLocalUserBooleanNoWhether or not the user was made in FlexDeploy.
Set to true upon creation
Cannot be changed.
isActiveBooleanNoWhether or not the user is active. Defaulted to true if not provided.
emailStringYesThe user's email
firstNameStringYesThe first name of the user
lastNameStringYesThe last name of the user

Include Page
REST V1 User Response
REST V1 User Response

Example

If the POST request receives the following JSON user object,we had a user in our database with an Id of 10000 and had the following attributes

Code Block
themeEclipse
titleUser - 10000
{
	"userNameattributes": "username",[
	{
		"passworddescription": "passwordNotify on Approval Required",
		"emailattributeName": "email@company.comSUBMITTER_PENDING_APPROVAL",
		"lastNameattributeValue": "Lastfalse",
		"firstNameattributeGroup": "FirstEMAIL_COMMUNICATION"
}

The following user object will then be created as a new row in the database.

Code Block
themeEclipse
titleUser - 10000
{
	"attributes": [,
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on ApprovalRequest RequiredScheduled",
		"attributeName": "SUBMITTER_PENDING_APPROVALSCHEDULED",
		"attributeValue": "truefalse",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request ScheduledFailed",
		"attributeName": "SUBMITTER_SCHEDULEDFAILED",
		"attributeValue": "truefalse",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request FailedDeploying",
		"attributeName": "SUBMITTER_FAILEDREADY",
		"attributeValue": "truefalse",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request DeployingCompleted",
		"attributeName": "SUBMITTER_READYCOMPLETED",
		"attributeValue": "truefalse",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request CompletedRejected",
		"attributeName": "SUBMITTER_COMPLETEDREJECTED",
		"attributeValue": "truefalse",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{],
		"descriptionuserId": "Notify on Request Rejected"10000,
		"attributeNameuserName": "SUBMITTER_REJECTEDusername",
		"attributeValuepassword": "truepassword",
		"attributeGroupgroups": [],
	"EMAIL_COMMUNICATION"isActive": true,
		"attributeDataTypeemail": "Boolean"
	}
	],
	"userId": 10000,
	"userName": "username",
	"password": "password",
	"groups": [],
	"isActive": true,
	"email": "email@companyemail@company.com",
	"lastName": "Last",
	"firstName": "First",
	"isLocalUser": true
}

Back to Top

PUT

This PUT service will update all attributes of a user with the given Id based on the attributes of a JSON object parameters.

...

titleAPI URL

...

When we run a PUT request at the following URL

http://host:port/flexdeploy/administration/security/user/

...

10000

And the PUT request receives the following JSON user object,

Code Block
themeEclipse
titleSample PUT JSON RequestUser - 10000
{
	"attributes": [
	{
		"description": "ThisNotify ison PutApproval 1Required",
   "instances		"attributeName": [15100],
   "isActive"SUBMITTER_PENDING_APPROVAL",
		"attributeValue": "false",
		"attributeGroup":   "environmentCode"EMAIL_COMMUNICATION",
		"attributeDataType": "PUT1Boolean",
	}
	],
 	"sortNumberuserName": 6"newusername",
	"password": "password",
 	"environmentIdgroups": 00000[],
   	"isBuildEnvironmentisActive": true,
   	"environmentNameemail": "Put 1"
}

Parameters

...

Parameters

...

Type

...

Required

...

Description

...

Example

If we had an environment in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleEnvironment PUT JSON
{
   "description": "This is Environment 1" 
   "instances": [15100],
   "isActive": true,
   "environmentCode": "ENV1",
   "sortNumber": 1,
   "environmentId": 11101,
   "isBuildEnvironment": true,
   "environmentName": "Env 1"
}

When we run a PUT request at the following URL

http://host:port/flexdeploy/rest/topology/environment/11101

And the PUT request receives the following JSON environment object,

Code Block
themeEclipse
titleEnvironment PUT Receive JSON
{
   "description": "This is the updated Environment 1",
   "instances": [15101],
   "isActive": true,
   "environmentCode": "PUT2",
   "sortNumber": 2,
   "environmentId": 11101,
   "isBuildEnvironment": false,
   "environmentName": "PUT 2"
}

The PUT request would then update the environment with Id 11101 and return the  following JSON environment object

Code Block
themeEclipse
titleEnvironment PUT Return JSON
{
   "description": "This is the updated Environment 1",
   "instances": [15101],
   "isActive": true,
   "environmentCode": "PUT2",
   "sortNumber": 2,
   "environmentId": 11101,
   "isBuildEnvironment": false,
   "environmentName": "PUT 2"
}

Back to Top

PATCH

This PATCH service will update an existing environment with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the environment.

Info
titleAPI URL

http://host:port/flexdeploy/rest/topology/environment/{Id}

Parameters

...

Parameters

...

Type

...

Required

...

Description

...

Example

If we had an environment in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleEnvironment PATCH JSON
{
   "description": "This is Environment 1",
   "instances": [15101],
   "isActive": true,
   "environmentCode": "ENV1",
   "sortNumber": 1,
   "environmentId": 11101,
   "isBuildEnvironment": false,
   "environmentName": "Env 1"
}

When we run a PATCH request at the following URL

http://host:port/flexdeploy/rest/topology/environment/11101

And the PATCH request receives the following JSON environment object,

Code Block
themeEclipse
titleEnvironment PATCH Receive JSON
{
   "description": "This is Patch with some null attributes",
   "instances": [15102,15103],
   "isActive": null,
   "environmentCode": null,
   "sortNumber": 7,
   "environmentId": null,
   "isBuildEnvironment": false,
   "environmentName": "Patch with some null"
}

The PATCH request would then update the environment with Id 11101 and return the  following JSON environment object

Code Block
themeEclipse
titleEnvironment PATCH Return JSON
{
   "description": "This is Patch with some null attributes",
   "instances": [15102,15103],
   "isActive": true,
   "environmentCode": "ENV1",
   "sortNumber": 7,
   "environmentId": 11101,
   "isBuildEnvironment": false,
   "environmentName": "Patch with some null"
}

...

newemail@company.com",
	"lastName": "Lastname",
	"firstName": "Firstname"
}

The PUT request would then update the environment with Id 11101 and return the  following JSON environment object

Code Block
themeEclipse
titleUser - 10000
{
	"attributes": [
	{
		"description": "Notify on Approval Required",
		"attributeName": "SUBMITTER_PENDING_APPROVAL",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Scheduled",
		"attributeName": "SUBMITTER_SCHEDULED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Failed",
		"attributeName": "SUBMITTER_FAILED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Deploying",
		"attributeName": "SUBMITTER_READY",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Completed",
		"attributeName": "SUBMITTER_COMPLETED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Rejected",
		"attributeName": "SUBMITTER_REJECTED",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	}
	],
	"userId": 10000,
	"userName": "newusername",
	"password": "*****",
	"groups": [],
	"isActive": true,
	"email": "newemail@company.com",
	"lastName": "Lastname",
	"firstName": "Firstname",
	"isLocalUser": true
}

PATCH

This PATCH service will update an existing user with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the user. Groups that are included in a PATCH will be added, but existing groups will still remain.

Info
titleAPI URL

http://host:port/flexdeploy/administration/security/user/{Id}

Request

AttributesTypeRequiredDescription
IdURLYesThe PUT will be performed on the user with the specified id that is found in the URL.
attributesList<Attribute>NoThe list of attributes associated with the user. Only provided attributes will be changed.
userNameStringNoThe user name of the user
passwordStringNoThe user's password. Note: this value is displayed as "*****" when retrieved.
groupsList<Long>NoThe ids of the groups that the user is a member of
isLocalUserBooleanNoWhether or not the user was made in FlexDeploy.
isActiveBooleanNoWhether or not the user is active.
emailStringNoThe user's email
firstNameStringNoThe first name of the user
lastNameStringNoThe last name of the user

Include Page
REST V1 User Response
REST V1 User Response

Example

If we had an environment in our database with an Id of 11101 and had the following attributes

Code Block
themeEclipse
titleUser - 10000
{
	"attributes": [
	{
		"description": "Notify on Approval Required",
		"attributeName": "SUBMITTER_PENDING_APPROVAL",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Scheduled",
		"attributeName": "SUBMITTER_SCHEDULED",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Failed",
		"attributeName": "SUBMITTER_FAILED",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Deploying",
		"attributeName": "SUBMITTER_READY",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Completed",
		"attributeName": "SUBMITTER_COMPLETED",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Rejected",
		"attributeName": "SUBMITTER_REJECTED",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	}
	],
	"userId": 10000,
	"userName": "username",
	"password": "password",
	"groups": [10001],
	"isActive": true,
	"email": "email@company.com",
	"lastName": "Last",
	"firstName": "First",
	"isLocalUser": true
}

When we run a PATCH request at the following URL

http://host:port/flexdeploy/administration/security/user/10000

And the PATCH request receives the following JSON user object,

Code Block
themeEclipse
titleUser - 10000
{
	"attributes": [
	{
		"description": "Notify on Approval Required",
		"attributeName": "SUBMITTER_PENDING_APPROVAL",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	}
	],
	"password": "newPassword",
	"groups": [10010]
}

The PATCH request would then update the user with Id 10000 and return the  following JSON user object

Code Block
themeEclipse
titleUser - 10000
{
	"attributes": [
	{
		"description": "Notify on Approval Required",
		"attributeName": "SUBMITTER_PENDING_APPROVAL",
		"attributeValue": "true",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Scheduled",
		"attributeName": "SUBMITTER_SCHEDULED",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Failed",
		"attributeName": "SUBMITTER_FAILED",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Deploying",
		"attributeName": "SUBMITTER_READY",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Completed",
		"attributeName": "SUBMITTER_COMPLETED",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	},
	{
		"description": "Notify on Request Rejected",
		"attributeName": "SUBMITTER_REJECTED",
		"attributeValue": "false",
		"attributeGroup": "EMAIL_COMMUNICATION",
		"attributeDataType": "Boolean"
	}
	],
	"userId": 10000,
	"userName": "username",
	"password": "*****",
	"groups": [10001, 10010],
	"isActive": true,
	"email": "email@company.com",
	"lastName": "Last",
	"firstName": "First",
	"isLocalUser": true
}