cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while fetching data from catalog task table from SNOW using REST API

MritunjayTiwar1
Level 2
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 -

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 -


29378.png
29379.png
29380.png

29381.png

now if you notice I have setup
sysparm_limit as 1 and
sysparm_fields for some specific fields which includes variable fields as well.


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
------------------------------
1 BEST ANSWER

Helpful Answers

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&paramname2=paramvalue2...etc.

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

View answer in original post

4 REPLIES 4

@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
------------------------------

Hi Shashank, update as per your request.


------------------------------
Mritunjay Tiwari
------------------------------

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&paramname2=paramvalue2...etc.

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

Thank Shashank for bringing my notice to the url parameters - paramname1=paramvalue1&paramname2=paramvalue2...etc.

this has resolved my issue.

Thank you once again.


------------------------------
Mritunjay Tiwari
------------------------------