REST API - Create User Request
9 min
/api/v1/users description creates a user with specific defined properties url structure \[blueprint uri]/api/v1/users supported methods post docid\ hsi lzxs8g rx ydudzkg request body the new 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 \<?xml version="1 0" ?>\<users xmlns="http //www blueprintsys com/blueprint/api/v1"> \<user> \<email>dquade2084\@dev recall com\</email> \<department>devops\</department> \<displayname>quaaade\</displayname> \<firstname>douglas\</firstname> \<lastname>quade\</lastname> \<name>dquade\</name> \<enabled>true\</enabled> \<password>@quaaade#1\</password> \<expiredpassword>false\</expiredpassword> \<groupids xmlns\ i="http //schemas microsoft com/2003/10/serialization/arrays"> \<i\ int>8\</i\ int> \</groupids> \<title>engineer\</title> \</user>\</users> response body language php template \<useraddresults xmlns\ i="http //www w3 org/2001/xmlschema instance" xmlns="http //www blueprintsys com/blueprint/api/v1"> \<useraddresult> \<message>user has been created successfully\</message> \<resultcode>201\</resultcode> \<user> \<displayname>quaaade\</displayname> \<enabled>false\</enabled> \<firstname>douglas\</firstname> \<groups /> \<id>3754\</id> \<lastname>quade\</lastname> \<name>dquade\</name> \<title>engineer\</title> \</user> \</useraddresult>\</useraddresults> json example request uri https //production blueprintcloud com/api/v1/users request body \[ { "type" "user", "name" "dquade", "displayname" "quaaade", "firstname" "douglas", "lastname" "quade", "groupids" \[ "1", "8", "12" ], "title" "engineer", "department" "devops", "password" "#fr33m4r5", "enabled" true, "email" "dquade2084\@dev recall com" }] response body \[ { "user" { "type" "user", "id" 2084, "name" "dquade", "displayname" "quaaade", "firstname" "douglas", "lastname" "quade", "groupids" \[ "1", "8", "12" ], "title" "engineer", "department" "devops", "password" "#fr33m4r5", "enabled" true, "email" "dquade2084\@devops recall com" }, "message" "user has been created successfully", "resultcode" 201 }]