POST http://localhost:8080/midpoint/ws/rest/notifyChange
Notify Change Operations
Description
Notify Change operation which can be used to "notify" midPoint of some change event which occurred on a resource. This is usable when the actual communication with the resource costs too many resources, is unsafe, slow or some other factors are against it.
Request
The request is executed as an HTTP POST operation. The request contains the "notifyChange" string as a part of the URI.
Headers
Regarding authorization type, the "Basic" Authorization header should be used.
Authorization: Basic {Base64EncodedCredentials}
To specify the provided content type, please use the "Content-Type" header payload in the body:
"Content-Type: application/json"
You might need to specify the accepted type of content in case you are interested in a format different from xml (default):
"Accept: application/json"
Body
The body should contain a payload consisting of a "resourceObjectShadowChangeDescription" type of object. Please see the examples below for an example of the content in the body of the request.
Options
No options are supported as a parameter for this request.
Response
Error code | Meaning |
---|---|
1xx |
Information. Stay tuned, operation is in progress. |
2xx |
Success. Operation finished successfully. There are two custom codes:
In this two cases, midPoint returns the OperationResult where there details of executed operations can be found. |
3xx |
Redirection or "in progress". This is returned mostly to indicate two cases:
|
4xx |
Client errors. The client has sent request that cannot be processed. This indicates usual situation that are well handled by the midPoint code. Maybe the client request to create conflicting object, delete non-existent object, modification that violates the schema and so on. The OperationResult structure is usually provided in the response to provide more details about the situation. |
5xx |
Server errors. Situations that the server cannot handle and where the cause is unknown. This usually means bugs in the code, insufficient resources such as RAM or disk space, unforeseen failures in the infrastructure and so on. The OperationResult structure might or might not be provided in this case. Some errors are so severe that the structured error information might not be available. |
Status codes and the indication of errors and asynchronous processing applies uniformly to all midPoint web resources (both RESTful and RPC).
Access Authorization
The interface authorization needed for executing this type of request. The authorization is needed to access the specific part of the interface. For more information please see this page.
-
http://midpoint.evolveum.com/xml/ns/public/security/authorization-rest-3#notifyChange
Model Authorization
The model authorization for the specific action. This authorization is needed to request/execute the concrete action. The examples are usually quite broad, and the actions can be additionally specified for a more fine-grained authorization. For more information please see this page.
-
http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#read
-
http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#get
-
http://midpoint.evolveum.com/xml/ns/public/security/authorization-model-3#notifyChange
Examples
In our examples we are authenticating with the credentials, name "administrator" and password "y0uR_P455woR*d" on a localhost instance running on port 8080. |
For some help regarding the REST examples please see this link:
.Notify password change on resource
curl --user administrator:y0uR_P455woR*d \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST http://localhost:8080/midpoint/ws/rest/notifyChange \
-v \
--data-binary @./samples/rest/notify-change-modify-password.json
Show data source example for "Notify password change on resource" | GitHub
{
"resourceObjectShadowChangeDescription": {
"oldShadowOid": "062ac29f-f296-4824-aeab-9a0feb9e8bd3",
"objectDelta": {
"@ns": "http://prism.evolveum.com/xml/ns/public/types-3",
"oid": "062ac29f-f296-4824-aeab-9a0feb9e8bd3",
"changeType": "modify",
"objectType": "ShadowType",
"itemDelta": {
"modificationType": "replace",
"path": "credentials/password/value",
"value": "y0uR_P455woR*d"
}
}
}
}
The response is an HTTP 200 code in case of success with an empty response body.