REST API for Launch Configuration Management

Create Launch Configuration

Description

Create a new launch configuration

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig?accessToken=<accessToken>
  • Method: POST
  • Data: JSON
   {
    "launchconfig": {
      "name": "<configuration-name>",
      "description": "<configuration-descrption>",
      "image": "<red5pro-image>",
      "version": "0.0.3",

    "targets": {
        "target": [
      {
        "role": "<role>",
        "instanceType": "<instance-type>",
        "connectionCapacity": "<instance-capacity>"
      }
      ]
      },

      "properties": {
        "property": [
          {
            "name": "<property-name>",
            "value": "<property-value>"
          }
        ]
      },
      "metadata": {
        "meta": [
          {
            "key": "<meta-name>",
            "value": "<meta-value>"
          }
        ]
      }
    }}

RESPONSE

  • Failure: HTTP CODE 400 or 404
  • Data:JSON
    {
      "errorMessage": "<error-message-string>",
      "timestamp": <error-timestamp>
    }
  • Success: HTTP CODE 201
  • Data:

     {
    "launchconfig": {
      "name": "<configuration-name>",
      "description": "<configuration-descrption>",
      "image": "<red5pro-image>",
      "version": "0.0.3",

    "targets": {
        "target": [
      {
        "role": "<role>",
        "instanceType": "<instance-type>",
        "connectionCapacity": "<instance-capacity>"
      }
      ]
      },

      "properties": {
        "property": [
          {
            "name": "<property-name>",
            "value": "<property-value>"
          }
        ]
      },
      "metadata": {
        "meta": [
          {
            "key": "<meta-name>",
            "value": "<meta-value>"
          }
        ]
      }
    }}

Example

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig?accessToken=xyz123
  • Method: POST
  • Data: JSON
    {
    "launchconfig": {
      "name": "alltypes-01",
      "description": "Launch config policy with all node types",
      "image": "red5pro-image-name",
      "version": "0.0.3",

      "targets": {
          "target": [
        {
          "role": "origin",
          "instanceType": "c5.large",
          "connectionCapacity": "2000"
        },
        {
          "role": "edge",
          "instanceType": "c5.large",
          "connectionCapacity": "2000"
        },
        {
          "role": "relay",
          "instanceType": "c5.large",
          "connectionCapacity": "2000"
        },
        {
          "role": "transcoder",
          "instanceType": "c5.xlarge",
          "connectionCapacity": "2000"
        }
         ]
        },

        "properties": {
          "property": [
            {
              "name": "property-name",
              "value": "property-value"
            }
          ]
        },
        "metadata": {
          "meta": [
            {
              "key": "meta-name",
              "value": "meta-value"
            }
          ]
        }
      }}

RESPONSE

  • Success: HTTP CODE 201
  • Data:
{
    "launchconfig": {
        "image": "red5pro-image-name",
        "metadata": {
            "meta": [
                {
                    "value": "meta-value",
                    "key": "meta-name"
                }
            ]
        },
        "name": "alltypes-01",
        "description": "Launch config policy with all node types",
        "version": "0.0.3",
        "targets": {
            "target": [
                {
                    "role": "edge",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "origin",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "relay",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "transcoder",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.xlarge"
                }
            ]
        },
        "properties": {
            "property": [
                {
                    "name": "property-name",
                    "value": "property-value"
                }
            ]
        }
    }

Read Launch Configuration

Description

Read a launch configuration

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig/{configuration-name}?accessToken=<accessToken>
  • Method: GET
  • Data: NA

RESPONSE

  • Failure: HTTP CODE 400 or 404
  • Data:
    {
      "errorMessage": "<error-message-string>",
      "timestamp": <error-timestamp>
    }
  • Success: HTTP CODE 200
  • Data:
     {
      "launchconfig": {
        "name": "<configuration-name>",
        "description": "<configuration-descrption>",
        "image": "<red5pro-image>",
        "version": "0.0.3",

      "targets": {
          "target": [
        {
          "role": "<role>",
          "instanceType": "<instance-type>",
          "connectionCapacity": "<instance-capacity>"
        }
        ]
        },

        "properties": {
          "property": [
            {
              "name": "<property-name>",
              "value": "<property-value>"
            }
          ]
        },
        "metadata": {
          "meta": [
            {
              "key": "<meta-name>",
              "value": "<meta-value>"
            }
          ]
        }
      }}

Example

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig/alltypes-01?accessToken=xyz123
  • Method: GET
  • Data: NA

RESPONSE

  • Success: HTTP CODE 200
  • Data:
{
    "launchconfig": {
        "image": "red5pro-image-name",
        "metadata": {
            "meta": [
                {
                    "value": "meta-value",
                    "key": "meta-name"
                }
            ]
        },
        "name": "alltypes-01",
        "description": "Launch config policy with all node types",
        "version": "0.0.3",
        "targets": {
            "target": [
                {
                    "role": "edge",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "origin",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "relay",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "transcoder",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.xlarge"
                }
            ]
        },
        "properties": {
            "property": [
                {
                    "name": "property-name",
                    "value": "property-value"
                }
            ]
        }
    }
}

Delete Launch Configuration

Description

Deletes a launch configuration

REQUEST

  • URI : http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig/{configuration-name}?accessToken=<accessToken>
  • Method: DELETE
  • Data: NA

RESPONSE

  • Failure: HTTP CODE 400 or 404
  • Data:
    {
      "errorMessage": "<error-message-string>",
      "timestamp": <error-timestamp>
    }
  • Success: HTTP CODE 200
  • Data:
     {
      "launchconfig": {
        "name": "<configuration-name>",
        "description": "<configuration-descrption>",
        "image": "<red5pro-image>",
        "version": "0.0.3",

      "targets": {
          "target": [
        {
          "role": "<role>",
          "instanceType": "<instance-type>",
          "connectionCapacity": "<instance-capacity>"
        }
        ]
        },

        "properties": {
          "property": [
            {
              "name": "<property-name>",
              "value": "<property-value>"
            }
          ]
        },
        "metadata": {
          "meta": [
            {
              "key": "<meta-name>",
              "value": "<meta-value>"
            }
          ]
        }
      }}

Example

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig/alltypes-01?accessToken=xyz123
  • Method: DELETE
  • Data : NA

RESPONSE

  • Success: HTTP CODE 200
  • Data:
{
    "launchconfig": {
        "image": "red5pro-image-name",
        "metadata": {
            "meta": [
                {
                    "value": "meta-value",
                    "key": "meta-name"
                }
            ]
        },
        "name": "alltypes-01",
        "description": "Launch config policy with all node types",
        "version": "0.0.3",
        "targets": {
            "target": [
                {
                    "role": "edge",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "origin",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "relay",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "transcoder",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.xlarge"
                }
            ]
        },
        "properties": {
            "property": [
                {
                    "name": "property-name",
                    "value": "property-value"
                }
            ]
        }
    }
}

Update Launch Configuration

Description

Updates an existing launch configuration

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig/{configuration-name}?accessToken=<accessToken>
  • Method: PUT
  • Data:
     {
      "launchconfig": {
        "name": "<configuration-name>",
        "description": "<configuration-descrption>",
        "image": "<red5pro-image>",
        "version": "0.0.3",

      "targets": {
          "target": [
        {
          "role": "<role>",
          "instanceType": "<instance-type>",
          "connectionCapacity": "<instance-capacity>"
        }
        ]
        },

        "properties": {
          "property": [
            {
              "name": "<property-name>",
              "value": "<property-value>"
            }
          ]
        },
        "metadata": {
          "meta": [
            {
              "key": "<meta-name>",
              "value": "<meta-value>"
            }
          ]
        }
      }}

RESPONSE

  • Failure: HTTP CODE 400 or 404
  • Data:
    {
      "errorMessage": "<error-message-string>",
      "timestamp": <error-timestamp>
    }
  • Success: HTTP CODE 200
  • Data: JSON
     {
      "launchconfig": {
        "name": "<configuration-name>",
        "description": "<configuration-descrption>",
        "image": "<red5pro-image>",
        "version": "0.0.3",

      "targets": {
          "target": [
        {
          "role": "<role>",
          "instanceType": "<instance-type>",
          "connectionCapacity": "<instance-capacity>"
        }
        ]
        },

        "properties": {
          "property": [
            {
              "name": "<property-name>",
              "value": "<property-value>"
            }
          ]
        },
        "metadata": {
          "meta": [
            {
              "key": "<meta-name>",
              "value": "<meta-value>"
            }
          ]
        }
      }}

Example

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig/alltypes-01?accessToken=xyz123
  • Method: PUT
  • Data: JSON
{
    "launchconfig": {
        "image": "red5pro-image-name",
        "metadata": {
            "meta": [
                {
                    "value": "meta-value",
                    "key": "meta-name"
                }
            ]
        },
        "name": "alltypes-01",
        "description": "Launch config policy with all node types",
        "version": "0.0.3",
        "targets": {
            "target": [
                {
                    "role": "edge",
                    "connectionCapacity": 1000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "origin",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "relay",
                    "connectionCapacity": 1000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "transcoder",
                    "connectionCapacity": 1000,
                    "instanceType": "c5.xlarge"
                }
            ]
        },
        "properties": {
            "property": [
                {
                    "name": "property-name",
                    "value": "property-value"
                }
            ]
        }
    }
}

RESPONSE

  • Success: HTTP CODE 200
  • Data:
{
    "launchconfig": {
        "image": "red5pro-image-name",
        "metadata": {
            "meta": [
                {
                    "value": "meta-value",
                    "key": "meta-name"
                }
            ]
        },
        "name": "alltypes-01",
        "description": "Launch config policy with all node types",
        "version": "0.0.3",
        "targets": {
            "target": [
                {
                    "role": "edge",
                    "connectionCapacity": 1000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "origin",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "relay",
                    "connectionCapacity": 1000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "transcoder",
                    "connectionCapacity": 1000,
                    "instanceType": "c5.xlarge"
                }
            ]
        },
        "properties": {
            "property": [
                {
                    "name": "property-name",
                    "value": "property-value"
                }
            ]
        }
    }
}

List Launch Configurations

Description

List launch configurations by name

REQUEST

  • URI : http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig?accessToken=<accessToken>
  • Method: GET
  • Data: NA

RESPONSE

  • Failure: HTTP CODE 400 or 404
  • Data:
    {
      "errorMessage": "<error-message-string>",
      "timestamp": <error-timestamp>
    }
  • Success: HTTP CODE 200
  • Data:
     [
      "<configuration-name>"
    ]

Example

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig?accessToken=xyz123
  • Method: GET
  • Data: NA

RESPONSE

  • Success: HTTP CODE 200
  • Data:
    [
      "alltypes-01",
      "default-v3"
    ]

Clone launch configuration

Description

Creates a new launch configuration with a new name using the data from an existing configuration

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig/<existing-configuration-name>/copy/<new-configuration-name>?accessToken=<accessToken>
  • Method: POST
  • Data: NA

RESPONSE

  • Failure: HTTP CODE 400 or 404
  • Data:
    {
      "errorMessage": "<error-message-string>",
      "timestamp": <error-timestamp>
    }
  • Success: HTTP CODE 201
  • Data:
    {
    "launchconfig": {
      "name": "<configuration-name>",
      "description": "<configuration-descrption>",
      "image": "<red5pro-image>",
      "version": "0.0.3",

    "targets": {
        "target": [
      {
        "role": "<role>",
        "instanceType": "<instance-type>",
        "connectionCapacity": "<instance-capacity>"
      }
      ]
      },

      "properties": {
        "property": [
          {
            "name": "<property-name>",
            "value": "<property-value>"
          }
        ]
      },
      "metadata": {
        "meta": [
          {
            "key": "<meta-name>",
            "value": "<meta-value>"
          }
        ]
      }
    }}

Example

REQUEST

  • URI: http://{host}:{port}/streammanager/api/3.1/admin/configurations/launchconfig/alltypes-01/copy/alltypes-02?accessToken=xyz123
  • Method: POST
  • Data: NA

RESPONSE

  • Success: HTTP CODE 201
  • Data:
{
    "launchconfig": {
        "image": "red5pro-image-name",
        "metadata": {
            "meta": [
                {
                    "value": "meta-value",
                    "key": "meta-name"
                }
            ]
        },
        "name": "alltypes-02",
        "description": "Launch config policy with all node types",
        "version": "0.0.3",
        "targets": {
            "target": [
                {
                    "role": "edge",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "origin",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "relay",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.large"
                },
                {
                    "role": "transcoder",
                    "connectionCapacity": 2000,
                    "instanceType": "c5.xlarge"
                }
            ]
        },
        "properties": {
            "property": [
                {
                    "name": "property-name",
                    "value": "property-value"
                }
            ]
        }
    }
}