<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello, Jeremiah,</p>
<p>
<blockquote type="cite">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?</blockquote>
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.</p>
<p>I would suggest you to create a JIRA ticket for this.</p>
<p>Best regards,<br>
</p>
<pre class="moz-signature" cols="72">--
Pavol Mederly
Software developer
evolveum.com</pre>
<div class="moz-cite-prefix">On 28/07/2022 19:38, Haywood, Jeremiah
via midPoint wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CH0PR03MB6050F0D337316ACEDB15E952E4969@CH0PR03MB6050.namprd03.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}span.EmailStyle19
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hey all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Looking for guidance on if OperationResult
(<a
href="https://docs.evolveum.com/midpoint/architecture/concepts/operation-result/"
moz-do-not-send="true" class="moz-txt-link-freetext">https://docs.evolveum.com/midpoint/architecture/concepts/operation-result/</a>)
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:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">{<o:p></o:p></p>
<p class="MsoNormal"> "@ns" : <a
href="http://prism.evolveum.com/xml/ns/public/types-3"
moz-do-not-send="true" class="moz-txt-link-freetext">http://prism.evolveum.com/xml/ns/public/types-3</a>,<o:p></o:p></p>
<p class="MsoNormal"> "object" : {<o:p></o:p></p>
<p class="MsoNormal"> "@type" : <a
href="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3#PolicyItemsDefinitionType"
moz-do-not-send="true" class="moz-txt-link-freetext">http://midpoint.evolveum.com/xml/ns/public/common/api-types-3#PolicyItemsDefinitionType</a>,<o:p></o:p></p>
<p class="MsoNormal"> "policyItemDefinition" : [ {<o:p></o:p></p>
<p class="MsoNormal"> "valuePolicyRef" : {<o:p></o:p></p>
<p class="MsoNormal"> "@ns" : <a
href="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
moz-do-not-send="true" class="moz-txt-link-freetext">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>,<o:p></o:p></p>
<p class="MsoNormal"> "oid" :
"adc8ffb9-dfb3-47fb-86b2-74181dc06d78",<o:p></o:p></p>
<p class="MsoNormal"> "type" : "c:ValuePolicyType"<o:p></o:p></p>
<p class="MsoNormal"> },<o:p></o:p></p>
<p class="MsoNormal"> "value" : "ab1afGasfsdf+2",<o:p></o:p></p>
<p class="MsoNormal"> "result" : {<o:p></o:p></p>
<p class="MsoNormal"> "operation" : "validateValue",<o:p></o:p></p>
<p class="MsoNormal"> "status" : "success",<o:p></o:p></p>
<p class="MsoNormal"> "partialResults" : [ {<o:p></o:p></p>
<p class="MsoNormal"> "operation" :
"com.evolveum.midpoint.model.common.stringpolicy.ValuePolicyProcessor.stringPolicyValidation",<o:p></o:p></p>
<p class="MsoNormal"> "status" : "success",<o:p></o:p></p>
<p class="MsoNormal"> ...omitted...<o:p></o:p></p>
<p class="MsoNormal"> }, {<o:p></o:p></p>
<p class="MsoNormal"> "operation" : "Tested
limitation: lowercase",<o:p></o:p></p>
<p class="MsoNormal"> "status" : "success",<o:p></o:p></p>
<p class="MsoNormal"> "importance" : "normal",<o:p></o:p></p>
<p class="MsoNormal"> "end" :
"2022-07-28T11:14:25.546-05:00",<o:p></o:p></p>
<p class="MsoNormal"> "token" :
1000000000000086994<o:p></o:p></p>
<p class="MsoNormal"> }, {<o:p></o:p></p>
<p class="MsoNormal"> "operation" : "Tested
limitation: uppercase",<o:p></o:p></p>
<p class="MsoNormal"> "status" : "success",<o:p></o:p></p>
<p class="MsoNormal"> "importance" : "normal",<o:p></o:p></p>
<p class="MsoNormal"> "end" :
"2022-07-28T11:14:25.546-05:00",<o:p></o:p></p>
<p class="MsoNormal"> "token" :
1000000000000086995<o:p></o:p></p>
<p class="MsoNormal"> }, {<o:p></o:p></p>
<p class="MsoNormal"> "operation" : "Tested
limitation: numbers",<o:p></o:p></p>
<p class="MsoNormal"> "status" : "success",<o:p></o:p></p>
<p class="MsoNormal"> "importance" : "normal",<o:p></o:p></p>
<p class="MsoNormal"> "end" :
"2022-07-28T11:14:25.546-05:00",<o:p></o:p></p>
<p class="MsoNormal"> "token" :
1000000000000086996<o:p></o:p></p>
<p class="MsoNormal"> }, {<o:p></o:p></p>
<p class="MsoNormal"> "operation" : "Tested
limitation: special characters",<o:p></o:p></p>
<p class="MsoNormal"> "status" : "success",<o:p></o:p></p>
<p class="MsoNormal"> "importance" : "normal",<o:p></o:p></p>
<p class="MsoNormal"> "end" :
"2022-07-28T11:14:25.546-05:00",<o:p></o:p></p>
<p class="MsoNormal"> "token" :
1000000000000086997<o:p></o:p></p>
<p class="MsoNormal"> } ]<o:p></o:p></p>
<p class="MsoNormal"> } ]<o:p></o:p></p>
<p class="MsoNormal"> } ]<o:p></o:p></p>
<p class="MsoNormal"> } ]<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> } ]<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Jeremiah Haywood<o:p></o:p></p>
<p class="MsoNormal">Lead IAM Administrator<o:p></o:p></p>
<p class="MsoNormal">Office of Technology Solutions | Illinois
State University<o:p></o:p></p>
<p class="MsoNormal">Phone Number (309) 438-3829<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="https://lists.evolveum.com/mailman/listinfo/midpoint">https://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
</body>
</html>