RajRao

Report API return fields in different order

0 votes
I was investigating the data captured by OneSpan and made available through the REST API and also, if I can use PowerBi to display the data. I am trying to use the completion report API (https://developer.esignlive.com/guides/feature-guides/completion-report/#rest-api). One issue that I am running into is the fact that OneSpan seems to reorder the columns. (See attached images). In this case, I am using the “Accept” header and its set to text/csv. A similar issue seems to be occurring with JSON. Especially with the CSV based return data, the reordering of columns causes PowerBi to not be able to read the data correctly, as the columns keep changing. I was wondering if there is parameter that can be passed to fix the column order for both the CSV and the JSON data returned?

Attachments
1-5.png11.06 KB
2-4.png13.09 KB
3-2.png2.75 KB

Reply to: Report API return fields in different order

0 votes
Hi Raj, I'm afraid there's no out of the box function to fix the column order or JSON fields order. When OneSpan Sign sytem was trying to serialize objects to JSON string or CSV file stream, there seems no annotation defining the order of fields. So we can fill in an Enhancement Request for this feature util the production behavior changes. Or for a quick workaround, is it possible for you to add a middleware service to reorder the CSV column order? Can you add the custom function when downloading the completion report or when importing to PowerBi? Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Report API return fields in different order

0 votes
Adding middleware is possible, but we were attempting to come up with a solution that directly used OneSpan APIs from a PowerBi online report and would like to avoid custom development. What about the CSV order? Can that be fixed?

Reply to: Report API return fields in different order

0 votes
Hi Raj, As we discussed above, the CSV column order is not fixed for the time being. I'll create a support ticket on your behalf and CC you and let's see whether there will be a quick fix for this in recent release. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off