REST API - Update User Request
9 min
/api/v1/users description updates the specified properties of a specific user url structure \[blueprint uri]/api/v1/users supported methods patch docid\ rcjvhrlby6de zgkehxui request body the artifact must be defined in the body of the request read more about how to define a user in the request body docid\ edohcu3ecpkubfxn5sp b http status codes 201 successfully created 207 partially successful some of the users could not be created refer to the codes in the response for the reason for each unsuccessfully added user 1192 a required value is missing or invalid username, display name, first name, last name, password 1193 the user was created, but could not be added to a group 1194 the assigned instance administrator role does not exist 400 bad request this error can occur for a variety of reasons at least one uri or request body parameter is invalid, such as one of the filter docid\ sv9gjverxczcgqdn28j7u , traces, offset or limit parameters a required value has not been provided if you are submitting a post docid\ hsi lzxs8g rx ydudzkg or patch docid\ rcjvhrlby6de zgkehxui request and have not added the x http method override parameter to your request header 401 unauthorized the blueprint token is missing, invalid or expired 403 forbidden the applicable permissions are needed for example, this error can occur when an author or collaborate license is needed for access comment permissions are needed on the artifact edit permissions are needed on the change summary job 409 conflict reason for failure can be found in the response body additional information may also be found in the log examples xml example request uri https //production blueprintcloud com/api/v1/users request body (modifies user title and department created in "create user" example) \<?xml version="1 0" ?>\<users xmlns="http //www blueprintsys com/blueprint/api/v1"> \<user> \<email>dquade2084\@dev recall com\</email> \<department>r\&d\</department> \<name>dquade\</name> \<enabled>true\</enabled> \<groupids xmlns\ i="http //schemas microsoft com/2003/10/serialization/arrays"> \<i\ int>1\</i\ int> \<i\ int>8\</i\ int> \<i\ int>12\</i\ int> \</groupids> \<title>senior engineer\</title> \</user>\</users> response body language php template \<userupdateresults xmlns\ i="http //www w3 org/2001/xmlschema instance" xmlns="http //www blueprintsys com/blueprint/api/v1"> \<userupdateresult> \<message>user information has been updated successfully\</message> \<resultcode>200\</resultcode> \<user> \<email>dquade2084\@dev recall com\</email> \<department>r\&d\</department> \<displayname>quaaade\</displayname> \<enabled>false\</enabled> \<firstname>douglas\</firstname> \<groups /> \<id>3754\</id> \<lastname>quade\</lastname> \<name>dquade\</name> \<title>senior engineer\</title> \</user> \</userupdateresult>\</useraddresults> json example request uri https //production blueprintcloud com/api/v1/users request body (modifies user title and department created in "create user" example) \[ { "type" "user", "name" "dquade", "displayname" "quaaade", "firstname" "douglas", "lastname" "quade", "groupids" \[ "1", "8", "12" ], "title" "senior engineer", "department" "randd", "password" "#fr33m4r5", "enabled" true, "email" "dquade2084\@dev recall com" }] response body \[ { "user" { "type" "user", "id" 1040, "name" "dquade jtest", "displayname" "quaaade jtest", "firstname" "douglas", "lastname" "quade", "groups" \[ { "type" "group", "id" 1, "name" "authorized" }, { "type" "group", "id" 8, "name" "gen mgrs" }, { "type" "group", "id" 12, "name" "sysgen group 1" } ], "title" "senior engineer", "department" "randd", "enabled" true, "email" "dquade2084\@dev recall com" }, "message" "user information has been updated successfully", "resultcode" 200 }]