Third Party Application should Hit my API and get the value from my change Request Table

surya76
Tera Contributor

Third party should hit my REST API end point and GET the state field and shortdescription value of my Change request table.

i Know i can do this via Scripted rest API and i achieved it:

find_real_file.png

i can sent the response to my Third Party

find_real_file.png

 

But How can i acive this Via Trans form Maps or Transform scripts:

can it be done through Tranform ?

Because the second use case is Third party should hit my REST API end point and update the state field in my change request table:

so i have created a transform map with change number as coalesce field so they can update my record if change number already present in my change Request table.

find_real_file.png

HERE iam using Different Two methods.

I would be great if i can achieve both by tranform methods. because these two use case are INBOUND REST CALL.

 

Thanks

 

 

 

 

1 ACCEPTED SOLUTION

Hi,

Refer the Highlighted part 3. You can pass the Change Number using sys_parm_query as mentioned

Refer Highlighted part 4, you can set the list of fields to be returned.

Hope this answers your question

Thank you,
Palani

View solution in original post

8 REPLIES 8

palanikumar
Mega Sage

Hi,

Your Thirdparty can directly hit the import set table. You can either insert data into import set table from Scripted rest or directly insert import set table using table api.

Your transform map will run after the data is inserted into import set table

Thank you,

Palani

Thank you,
Palani

 

in my case 

what i have done is corrrect/wrong? 

 

 

Third party should hit my REST API end point and GET the state field and shortdescription value of my Change request table.(scripted rest). is This will run first.

and 

Third party should hit my REST API end point and update the state field in my change request table:(Transform maps). this should run next

will this run second

 

 

 

 

 

Hi,

To get record they can directly hit the Table API. No need to create a Scripted Rest. You can use this URL. (Update the instance name and change number in the URL)

 

 https://<your instance>.service-now.com/api/now/table/change_request?sysparm_query=number%3D<Change number>&sysparm_fields=short_description%2Cstate&sysparm_limit=1

Thank you,
Palani

can you please providae a screen show from REST API explorer on how you generated this Query