[midPoint] OperationResult for Failed REST/RPC API Calls

Pavol Mederly mederly at evolveum.com
Wed Aug 17 14:46:20 CEST 2022


Hello, Jeremiah,

> When testing the same API endpoint with an invalid value I receive a 
> HTTP 409 Conflict but I don’t receive an OperationResult object. I was 
> hoping to get an object in return stating what portion it failed on. 
> Is this the expected behavior?
I think this is not the expected behavior. After all, it is more than 
natural that there will be some kind of indication what could not be 
validated if the validation failed.

I would suggest you to create a JIRA ticket for this.

Best regards,

-- 
Pavol Mederly
Software developer
evolveum.com

On 28/07/2022 19:38, Haywood, Jeremiah via midPoint wrote:
>
> Hey all,
>
> Looking for guidance on if OperationResult 
> (https://docs.evolveum.com/midpoint/architecture/concepts/operation-result/) 
> are regularly included for failed Midpoint API calls. I am testing out 
> /rpc/validate to validate a string against a valuePolicy. When I 
> complete the call with a valid value I receive an HTTP 200 status code 
> and an OperationResult containing the following information:
>
> {
>
>   "@ns" : http://prism.evolveum.com/xml/ns/public/types-3,
>
>   "object" : {
>
>     "@type" : 
> http://midpoint.evolveum.com/xml/ns/public/common/api-types-3#PolicyItemsDefinitionType,
>
>     "policyItemDefinition" : [ {
>
>       "valuePolicyRef" : {
>
>         "@ns" : 
> http://midpoint.evolveum.com/xml/ns/public/common/common-3,
>
>         "oid" : "adc8ffb9-dfb3-47fb-86b2-74181dc06d78",
>
>         "type" : "c:ValuePolicyType"
>
>       },
>
>       "value" : "ab1afGasfsdf+2",
>
>       "result" : {
>
>         "operation" : "validateValue",
>
>         "status" : "success",
>
>         "partialResults" : [ {
>
>               "operation" : 
> "com.evolveum.midpoint.model.common.stringpolicy.ValuePolicyProcessor.stringPolicyValidation",
>
>               "status" : "success",
>
>               ...omitted...
>
>               }, {
>
>                 "operation" : "Tested limitation: lowercase",
>
>                 "status" : "success",
>
>                 "importance" : "normal",
>
>                 "end" : "2022-07-28T11:14:25.546-05:00",
>
>                 "token" : 1000000000000086994
>
>               }, {
>
>                 "operation" : "Tested limitation: uppercase",
>
>                 "status" : "success",
>
>                 "importance" : "normal",
>
>                 "end" : "2022-07-28T11:14:25.546-05:00",
>
>                 "token" : 1000000000000086995
>
>               }, {
>
>                 "operation" : "Tested limitation: numbers",
>
>                 "status" : "success",
>
>                 "importance" : "normal",
>
>                 "end" : "2022-07-28T11:14:25.546-05:00",
>
>                 "token" : 1000000000000086996
>
>               }, {
>
>                 "operation" : "Tested limitation: special characters",
>
>                 "status" : "success",
>
>                 "importance" : "normal",
>
>                 "end" : "2022-07-28T11:14:25.546-05:00",
>
>                 "token" : 1000000000000086997
>
>               } ]
>
>             } ]
>
>           } ]
>
>         } ]
>
>       }
>
>     } ]
>
>   }
>
> }
>
> When testing the same API endpoint with an invalid value I receive a 
> HTTP 409 Conflict but I don’t receive an OperationResult object. I was 
> hoping to get an object in return stating what portion it failed on. 
> Is this the expected behavior?
>
> Thank you,
>
> Jeremiah Haywood
>
> Lead IAM Administrator
>
> Office of Technology Solutions | Illinois State University
>
> Phone Number (309) 438-3829
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> https://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20220817/f51da661/attachment.htm>


More information about the midPoint mailing list