Rest API Call in uipath - uipath

My requirement is to fetch the data from rest api data and store it in separate variable. I had the endpoint url(https://abcdev.service-now.com/api/now/table/sc_multi_row_question_answer?sysparm_query=parent_id%3Dxxxxxxxxxxxxxxxxxxxx&sysparm_display_value=true&sysparm_exclude_reference_link=true&sysparm_fields=variable_set%2Cvalue%2Citem_option_new%2Crow_index).This is fetching the datas for all 3 rows. But i wants that this user needs to be added in this delegate access like that.
I have attached the image for which field i want to fetch.
I wants to fetch user to be added,level of access required,inbox,calender,tasks,contacts,notes,journal,select required send rights for these field i wants to fetch row by row.kindly assist me in that.

You will receive the response in JSON with all the rows, but you can use de serialize JSON Array activity to de serialize the JSON in each record with all the columns you have mentioned.
And Once you have the rows in the array JSON you can loop through it and get the details for each field.

Related

Is there any way that hasura decodes the token and can use its content in a query?

I was wondering if there is any way to do this in hasura without resorting to creating another service.
Let me explain, in an api a user sends his token, this is decoded in the backend and and so we know who the user is, this is useful for example to search and return records in the database that only belong to this user.
Is there any way to do that with Hasura? the only return the records that belong to a certain user using its token?.
Token data is available as session data so you can use hasura column presets to insert the user id and add permission to only fetch rows that have user id equal to user id from session https://hasura.io/docs/latest/graphql/core/databases/postgres/schema/default-values/column-presets.html#column-presets

How to fetch the variable value in service now when ordering item from service catalog?

I have successfully ordered an item from service catalog using REST API. While ordering I sent a JSON data in the request body containing certain key value pairs which are meant to be stored in variable of the catalog item. After the successful order, the response generated contains the sys_id, request_number, request_id, table name. Now, when I want to fetch the values passed to variables, the only way available is to make a GET call using the REST API for Tables. So, I am fetching the record using the generated sys_id and table name which is generated as response of order API. The table name is sc_request.
But that is not providing the variable value information in the response body of the GET call.
You should be able to get the values of variables using the Table API. If you go to the REST API explorer in ServiceNow, notice the field "sysparm_fields". put the name of your variabe(s) in there like this "variables.var_name". This will retrieve their values and display values in the response.

How to save json feed to MongoDB in Laravel and get the key?

I need the following: I make GET requests to the API and receive responses in JSON format.
We have some sort of logs about responses and I'd like to keep record about the content of these JSON objects on the moment of the request.
In the Laravel command, I have to:
1) Save JSON object to MongoDB and get the unique key "feed_id" from collection under which it was saved.
2) Save the "feed_id" to the table column, where we store logs about history of requests.
How can I implement the first step in Laravel? I have seen some example, but without getting the id.
there is a excellent package for mongoDB in laravel named jenssegers/mongodb
you can install it via composer.
once you've installed it , you can simply insert an object and get the id in response like you do with eloquent and mysql

How to retrieve only certain data from Parse?

I am working with parse to save user data. I am saving every user that signs up in a parse table. I can run my app and see data from all the users who signed up; but I dont want that. What I want is to display information only from users in a friends list. Thats my problem. Should I create and query through a list of user ids or emails that I save internally in the device as JSON or raw data to upload in a new class in parse? Should I save these friend contacts directly in my current ALL USERS Parse table and get the data somehow without having the entire parse table provide all users data? I hope this makes sense to anyone. Any guidance would be really helpful. Thanks for your time.

Push data using routes in laravel

I'm trying to have an api which stores the information into my CRM, to push the details I've following parameters/details to store into the data:
Called_number, caller_number, agent_number, date, time, call_status, total_call_duration, Call_UUID, Recording_URL, conversation_duration
I've created the migration table with the same data name mentioned above, request protocol is HTTP, request data type is Query String and response data type is JSON.
Data is being sent by simple URL from third party so I'm using simple post route to insert the data into the database like this:
Route::post('/calllogs/{called_number}/{caller_number}/{agent_number}/{date}/{time}/{call_status}/{total_call_duration}/{call_UUID}/{recording_URL}/{converstation_duration}', 'CalllogController#insert')
Is there any way to secure this with some dynamic API keys to prevent inserting fake data? I mean any person having idea of the URL, can make the url and will insert data into my database, I want to have something like this:
Route::post('/calllogs/{api_key}/{caller_number}....
where I can check the api_key dynamically and then insert into the database.
Thanks.
This library (API Guard) is probably what you're looking for, it does exactly what you want: securing API calls with authorization keys.

Resources