Hey guys,
I am learning how to use the HTTP Request activity to access APIs. I was totally new to this, but I got a few URLs to retrieve basic information about clients in a database, that returned something when I entered them in a browser, so I started there. EndpointUrl goes something like this:
http://ServerAddress:58454/program/api/domain/v1/clients
I could get information for a specific client when I filtered by client number:
http://ServerAddress:58454/program/api/domain/v1/clients?filter=number eq 12345678
Then, when I have the client id, which is something like a hashcode, I can access that client resource directly like this (where {id} is the actual hashcode-like id):
http://ServerAddress:58454/program/api/domain/v1/clients/{id}
Now comes the interesting part:
I got the last one working with the HTTP Request activity in UiPath! Complete with {id} provided dynamically as a UrlSegment, then deserializing the JsonString and accessing the tokens of the JObject.
However: I usually only have the clients number, not the id and I can’t seem to get the second request (http://ServerAddress:58454/program/api/domain/v1/clients?filter=number eq 12345678
) working in UiPath.
I tried with UrlSegments, parameters, even with building the whole request Url before and just inputting that as the EndPoint property. I also tried replacing the blanks with %20
as I have seen my browser do it. Again: when I enter this Request Url in the browser I am getting all the information including the id of the client.
What am I missing? How can I build my HTTP Request to include this filter?
Cheers, Lukas