Skip to main content
Question

LUA Retrieving Attachments with assystREST

  • November 8, 2022
  • 3 replies
  • 128 views

Forum|alt.badge.img+7

Hi,

We are trying to convert an older assystEJB call that we have embedded in a LUA script. Here is the call to the getAttachments function:

 

local attachments, err = ASSYSTEJB:getAttachments(parmTicketOrAction, parmNumber)

 

We are trying to convert this to assystREST but it’s not working. Would someone have the correct function syntax for getAttachments in assystREST?

Thank you!

Martin Provost

3 replies

Forum|alt.badge.img+6

Forum|alt.badge.img+7
  • Author
  • Sidekick (Customer)
  • 11 replies
  • November 8, 2022
Alan Macfarlane wrote:

I saw this but it did not provide an example on how to use it within a LUA script. For example adding a new attachement with assystREST in lua is:

ASSYSTREST:new_attachment

What would be the GET command for retrieving attachment information?

We tried get_attachment, getattachment, and other combinations that didn’t work.


Forum|alt.badge.img+10

Luja ASSYSTREST: is designed as a drop in replacement for ASSYSTEJB:. 

ASSYSTREST:getAttachments should do what you want - if it doesn’t then please log this with the Service Desk.

Also note that you can configure the ASSYSTREST component to have the name ASSYSTEJB - in which case your script should run otherwise unaltered:

assystREST {
        id = "ASSYSTEJB",  -- create a global named ASSYSTEJB
        url = …..}


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings