Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to load data using QRS API. Everything goes fine, except "user/full". There are too many rows there. So I decided to cut the result.
Here is a JSON structure: https://help.qlik.com/en-US/sense-developer/February2019/APIs/repositoryserviceapi/index.html?page=1...
{"userId":"some_userId_value","attributes":{"attributeValue":"some_attributeValue_value"}}
Filtering by "userId" field works fine: https://localhost/qrs/user/full?filter=userId eq 'some_userId_value'
But I can't use same filtering logic with "attributeValue" field: https://localhost/qrs/user/full?filter=attributeValue eq 'some_attributeValue_value' gives error "Cannot convert the constant value: attributeValue".
As I can suggest, this is because "attributeValue" is a subfield (a part of "attributes" array).
But I don't know how to write field names in such a case and if it is possible at all.
Tried to hardcode "...filter=attribute/attributeValue eq..." and so on, but didn't help.
1) So the first question is what filter construction would be correct in case we need to filter by an attribute, which is not in root table?
As a workaround, I see Offset Pagination. But I have no idea, what should be 'Start','Record','Total' REST connector parameters in the QRS API. 'Start','Record' could be 'offset','limit', but I'm not sure. And what should be Total... And I found it a bit difficult to find any information about it.
2) And next question is what parameters to fill in REST connector pagination?
Might be a little late to the party here, but hopefully it will help someone in the future.
You mention the JSON structure is this:
{
"userId": "some_userId_value",
"attributes":{
"attributeValue": "some_attributeValue_value"
}
}
So to get to the attribute's value (which you call "some_attributeValue_value" in this example), you need to use the following filter:
filter=attributes.attributeValue eq 'some_attributeValue_value'
This navigates the nested properties of the JSON object properly.
Hope that helps someone!
Did you find a solution about paginating QRS API?
Might be a little late to the party here, but hopefully it will help someone in the future.
You mention the JSON structure is this:
{
"userId": "some_userId_value",
"attributes":{
"attributeValue": "some_attributeValue_value"
}
}
So to get to the attribute's value (which you call "some_attributeValue_value" in this example), you need to use the following filter:
filter=attributes.attributeValue eq 'some_attributeValue_value'
This navigates the nested properties of the JSON object properly.
Hope that helps someone!