Change the title of an action when it is created using using the REST API

Hello,

How can I change the title of an action when it is created using using the REST API. Using the example from the ‘Quick Tutorial’ on the REST API works for me just fine.

<?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
  <SourcedFixletAction>  
    <SourceFixlet>    
      <Sitename>BES Support</Sitename>    
        <!-- CPU Usage -->  <FixletID>168</FixletID>    
        <!--Medium 5% -->  <Action>Action3</Action>  
    </SourceFixlet>  
    <Target>    
        <!-- set computer id-->    <ComputerID>{id}</ComputerID>
    </Target>
</SourcedFixletAction>
</BES>

I looked at the BES.xsd schema file and thought I would be able to add a Title tag

But, when I tried putting a Title tag after the SourcedFixletAction like this:

<?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
  <SourcedFixletAction>  
    <Title>This is the new name </Title>
    <SourceFixlet>    
      <Sitename>BES Support</Sitename>    
      . . . 

It fails.

Anyone know how to accomplish this?

Thanks

1 Like

Is it?

Continuing the discussion from How to specify action name via API:

Please check the post suggested by fermt. Essentially, the order in the XML matters. I just successfully tested with the following, where the Title is specified last (per the xsd):

<?xml version="1.0" encoding="UTF-8"?>
<BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
  <SourcedFixletAction>  
    <SourceFixlet>    
      <Sitename>BES Support</Sitename>    
        <!-- CPU Usage -->  <FixletID>168</FixletID>    
        <!--Medium 5% -->  <Action>Action3</Action>  
    </SourceFixlet>  
    <Target>    
        <!-- set computer id-->    <ComputerID>123</ComputerID>
    </Target>
    <Title>This is the new name </Title>
</SourcedFixletAction>
</BES>

Hi @Aram,

Sorry I didn’t see the other post. I have tried the following in 9.2.5 and it is returning an error:

> <?xml version="1.0" encoding="UTF-8"?>
> <BES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BES.xsd">
>   <SourcedFixletAction>  
>     <SourceFixlet>    
>       <Sitename>BES Support</Sitename>    
>         <FixletID>168</FixletID>    
>         <Action>Action3</Action>  
>     </SourceFixlet>  
>     <Target>    
>        <ComputerID>5921333</ComputerID>
>     </Target>
> 	<Title>Looks Good</Title>
> </SourcedFixletAction>
> </BES>

this returns

{"format":"Unexpected server error: {message}","arguments":["XML parsing error: no declaration found for element \u0027Title\u0027 Line 12, Character 9"]}

It works fine if I take out the Title tags

Is this feature supported in 9.2.5?

This feature was added recently with 9.5.3 (i.e. the ability to modify the name of a sourcedfixletaction via REST API).

Do you see a flaw in the XML I’m using?

Should I open a PMR?

You can’t use that option in 9.2.5. You need 9.5.3 before they enabled that feature.

Duh! my Dyslexia got the best of me. I read it wrong

Thanks