Action Script Formatting

I’m working with the REST API and trying to format the returned action script in a web app to look the same way it does in the console. Has anyone tried doing this or is there a known formatting that I could apply to the REST API results?

A simple example of what the REST API returns actions script this way:

[ActionScript MIMEType=“application/x-Fixlet-Windows-Shell”]
setting “_BESClient_Report_Encryption”=“Required” on “{parameter “action issue date” of action}” for client relay select
[/ActionScript]

Thanks!

I haven’t done it from a web app, but when retrieving individual lines in Session Relevance I have to split the lines on the %0A character. In DOS a line is terminated by %0D%0A, the CR LF characters but in ActionScript it’s only 0A.

Hi Jason,

Thanks for the reply. Do you have an example of how you would do this in session relevance? I’m using a mix of both the REST API and session relevance, so it might help.

Thanks!

I’m on mobile now, but it’s something like

concatenation “%0d%0a” of substrings separated by “%0a” of scripts of actions of fixlets whose (id of it = 37) of bes sites whose (name of it =“My Site”)

1 Like

That’s great. Tried it out and was able to run that query in my environment.

My only problem now is that I’m dealing with information in the context of an action.

Drilling down from a list of all actions and their states to the individual action status of a computer, from which I was hoping the present the action script with the line number the actions failed or completed on. I am able to get the line number data already.

Is is possible to pull the action script of an action taken as opposed to a fixlet or task?

Thanks!

I was able to answer my own question about getting the action script of an action:

concatenation “%0d%0a” of substrings separated by “%0a” of action script of bes actions whose (id of it = 111)

Thanks again for your help and pointing me in the right direction.