Recording

/v1/vhosts/{vhost_name}/apps/{app_name}:startRecord

POST http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps/{app_name}:startRecord

This is an action that requests recording of the output stream. The output file path can be set through API. If not set, the default output file path set in FILE Publisher in Server.xml is used. For information on settings, see the "Recording" document. You can also select the track to record by inquiring the Track ID through the stream inquiry API. If not selected, all tracks are recorded in one file. Request Example: POST http://1.2.3.4:8081/v1/vhosts/default/apps/app:startRecord { "id": "userDefinedUniqueId", "stream": { "name": "outputStreamName", "tracks": [ 101, 102 ] }, "filePath" : "{/path/to/save/recorded/file.ts}", "infoPath" : "{/Path/to/save/information/file.xml}" }

Path Parameters

NameTypeDescription

vhost_name

string

A name of VirtualHost

app_name

string

A name of Application

Headers

NameTypeDescription

authorization

string

A string for authentication in Basic Base64(AccessToken) format. For example, Basic b21lLWFjY2Vzcy10b2tlbg== if access token is ome-access-token.

Request Body

NameTypeDescription

id

string

An unique identifier for recording management

stream

string

Output stream for recording

name

string

Output stream name

tracks

array

Track id for want to recording. If there is no value, all tracks are recorded

filePath

string

Path to save recorded file

infoPath

string

Path to save information file

{
	"statusCode": 200,
	"message": "Success",
  "response": [
    {
      "app": "app",
      "createdTime": "2021-02-03T10:52:22.037+0900",
      "id": "{userDefinedUniqueId}",
      "recordBytes": 0,
      "recordTime": 0,
      "sequence": 0,
      "state": "ready",
      "stream": {
         "name": "{outputStreamName}",
         "tracks": [
          101,
          102
         ]
      },
      "totalRecordBytes": 0,
      "totalRecordTime": 0,
      "vhost": "default",
      "filePath" : "{/path/to/save/recorded/file.ts}",
      "infoPath" : "{/Path/to/save/information/file.xml}"
    }
  ]
}

/v1/vhosts/{vhost_name}/apps/{app_name}:stopRecord

POST http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps/{app_name}:stopRecord

The action requesting the recording to stop. Use the id parameters used when requested. Request Example: GET http://1.2.3.4:8081/v1/vhosts/default/apps/app:stopRecord { "id": "userDefinedUniqueId" }

Path Parameters

NameTypeDescription

vhost_name

string

A name of VirtualHost

app_name

string

A name of Application

Headers

NameTypeDescription

authorization

string

A string for authentication in Basic Base64(AccessToken) format. For example, Basic b21lLWFjY2Vzcy10b2tlbg== if access token is ome-access-token.

Request Body

NameTypeDescription

id

string

An unique identifier for recording c

{
	"statusCode": 200,
	"message": "OK",
	"response": [
		{
			"id": "{userDefinedUniqueId}",
			"vhost": "default",
	    "app": "app",
			"stream": {
				"name": "stream2_o",
				"tracks": [
					101,
					102
				]
			},
      "createdTime": "2021-01-18T03:27:16.019+09:00",
			"startTime": "2021-01-18T03:27:16.019+09:00",
			"finishTime": "2021-01-19T04:27:16.019+09:00",
      "filePath" : "{/path/to/save/recorded/file.ts}",
      "infoPath" : "{/Path/to/save/information/file.xml}"			
			"state": "Stopping"
		}
	]
}

/v1/vhosts/{vhost_name}/apps/{app_name}:records

POST http://<OME_HOST>:<API_PORT>/v1/vhosts/{vhost_name}/apps/{app_name}:records

You can view all the recording lists that are being recorded in the application. Information such as recording status, file path, size, and recording time can be found in the inquired record item. Request Example: POST http://1.2.3.4:8081/v1/vhosts/default/apps/app:records

Path Parameters

NameTypeDescription

vhost_name

string

A name of VirtualHost

app_name

string

A name of Application

Headers

NameTypeDescription

authorization

string

A string for authentication in Basic Base64(AccessToken) format. For example, Basic b21lLWFjY2Vzcy10b2tlbg== if access token is ome-access-token.

{
    "message": "OK",
    "response": [
		{
			"id": "UserDefinedUniqueId",
			"app": "app",
			"createdTime": "2021-01-18T03:27:16.019+09:00",
			"finishTime": "1970-01-01T09:00:00+09:00",
			"recordBytes": 0,
			"recordTime": 0,
			"sequence": 0,
			"startTime": "1970-01-01T09:00:00+09:00",
			"state": "ready",
      "filePath" : "{/path/to/save/recorded/file.ts}",
      "infoPath" : "{/Path/to/save/information/file.xml}"			 
			"stream": {
				"name": "stream2_o",
				"tracks": [
					101,
					102
				]
			},
			"totalRecordBytes": 0,
			"totalRecordTime": 0,
			"vhost": "default"
		},
		{
			"id": "UserDefinedUniqueId2",
			"app": "app",
			"createdTime": "2021-01-18T03:24:31.812+09:00",
			"finishTime": "1970-01-01T09:00:00+09:00",
			"recordBytes": 0,
			"recordTime": 0,
			"sequence": 0,
			"startTime": "1970-01-01T09:00:00+09:00",
			"state": "ready",
      "filePath" : "{/path/to/save/recorded/file.ts}",
      "infoPath" : "{/Path/to/save/information/file.xml}"			
			"stream": {
				"name": "stream_o",
				"tracks": [
					101,
					102
				]
			},
			"totalRecordBytes": 0,
			"totalRecordTime": 0,
			"vhost": "default"
		}
	]
}

Last updated