Forum Stats

  • 3,759,507 Users
  • 2,251,556 Discussions


OPA Rest API Assess service


Calling application to OPA via Rest API has issues to send "" blank values to date and Number field in Json. OPA can only receive null keyword for empty values in Rest API but the calling system wants to send empty double quotes("").

Is there any solution to handle this scenario?


Siddeeq Basha Y K



  • Richard Napier
    Richard Napier Member Posts: 254 Silver Badge

    Hi Sideeq

    If you application does not have the ability to handle it, I suspect the only way to do it is not insert an intermediate layer to handle it. I've used PHP in the middle for example. That might be a simple solution.


  • Ian G Clough
    Ian G Clough Member Posts: 23 Red Ribbon

    You could create text attributes in OPA which should accept an empty value and then infer a date / number value with the appropriate function and supply a suitable default value. e.g.

    my number value = default (number(my number input), 0)

    I haven't tested this but something like this should work for you.