Upland OL User community

REST API : DataMapper : Use XML file as input fil


can web use XML as input file when wan’t to work with rest api ?
It’s work nice in worklow but nothing appear in documentation of Rest CookBook.



Yes, as far as the REST API is concerned, all data files are equivalent.
Of course, you will have to use an XML-based data mapping configuration to properly handle it.

When I use directly by web on my server it seem to work fine and return a DataSet ID.

But when I do the request from my client, the server return a 500 status code when I wan’t to get the result :

An unspecified error occurred which was caused by LoggedApplicationException: There was an error running the data mapping process caused by MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 47 path $ (SRV000012) (SRV000001)

Then, I try to send my file to FileStore with media type text/xml and FileStore status code is 415, unsupported media type.

The only difference I saw that I’m not inside a browser when I send my requests.
All others work fine, Submit, Progress, Handshake, … Only workflow/datamining/getResult have trouble.

Thx for your Help


Problem solved.
When I submit the process, I invert the configId and the fileId in the Url :frowning_face: :cold_face:

I’m not proud of this.


1 Like