Programmatically Create/Update User and assign roles in oracle Fusion using the REST Web Services Part 1
Programmatically Create/Update User and assign roles in oracle Fusion using the REST Web Services Part 1
Below are the steps that will be covered in this Post to Manage the User information using REST Web Service using the Postman Tool
1) POST method to create a user along
with Password and email using below REST Web service
/hcmRestApi/scim/Users
2) GET method to query the user using below REST Web service
2) GET method to query the user using below REST Web service
/hcmRestApi/scim/Users/{id}
3) PATCH method to update and assign the Roles to the user using below REST Web service
3) PATCH method to update and assign the Roles to the user using below REST Web service
/hcmCoreSetupApi/scim/Roles/{id}
4) PATCH method to update the user information using below REST Web service
4) PATCH method to update the user information using below REST Web service
/hcmRestApi/scim/Users/{id}
Three Operations will be Performed in Postman Tool
1) POST Operation used for CREATION
2) GET Operation used for QUERY
2) GET Operation used for QUERY
3) PATCH Operation used for UPDATE
REST Web Service Used for Creating the User
hcmRestApi/scim/Users
Preparation of the REST Web Service URL
https://<host>:<port>/hcmRestApi/scim/Users
<host>:<port> in nothing but application Environment
1) POST Operation for Creating the User
Provide the Authorization user name and password who have access to execute this webservice.

Content-Type
application/json

REQUEST
Payload
"schemas":[
],
"name":{
},
"active":true,
"primary":true,
}
],
"displayName":"Kalam Abdul",
}
Load the above mention Creation of User Payload in the Body section of Postman Tool and Execute the webservice using the Send button.

Status Shows : 201 Created
It will provide the below response.
RESPONSE
"id": "AFF234DC29119F6FE050DD0AFA573C12",
},
"schemas": [
],
"externalId": "externalId4232:",
},
"displayName": "Kalam Abdul",
"value": "apjkalam@oracle.com",
}
],
"urn:scim:schemas:extension:fa:2.0:faUser": {
},
"active": true
}
Verify
using
the below select statement
select
* from per_users where username = 'ABDUL.KALAM'

Tools à Security Console

Search for the User "ABDUL.KALAM"

REST Web Services
/hcmRestApi/scim/Users/{id}

USER_GUID : AFF234DC29119F6FE050DD0AFA573C12
Provide the Basic Authorization and Execute the REST Web Service by Clicking on Send Button.

Status Shows : 200 OK
RESPONSE
{
"id": "AFF234DC29119F6FE050DD0AFA573C12",
"meta": {
"location": "https://<host>:<port>/hcmRestApi/scim/Users/AFF234DC29119F6FE050DD0AFA573C12",
"resourceType": "User",
"created": "2020-09-23 10:16:42.000",
"lastModified": "2020-09-23 10:16:42.037"
},
"schemas": [
"urn:scim:schemas:core:2.0:User",
"urn:scim:schemas:extension:fa:2.0:faUser"
],
"externalId": "externalId4232:",
"userName": "ABDUL.KALAM",
"name": {
"familyName": "ABDUL",
"givenName": "KALAM"
},
"displayName": "Kalam Abdul",
"preferredLanguage": "en",
"emails": [
{
"value": "apjkalam@oracle.com",
"type": "W",
"primary": true
}
],
"urn:scim:schemas:extension:fa:2.0:faUser": {
"userCategory": "DEFAULT"
},
"active": true
}
"id": "AFF234DC29119F6FE050DD0AFA573C12",
},
"schemas": [
],
"externalId": "externalId4232:",
},
"displayName": "Kalam Abdul",
"value": "apjkalam@oracle.com",
}
],
"urn:scim:schemas:extension:fa:2.0:faUser": {
},
"active": true
}
The Below two Steps will be Covered in the Part 2 URL Provided below,
3) PATCH method to update and assign the Roles to the user
4) PATCH method to update the user information
4) PATCH method to update the user information
Please provide your comments and questions and follow below youtube for more information about this post.
Comments
Post a Comment