REST Service and CloudScrape API

2
Dear, I'm currently trying to connect to the CloudScrape.com API using Mendix. Currently, I can trigger certain functionalities of CloudScrape application with values inputted from Mendix, however, I cannot process the response yet. At this point, I get this response: "Failed to connect to https://app.cloudscrape.com/api/runs/0145720e-f495-4fbd-9dd5-7f72445d3d81/execute/inputs: java.lang.IllegalArgumentException: Response body does not seem to be a valid JSON Object. A JSON object starts with '{' but found: " The Cloudscrape API uses gzip encoding, could this be the problem? And in either case, does somebody know how to deal with this problem?
asked
2 answers
1

Check out this thread, specifically Jasper's comment and solution. I assume you have the same issue.

answered
1

Thanks, that definitely helped! I have been able to import the APIs response into Mendix now. However, I'm stuck at another point now. The API responds with an array within an array:

"rows": [
    [
        "value 1",
        123.212,
        true
    ],
    [
        "value 2",
        542,
        false
    ],
    [
        "value 3",
        342,
        false
    ],
    [
        "value 4",
        5452,
        false
    ],
    [
        "value 5",
        32,
        true
    ]
]

I know I should work with the RESTServices.Primitive call to translate arrays into entities, however, that only seems to work properly for an array with a name right before it, not for an array within an array. Any ideas on this?

answered