Webhooks are a way for external systems to receive events from the Cymmetri Identity Platform.
Requires the tenant organization to run a web server that is exposed to the Internet or at least accessible from the Cymmetri Cloud 2.0 deployment on the cloud
Events may be received for the following events -
Testing Webhook - Generates a POST request to the /test endpoint of the web server hosted by the tenant. It provides an authorization token that can be used for making any API calls to the Cymmetri Cloud 2.0 APIs. Is generated after this configuration. Go to the Configuration Menu and Select the webhooks menu -
Click on the save & test button.
Pre Create User - Generates a POST request, before the user is created, to the /preCreateUser endpoint of the web server hosted by the tenant.
Pre Update User - Generates a POST request, before the user is updated, to the /preUpdateUser endpoint of the web server hosted by the tenant.
Post Update User - Generates a POST request, after the user is updated, to the /postUpdateUser endpoint of the web server hosted by the tenant.
Validate User - Generates a POST request, before the user is created and validation is to be run, to the /validateUser endpoint of the web server hosted by the tenant.
Validate Update User - Generates a POST request, before the user is created and validation is to be run, to the /validateUpdateUser endpoint of the web server hosted by the tenant.
Change password - Generates a POST request, upon the change of password for a user, to the /changePassword endpoint of the web server hosted by the tenant.
Pre Provision - Generates a POST request, before the provisioning of the user to an application, to the /preProvision endpoint of the web server hosted by the tenant.
Post Provision - Generates a POST request, after the provisioning of the user to an application, to the /postProvision endpoint of the web server hosted by the tenant.
Policy Map - Generates a POST request, while assigning the application to a user, to the /policyMap endpoint of the web server hosted by the tenant.
Deprovision Run - Generates a POST request, upon the update of a user to deprovision a user, to the /runDeprovision endpoint of the web server hosted by the tenant.
While other webhooks operate on a principle of fire-and-forget, the validateUser and the validateUpdateUser expect the response from the tenant as the same or modified body as sent to it for validation.
Test web hook
Purpose : This api is used to test web hook api.
Input Needed: NA
Curl Request:
curl --location --request POST 'http://192.168.29.227:8080/webhook/test' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
}'
Response:
{ "response": {} }
Pre Create User
Purpose : This web hook api is used to do some events before creating a user in the target system.
Input needed :
{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Curl request:
curl --location --request POST 'https://52.66.206.31:8080/webhook/preCreateUser' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}'
Response: {
"response": {
"data": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Post create User
Purpose : This web hook is used to do some events after creating a user in the target system.
Curl request: curl --location --request POST 'http://192.168.1.193:8080/webhook/postCreateUser' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}'
Response : NA
Restful API - Pre update user
Purpose : This web hook is used to do some events before updating a user in the target system.
Input needed:
{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Curl request:
curl --location --request POST 'http://192.168.1.193:8080/webhook/preUpdateUser' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}'
Response
{
"response": {
"data": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Post update user
Purpose : This web hook is used to do some events after updating a user in the target system.
Input needed :
{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Curl request:
curl --location --request POST 'http://192.168.1.193:8080/webhook/postUpdateUser' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}'
Response: NA
Validate User
Purpose : This web hook is used to validate users before creating a user in the target system.
Input Needed :
{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Curl request: curl --location --request POST 'http://192.168.1.193:8080/webhook/validateUser' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}'
Response: {
"response": {
"error": true,
"message": "MobileAlreadyExist"
}
}
Validate update user
Purpose : This web hook is used to validate users before updating a user in the target system.
Input needed:
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Curl request:
curl --location --request POST 'http://192.168.1.193:8080/webhook/validateUpdateUser' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}'
Response:
{
"response": {
"error": true,
"message": "EmailAlreadyExist"
}
}
Change password
Purpose : This web hook is used to do some events on password change.
Input Needed :
{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
},
"passwordText" : "Welcome@123"
}
}
Curl request: curl --location --request POST 'http://192.168.1.193:8080/webhook/changePassword' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
},
"passwordText" : "Welcome@123"
}
}'
Response: NA
Pre provision
Purpose : This web hook is used to do some events before assigning applications to a user.
Input Needed :
{
"request": {
"policyMap" : "email",
"form" : "",
"applicationId" : "620231fee789224ec1cec3dd",
"roleList" : [],
"action" : "Application Create",
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Curl Request:
curl --location --request POST 'http://192.168.1.193:8080/webhook/preProvision' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"policyMap" : "email",
"form" : "",
"applicationId" : "620231fee789224ec1cec3dd",
"roleList" : [],
"action" : "Application Create",
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}'
Response : NA
Post provision
Purpose : This web hook is used to do some events after assigning applications to a user.
Input Needed :
{
"request": {
"policyMap" : "email",
"form" : "",
"applicationId" : "620231fee789224ec1cec3dd",
"roleList" : [],
"action" : "Application Create",
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
},
"isSuccess" : true,
"uid" : "5f36283bc193991db0990d3e"
}
}
Curl response :
curl --location --request POST 'http://192.168.1.193:8080/webhook/postProvision' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"policyMap" : "email",
"form" : "",
"applicationId" : "620231fee789224ec1cec3dd",
"roleList" : [],
"action" : "Application Create",
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
},
"isSuccess" : true,
"uid" : "5f36283bc193991db0990d3e"
}
}'
Response : NA
Policy map
Purpose : This web hook is used to do some events on policy map while assigning the application to a user.
Input needed :
"request": {
"targetAttribute" : "email",
"cymmetrifield" : "email",
"defaultValue" : "example@gmail.com",
"formVeriable" : "",
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Curl request :
curl --location --request POST 'https://52.66.206.31:8080/webhook/policymap' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"targetAttribute" : "email",
"cymmetrifield" : "email",
"defaultValue" : "example@gmail.com",
"formVeriable" : "",
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}'
Response :
{
"response": {
"mappedValue": "valid"
}
}
Run deprovisioning
Purpose : This web hook is used for deprovisioning applications when users get updated .
Input needed :
{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}
Curl request:
curl --location --request POST 'https://52.66.206.31:8080/webhook/runDeprovision' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImRlbGVnYXRlZSI6bnVsbCwiZGVsZWdhdGVlSWQiOm51bGwsImZpcnN0TG9naW4iOmZhbHNlLCJyb2xlcyI6WyJPUkdfQURNSU4iLCJVU0VSIl0sInRlbmFudElkIjoiYXMxMDAiLCJleHAiOjE2NDYzOTYzMDgsInVzZXJJZCI6IjYyMTRkYjdiZDY2MWE1NzM4NmE3MWYxMCIsImlhdCI6MTY0NjM5MDMwOH0.bdKZ3UBCedT91bJAWLCo2AOahIs5ClFMAhnj36f_ecQ' \
--header 'Content-Type: application/json' \
--data-raw '{
"request": {
"user": {
"assignedGroups": [],
"provisionedApps": {},
"securityQuestion": {},
"country": "India",
"firstName": "Shreyash2",
"lastName": "Pande2",
"login": "shreyash2",
"userType": "Employee"
}
}
}'
Response:
{
"response": {
"data": true
}
}