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.
Nope, it is not it.
Iām using custom library for API request and UiPath.Web.Activities activity in Studio (not POSTMAN and Orchestrator.HTTP.Request).
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.