Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-11-22 05:13 AM
HI All,
I am having an issue while integrating rest api with SNOW for table sc_task.
below is the payload which I want to use/using -
now if you notice I have setup
and good part is my query is able to connect with table and fetch data and the bad part is it is fetching entire table for all rows and columns and not for the given query.
in another words it is returning response with all the fields and not only those given in the payload. another issue is it is not returning the variable fields for example "variables.src_comments_details"
please let me know if anyone can resolve this?
Thank you!
------------------------------
Mritunjay Tiwari
------------------------------
I am having an issue while integrating rest api with SNOW for table sc_task.
below is the payload which I want to use/using -
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
payloads = {
"sysparm_limit": "1",
"sysparm_exclude_reference_link": "true",
"sysparm_display_value": "true",
"sysparm_query":"active=true^assignment_groupLIKEIBM-AP-PDE CECC Sustainment-Aero^short_descriptionLIKEDeactivate^state=1",
"sysparm_fields": """
number,
short_description,
request_item,
request_item.u_qs_requested_for.user_name,
request_item.u_qs_requested_for.name,
variables.Select_the_Business_Unit_eRoom_Community,
variables.src_common_business_justification,
variables.src_comments_details
"""
}
above is in format of python but same is given in BP as well as you can see in below screenshot -
now if you notice I have setup
sysparm_limit as 1 and
sysparm_fields for some specific fields which includes variable fields as well.
in another words it is returning response with all the fields and not only those given in the payload. another issue is it is not returning the variable fields for example "variables.src_comments_details"
please let me know if anyone can resolve this?
Thank you!
------------------------------
Mritunjay Tiwari
------------------------------
Answered! Go to Answer.
1 BEST ANSWER
Helpful Answers
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-11-22 07:42 AM
The BP WebAPI configuration has HTTP GET request with URL parameters but from your python code it looks like you are performing a HTTP POST request as there is a payload.
Is this a custom action that you have added because I could not find it on the WebAPI available on DX? If you are looking to make a HTTP POST request you will have to modify the WebAPI configuration accordingly.
One other thing I noticed in the BP URL configuration is that the query parameter name is missing.
Generally it is of the format ?paramname1=paramvalue1¶mname2=paramvalue2...etc.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
Is this a custom action that you have added because I could not find it on the WebAPI available on DX? If you are looking to make a HTTP POST request you will have to modify the WebAPI configuration accordingly.
One other thing I noticed in the BP URL configuration is that the query parameter name is missing.
Generally it is of the format ?paramname1=paramvalue1¶mname2=paramvalue2...etc.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-11-22 05:50 AM
@MritunjayTiwar1
If you can also provide a screenshot of your WebAPI configuration in BP that will be helpful to find out what's the difference between the two.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
If you can also provide a screenshot of your WebAPI configuration in BP that will be helpful to find out what's the difference between the two.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-11-22 06:13 AM
Hi Shashank, update as per your request.
------------------------------
Mritunjay Tiwari
------------------------------
------------------------------
Mritunjay Tiwari
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-11-22 07:42 AM
The BP WebAPI configuration has HTTP GET request with URL parameters but from your python code it looks like you are performing a HTTP POST request as there is a payload.
Is this a custom action that you have added because I could not find it on the WebAPI available on DX? If you are looking to make a HTTP POST request you will have to modify the WebAPI configuration accordingly.
One other thing I noticed in the BP URL configuration is that the query parameter name is missing.
Generally it is of the format ?paramname1=paramvalue1¶mname2=paramvalue2...etc.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
Is this a custom action that you have added because I could not find it on the WebAPI available on DX? If you are looking to make a HTTP POST request you will have to modify the WebAPI configuration accordingly.
One other thing I noticed in the BP URL configuration is that the query parameter name is missing.
Generally it is of the format ?paramname1=paramvalue1¶mname2=paramvalue2...etc.
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-11-22 12:59 PM
Thank Shashank for bringing my notice to the url parameters - paramname1=paramvalue1¶mname2=paramvalue2...etc.
this has resolved my issue.
Thank you once again.
------------------------------
Mritunjay Tiwari
------------------------------
this has resolved my issue.
Thank you once again.
------------------------------
Mritunjay Tiwari
------------------------------
