cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
404
Views
0
Helpful
2
Replies

Macro Update In Bulk via xAPI

jaustin3
Level 1
Level 1

I'm trying to use the xAPI to modify or create macros on RoomOS devices. Even though the API responds with success, the macro doesn't reflect that it's updated in the web UI. Is this because the macro is managed by Control Hub or locked for editing via xAPI?

Thanks

2 Replies 2

No it’s not because of Control Hub management of macros or that is locked. If you share exactly what you’re doing it might be easier for us to help you.



Response Signature


We’re using PowerShell to push macros to RoomOS endpoints via HTTP POST to the /putxml endpoint. Here’s the request format:

HTTP POST Endpoint

https://<device_ip>/putxml

Headers

Authorization: Basic <base64-encoded admin:password>

Content-Type: text/xml

Body
<Command>
<Macros>
<Macro>
<Save>
<Name>reportIssue</Name>
<Source>
import xapi from 'xapi';
console.log('test from PowerShell');
</Source>
<Overwrite>true</Overwrite>
</Save>
</Macro>
</Macros>
</Command>

We’re using Invoke-WebRequest in PowerShell to send this payload. The macro is a test version that works fine when entered manually via SSH with xCommand Macros Macro Save.

What’s Going Wrong
• The request appears to succeed (no 401/403 errors)
• But the macro is not saved on the device
• Or we get XML syntax error: EntityRef: expecting ';' Line 9, Column ###
• Or no macro content is returned afterward

When trying interactively via SSH, the macro saves and runs correctly, so we know the source is valid.

What We’re Trying to Confirm
• Are there limitations when saving macros via HTTP putxml with multiline JavaScript source?
• Is there a different encoding or escaping requirement for <Source> contents?

Any insights would be appreciated — thanks!