Hi,
How to get @odata.count, which is visible in SWAGGER and is not available from the custom API library activity logic in UiPathStudio?
We have only 2 of 3 parameters to choose from:
OdataContext and Value but not OdataCount.
I have managed this problem by applying logic: out_queueItemCount = getQueueItemResponse.Value.Count.ToString
out_queueItemCount is String argument
Unfortunately it is not perfect. With large volumes of data available in the queue (over 100,000), the query takes a very very long time, because we get all transaction parameters in response.
And this counter counts the number of these cases after all data has been loaded.
I narrowed my search in the search parameters (Request Body) by adding a filter to "Status" in the Select position:
The response comes faster, but it still takes a long time, and I do not need the details of the transaction just the counter itself.
If anyone is looking for the solution:
Use ‘Deserialize JSON’ activity and pass HTTP request ‘response’ as input and output will be JsonObject.
JsonObject(“@odata.count”).ToString will give the required value.