channel import.md

Channel Import

Channels API · import-export

POST /ui/connectors/channels-api/latest/import/

Import channels from a JSON payload.

mode=merge (default): create missing, update changed, leave others alone. mode=replace: delete any channel not in the payload, then create/update. An empty channels list with mode=replace deletes all channels.

Returns immediately. Background tasks push service configs to the controller; observe final per-channel state via GET /channels/{id}/ (sync_state).

Request body

Content type: application/json · Required

Example request

curl -X POST "/ui/connectors/channels-api/latest/import/" \
  -H "Content-Type: application/json" \
  -d '{
  "payload": {
    "schemaVersion": "1",
    "description": "string",
    "exportedAt": "2024-01-01T00:00:00Z",
    "sourceVersion": "string",
    "channels": [
      {
        "kind": "BeamChannel",
        "metadata": {
          "name": "string",
          "displayName": "string"
        },
        "spec": {
          "type": "EncodingContribution",
          "state": "Stopped",
          "inputs": [],
          "transform": {
            "encoding": {
              "video": {
                "codec": "H264High",
                "videoFormat": "1920x1080p",
                "bitrate": 6000000,
                "frameRate": "TrueMotion"
              },
              "audios": []
            },
            "abrEncoding": {
              "representations": [],
              "sharedAudios": []
            },
            "multiplexing": {
              "enabled": false
            }
          },
          "outputs": []
        },
        "services": [
          {
            "name": "string",
            "type": "string",
            "id": "string",
            "config": {},
            "configVersion": "string"
          }
        ]
      }
    ]
  },
  "mode": "merge",
  "state": "Running"
}'

Responses

200 — Successful Response

Example:

{
  "imported": [
    {
      "name": "string",
      "sourceName": "string",
      "displayName": "string",
      "status": "accepted",
      "error": "string"
    }
  ],
  "deleted": [
    "string"
  ],
  "errors": [
    "string"
  ],
  "warnings": [
    "string"
  ]
}

422 — Validation Error

Example:

{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}