UC Create a Scheduled Recording


Motivation

A scheduled recording is a single recording which occurs only once and thus the most basic recording that can be created.

Description

Even for a single recording all objects described here are needed. Everything can be created with a single POST call on BookingDefinitions that contains all objects in the request body as shown in the example. Please refer to the “Writeable” column in the parameter tables on the element’s detailed description pages (under Basic Data Model ) to know which fields can be set and which are read only.

Reference

vidicontrol/schedulercore/swagger/index.html

Example

POST vidicontrol/schedulercore/SchedulerCore/BookingService/v1/BookingDefinitions

{
    "bookings": [
        {
            "chunkList": [
                {
                    "commandList": [
                        {
                            "capabilityId": "VCR-wl",
                            "deviceId": "VCR-0B",
                            "index": 0,
                            "handling": "WaitForResult",
                            "content": "{\"action\":\"Switch\",\"input\":{}}",
                            "commandType": "CapabilityRouter",
                            "inPortId": "VCR-XA"
                        },
                        {
                            "capabilityId": "VCR-0B",
                            "poolId": "VCR-0B",
                            "executionTime": "2023-09-13T16:00:00Z",
                            "duration": 3600,
                            "index": 1,
                            "handling": "WaitForResult",
                            "content": "{\"action\":\"Record\",\"input\":{}}",
                            "commandType": "CapabilityRecorder"
                        }
                    ],
                    "metadata": "{\"timespan\":[{\"start\":\"-INF\",\"end\":\"\\u002BINF\",\"field\":[{\"name\":\"title\",\"value\":[{\"value\":\"Arvato Test API\"}],\"type\":null},{\"name\":\"V3_Category\",\"value\":[{\"value\":\"Entertainment\"}],\"type\":null}]}]}",
                    "title": "Arvato Test API"
                }
            ],
        }
    ],
    "type": 0
}

Please note, that the title is set in two places:

  1. In the metadata document provided in the metadata property (Line 27).

  2. In the title property (Line 28).

Both have to be set and both titles should be identical.
See also UC Changing a Recording Title


Response:

JSON
{
  "id": "VCR-yPD2",
  "bookings": [
    {
      "id": "VCR-jDOK",
      "chunkList": [
        {
          "id": "VCR-MoP0",
          "commandList": [
            {
              "id": "VCR-gpz2",
              "capabilityId": "VCR-wl",
              "poolId": null,
              "deviceId": "VCR-0B",
              "executionTime": "2023-09-13T15:59:58Z",
              "duration": 2,
              "index": 0,
              "executionState": "Pending",
              "handling": "WaitForResult",
              "content": "{\"action\":\"Switch\",\"input\":{}}",
              "commandType": "CapabilityRouter",
              "inPortId": "VCR-XA",
              "outPortId": "VCR-plY",
              "routingList": []
            },
            {
              "id": "VCR-RVwx",
              "capabilityId": "VCR-0B",
              "poolId": "VCR-0B",
              "deviceId": "VCR-2n",
              "executionTime": "2023-09-13T16:00:00Z",
              "duration": 3600,
              "index": 1,
              "executionState": "Pending",
              "handling": "WaitForResult",
              "content": "{\"action\":\"Record\",\"input\":{}}",
              "commandType": "CapabilityRecorder",
              "inPortId": "VCR-XA",
              "outPortId": null,
              "routingList": []
            }
          ],
          "vcItemId": "",
          "metadata": null,
          "start": "2023-09-13T15:59:58Z",
          "end": "2023-09-13T17:00:00Z",
          "executionState": "Pending",
          "title": "Arvato Test API",
          "clipId": null,
          "parentInfo": {
            "bookingId": "VCR-jDOK",
            "bookingDefinitionId": "VCR-yPD2",
            "bookingDefinitionType": "Single"
          }
        }
      ],
      "start": "2023-09-13T15:59:58Z",
      "end": "2023-09-13T17:00:00Z",
      "vcItemSequenceId": "",
      "metadata": null,
      "bookingDefinitionId": "VCR-yPD2"
    }
  ],
  "vcCollectionId": "",
  "parentVcCollectionId": "",
  "metadata": null,
  "start": "2023-09-13T15:59:58Z",
  "end": "2023-09-13T17:00:00Z",
  "recurrence": null,
  "title": null,
  "type": "Single"
}