REST adding song


I just want to know what is the command to play (not add) a song.
I want to cut song playing, and play a song in bdd by id.
PLAYLIST 1 OPEN 631 didn’t work…
Can you help me please ?

Hi Florian,

this does not work with database IDs.

PLAYLIST 1 LOAD <Filename> - Load a playlist file.
(see[]=commands#playlist for more)

When you create a playlist with only this one item, maybe it should work.

@Torben gave me another hint (thank you):


At the moment not documented in the wiki, quite interesting… :thinking:
@Tondose, your construction site?

Thanks @Torben & @UliNobbe
So in what i have to put ?
I add stream url in bdd.
So if i want to add it, what is the filename ? The id ?

I added commands to the latest v6.3 snapshot:

1 Like

A post was merged into an existing topic: Sammelthread: mAirList v6.3-beta

So if we don’t have mairlist 6.3, we can’t execute this command ?
Did you have another alternative un mairlist 6.1 to add stream in playlist ?

What does ADDID do exactly?? Append to the last item? And if so, shouldn’t it rather be called APPENDID? And does <id> mean the same as <databaseid>?

Unified Regards


Edit: Changed language, sorry.

I’m not quite sure what you like to achieve: In your initial posting you asked to insert a song by database ID, this is possible via the new command. And yes, this is featured from V6.3 on – there is no point in beefing up outdated versions.

Now you are talking of adding a stream to the playlist. This, however, has long been possible, simply by clicking Insert > Stream in the menu bar.

Inserted regards


1 Like

i just want to add stream in playlist with REST API (execute command in GET/POST request).
In mairlist 6.1
So, how can i make this ?
I can create event ? Can i execute event with REST API ?
I have created this post because the song is stream.

it’s ok.
i have made a script.
thanks for all.

1 Like

Naming follows the methods of the Delphi list classes: “Add” is for single items, “Append” for list of items

Yes - was trying to avoid the line break in the change log :wink:

1 Like

What if I try to append a list containig one item only?!  :open_mouth:

Added regards


A list with one item is still a list.

1 Like

With php and curl, how can we send command with api rest ?

POST request to /execute with command parameter set to the command that should be executed.

Example for cURL (command line):

curl -X POST -d 'command=PLAYER 1-1 START' -u <user>:<password>

Instead of basic auth with user password, you can also create a token in the User Management and use Bearer authentication:

curl -X POST -d 'command=PLAYER 1-1 START' -H 'Authorization: Bearer <token>'

I have no examples for cURL in PHP currently, but it should be fairly easy to figure that out:

Maybe @shorty.xs can help?

I have programmed a php handler, to communicate with mAirlist rest interface, because we wanted to avoid having the rest credentials in our Java-Script.

The „get“ part ist delivering back, the mAirlist Json output and the „Post“ Part is dealing with the commands to pass over.

Here you can see how we handle this in JavaScript.

Not what i want.
I want to have a page, and when i go to the page, (blank), launch command with API rest.
(include http basic auth)

But that should be easy to adapt with the link, @Torben has posted and from my json-pass.php.

in SSH, no problems but !
When i launch the command, i receive a response: “ok”.
But, nothing on mairlist…

Check the Remote Control Console in the About menu if the command appears there.