You are viewing limited content. For full access, please sign in.

Question

Question

Token in Web Service URL?

asked on September 16, 2022 Show version history

We're already using Workflow to open tickets in our ticketing system, using the Web Service URL:

https://ourticketingsystemURL.com/REST/1.0/ticket/

This works well, and after the ticket is opened, we retrieve the ticket number that was generated by using the "Pattern Matching" tool (in the same Workflow).

 

We have now been asked to dip back into our ticketing system to retrieve the status of tickets previously opened.

We have the ticket number, but the URL structure for specific tickets is:

https://ourticketingsystemURL.com/REST/1.0/ticket/ticket_number

Using the HTTP Web Request tool, it doesn't look like I can include a token in the Web Service URL.

Any thoughts on how this could possibly be accomplished? 

Is anyone else doing something similar?

0 0

Answer

SELECTED ANSWER
replied on September 16, 2022

That part should go into the URI property of the activity.

2 0
replied on September 16, 2022

Thank you!

That was exactly what I needed to get to the next step. I appreciate your help!

0 0
replied on September 16, 2022

Another "gotcha" to be aware of is that I've always had to add an extra forward slash before the token syntax when I use tokens in the URI.

 

Also, is the response not coming back in JSON or XML? If it is a REST API I would expect the content to come back in one of those formats.

If that's the case, you can use the Read JSON or Read XML activities to extract the ticket number rather than relying on pattern matching.

For example, you would set the "Source" equal to the _Content token for the Web Request activity, then you can use JPath/XPath to get the value.

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.