Create/Update users.

post

/cloudapi/restapi/user

This operation enables you to create and modify users records. The operation creates a user if a matching user does not exist in the system or modifies the user if a match is found. The primary key for the user object is loginId. Any new roles provided under the roles attribute are provisioned for the user by the operation. If the request data does not include roles assigned to the user in the existing database, those role assignments will be removed. If successful, this operation returns an accepted status (202) with a location header pointing to a jobId status. The operation is complete when the jobId status returns OK (200). The previous create user operation must complete before another create user operation is allowed.

Request

Supported Media Types
Body ()
Root Schema : RestDataStoreUserRO
Type: object
Show Source
Nested Schema : added
Type: array
Show Source
Nested Schema : deleted
Type: array
Show Source
Nested Schema : deleteFailed
Type: array
Show Source
Nested Schema : modified
Type: array
Show Source
Nested Schema : updatedIdMap
Type: object
Additional Properties Allowed
Show Source
Nested Schema : User
Type: object
Show Source
Nested Schema : CloudTZDateTime
Type: object
Show Source
Nested Schema : Organization
Type: object
Show Source
Nested Schema : password
Type: array
Show Source
Nested Schema : roles
Type: array
Show Source
Nested Schema : associations
Type: array
Unique Items Required: true
Show Source
Nested Schema : PwdPolicy
Type: object
Show Source
Nested Schema : Role
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

successful operation
Body ()
Root Schema : schema
Type: file

202 Response

Create/Modify Users request has been accepted and currently in progress.

400 Response

Invalid input, Please check.

500 Response

Internal Server Error. Underlying Identity Management System threw an error, Please check the logs.
Back to Top

Examples

Method

POST

Response Content Type

application/json

Operation

/cloudapi/restapi/user

cURL Example

REQUEST URL: http://<hostname>:<port>/cloudapi/restapi/user

curl -X POST "http://<hostname>:<port>/cloudapi/restapi/user" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"added\":[{ \"loginId\": \"JSMITH\", \"organization\": { \"name\": \"sfo\" }, \"userType\": \"EMP\", \"emailAddress\": \"jsmith@company.com\", \"firstName\": \"Jim\", \"lastName\": \"Smith\"}]}"

Request Body Example

{

"added": [

{

"organization": {

"name": "sfo",

"type": "Company"

},

"roles": [

{

"name": "PrimaveraUnifierProduction"

}

],

"loginId": "JSMITH",

"firstName": "JIM",

"lastName": "SMITH",

"emailAddress": "jim.smith@pgbu.com",

"userType": "EMP"

}

]

}

Response Body Example

51571

Modify a User example

Method

POST

Response Content Type

application/json

Operation

/cloudapi/restapi/user

cURL Example

REQUEST URL: http://<hostname>:<port>/cloudapi/restapi/user

curl -X POST http://<hostname>:<port>/cloudapi/restapi/user -H 'accept: application/json' -H 'content-type: application/json' -d '{"modified": [{"organization": {"name": "sfo","type": "Company"},"roles": [{"name": "PrimaveraUnifierProduction"}],"loginId": "JSMITH","firstName": "JIM","lastName": "SMITH","emailAddress": "jim.smith@company.com","userType": "EMP","id":"3366"} ]}'

Request Body Example

{

"modified": [

{

"organization": {

"name": "sfo",

"type": "Company"

},

"roles": [

{

"name": "PrimaveraUnifierProduction"

}

],

"loginId": "JSMITH",

"firstName": "JIM",

"lastName": "SMITH",

"emailAddress": "jim.smith@pgbu.com",

"userType": "EMP",

"id":"3366"

}

]

}

Response Body Example

69532

Back to Top