Set value of variable from URI

Hi all,

Im trying to testing this one channel REST API option:

POST /channels/{channelId}/variable

But dont know how to follow the syntax. For example if i do this:
http://localhost:8088/ari/channels/1594227026.492835/variable

The response I get of course is this one:
{
“message”: “Variable name is required”
}

But dont know how to follow the syntax.

Thanks for help in advance.

You have to pass query parameters[1]. A query parameter of variable for the variable name and then a query parameter of value for the value. For example:

http://localhost:8088/ari/channels/1594227026.492835/variable?variable=TEST&value=SUCCESS

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+17+Channels+REST+API#Asterisk17ChannelsRESTAPI-setChannelVar

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.