[midPoint] OperationResult for Failed REST/RPC API Calls

Haywood, Jeremiah jhaywo1 at ilstu.edu
Thu Jul 28 19:38:53 CEST 2022


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#PolicyItemsDef
initionType,

    "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.string
PolicyValidation",

              "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

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20220728/874988f2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7264 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20220728/874988f2/attachment-0001.bin>


More information about the midPoint mailing list