Say i have something like this as the ResponseAPI
using JSON object manager package i could get the data just fine but have a problem taking the email,id,etc. is there a way to do it with JSON object manager package? or do i need to have anotehr package/ use string manipulation to do it?
You can try JSON Get Node Value, just put data.id, data.email to get id and email respectively.
hi @ishan mahajan
sorry for late reply, thanks for answering it works and i have anotherquestion what if the data looks like this? and i wanted to take each email from the data? i tried using the JSON package and tried to use the Get Node List and but everytime i wanted to show it on a message box "$List$" it says that "Unsupported node type provided in the session"
Hi @David Jansen ,
You can try using this JsonPath:
Then using String Operations, you can split the items and retrieve the emails one by one.
you can use what Ashwin has suggested, this would return you a String i guess, you may have to put some string operations to get email values or you can take the output of Get Node list(for Data node) in a list, convert that list to string and start a new JSNO session with this text.
and use Get node value of 'email' to get value of email, you will have to resart JSON session multiple times,
hi @Ashwin A.K & @ishan mahajan
i already tried and both way works well. but i notice that the REST web service in Automation Anywhere is a bit old since most the API doesn't requires us to do the authentication with id and password instead we will get API Key.
Is there a way using REST web services in AA to get an API using the API Key as the authentication method? if there is what authentication method should be selected?
Hi @David Jansen ,
Depends on the API Specification.
Usually the API Key is added as a Header like so:
If its OAuth 2.0, then you might have to add additional Headers/Parameters like ClientId, ClientSecret, Domain etc just to name a few.
As for refining the data outputted from the Json Package, I use String: Replace toggled to regex like so:
I bet there is an easier way to go about refining this, but I'm too lazy to think of anything creative right now.
hi @Ashwin A.K
sorry for the late reply and thanks for helping me