REST API Quick start guide
Currently the only thing you can do with the REST API is to add new markers and clips and change the playback rate. If you have any additional request, please let us know.
M|Replay uses port 8090 by default, but this can be configured in the preferences of M|Replay.
Creating markers using "POST"
To add a marker, you can either use GET or POST.
When using the POST method, you should pass a json dictionary with "name" to set the title of the marker, as well as indicate at which position the marker should be set.
- "live" the marker will be set at the current "Live" time, even if the user has scrubbed and is playing back at a different position.
- "playhead" the marker will be set at the position of the playhead (if the user has used the jog shuttle, and is playing back in time, it will be logged at that position)
- "absolute" the marker will be set at the time indicated in the "time" value you pass in the JSON
Note that:
- when using "live" or "playead", you must also specify an "offset", even if it is zero.
- when using "absolute" time, you must specify a "time" value. You should also make sure that the TC you indicate is within the range of the session
Creating markers at the "live" time
POST add_marker
{
"name": "This is my Marker",
"reference": "live",
"offset": "00:00:00:00"
}
Note that the syntax will be the same to create a marker at the "playhead" position.
Creating markers at an "absolute" time
POST add_marker
{
"name": "This is my Marker",
"reference": "live",
"time": "09:20:10:00"
}
Creating markers using "GET"
When using the GET method, you don't need to pass a JSON, everything can be done in one url, so it is pretty convenient.
GET /add_marker?name=This%20is%20my%20Marker&reference=live
Retrieving markers
You can also retrieve the list of markers that were already created:
GET /markers
Returns a list of markers already created.
Example response:
[
{
"ClipMarkerUniqueID" : "CCA8743A-BC76-45DF-88A9-B0A4F008F5AD",
"ClipMarkerInPointString" : "16:33:17;30",
"ClipMarkerIsMarker" : true,
"ClipMarkerName" : "Marker",
"ClipMarkerInPoint" : 562170797.44815099
},
{
"ClipMarkerUniqueID" : "1FCB7520-33A6-40D5-B7C1-9B0FE85D98B1",
"ClipMarkerInPointString" : "16:33:17;58",
"ClipMarkerIsMarker" : true,
"ClipMarkerName" : "Marker (1)",
"ClipMarkerInPoint" : 562170797.91526401
}
]
You can also retrieve just a specific marker, by indicating its index
GET /markers/1
Returns the specified marker information.
If you need more info or support about M|Replay, you can find it on
our support desk. And if you need additional information on the API and/or the websockets, submit a ticket and we'll be happy to guide you.