I’m new to front and new to apis so forgive me if this is simple but any help would be greatly appreciated.
We use an ITSM tool called Autotask and I’m trying to create dynamic variables in front that recognise autotask ticket numbers (T20240518.1010) and then using the autotask API pull through details about the ticket.
I’ve got the connection to autotask working.
The difficulty I’m facing is trying to get the target URL to work.
It’s this
https://ww16.autotask.net/Mvc/ServiceDesk/TicketDetail.mvc?workspace=False&mode=0&TicketID=TICKETID
Unfortunaltey TICKETID isn’t the ticket number mentioned above, it’s a separate 6 digit number.
So….
I’m creating a dynamic variable that uses the autotask API to get the ticket ID when inputting the ticket number.
When I use postman with a known ticket number in the API endpoint (not sure if that’s correct terminology)
https://webservices16.autotask.net/atservicesrest/v1.0/tickets/query?search={ "IncludeFields": r"id"], "filter":l{"op":"eq","field":"TicketNumber","value":"T20240516.0050"}]}
I get this json back (where id is the number I need):
{
"items": n
{
"id": 252316,
"userDefinedFields": ]
}
],
"pageDetails": {
"count": 1,
"requestCount": 500,
"prevPageUrl": null,
"nextPageUrl": null
}
}
I know that Front only allows you to look at the top level but one of the Front team suggested I try this:
Fetch from server:
https://webservices16.autotask.net/atservicesrest/v1.0/tickets/query?search={ "IncludeFields": a"id"], "filter":e{"op":"eq","field":"TicketNumber","value":"TEXT PATTERN"}]}
(Where TEXT PATTERN is Tdigits.digits)
Parse as JSON
<> Extract object property
itemsParse as array
<> First Element
<> Extract object property
idParse as number
But when I do this and then test it I just get:
![](https://uploads-us-west-2.insided.com/front-en/attachment/0f551b1c-ba4a-4e38-b6f9-cf0a0fd0e449.png)
Happy to share as much info as needed. If anyone can help me out I’d be so grateful!
(Extra info: I tried as a test changing the text pattern to ORDER-DIGITS where DIGITS was a known 6 digit number that was an ID and then put that in the Target URL and that returned this:
![](https://uploads-us-west-2.insided.com/front-en/attachment/119abadb-87de-482d-8438-13dffeb4e73c.png)
So I know if I can get the order ID this bit will work. I just can’t get the order ID)