M|Replay REST API

REST API Quick start guide

Currently the only thing you can do with the REST API is to add new markers and clips. 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.



General requests


Retrieve the list of available inputs

GET /inputs

Returns a list of inputs that are available.



Working with Markers

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)

POST add_marker
{
"name" : "This is my Marker",
"reference" : "live",
}


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.



Working with Clips

Creating clips using "POST"

To add a clip, you can either use GET or POST. You can also either specify a clip name, in point and out point. So in other words, create from scratch, or you can as in the user interface "mark" an in point and an out point and the clip will be automatically created in the user interface, just as if you click on the button.

When using the POST method, you should pass a json dictionary with "name" to set the title of the clip as well as the in/out and duration.

Creating clips with in and out points

First let's see how to create a clip ourselves. Note that if duration is provided, then out_point is ignored.

POST add_clip
{
"name" : "Mon clip",
"in_point" : "00:01:00:00",
"out_point" : "00:02:30:00",
"duration" : "00:01:30:00"
}

Creating clips by setting in and out points

Or you can ask to mark an in point, and specify wether you want to set the in (or out) point at the "live" or "playhead" position (see above). The example below shows how to mark an in point at the "live" time.

POST mark_
{
"reference_in_point" : "live" }


Creating clips 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_clip?name=Mon%20clip&in_point=00%3A01%3A00%3A00&out_point=00%3A02%3A00%3A00 GET /add_clip?name=Mon%20clip&reference_in_point=live


Retrieving clips

You can also retrieve the list of clips that were already created:

GET /clips

Returns a list of markers already created.

Example response:

[
{
"ClipMarkerIsMarker" : false,
"ClipMarkerName" : "Clip",
"ClipMarkerInPointString" : "16:33:36;45",
"ClipMarkerInPoint" : 562170816.71799803,
"ClipMarkerOutPoint" : 562170819.28794098,
"ClipMarkerOutPointString" : "16:33:39;19",
"ClipMarkerDuration" : 2.5699429512023926,
"ClipMarkerUniqueID" : "A4E2DF35-A9D5-45FA-943D-761522556E44" },
]

You can also retrieve just a specific clip, by indicating its index

GET /clips/1

Returns the specified clip information.


For more 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.