{
  "openapi": "3.0.1",
  "info": {
    "title": "Azure Media Services",
    "description": "This Swagger was generated by the API Framework.",
    "version": "2019-09-01-preview"
  },
  "servers": [
    {
      "url": "https://management.azure.com/"
    }
  ],
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/mediaGraphs": {
      "get": {
        "summary": "List Media Graphs",
        "description": "Lists Media Graphs in the Media Services account",
        "operationId": "MediaGraphs_List",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique identifier for a Microsoft Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceGroupName",
            "in": "path",
            "description": "The name of the resource group within the Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountName",
            "in": "path",
            "description": "The Media Services account name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "description": "The Version of the API to be used with the client request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "$top",
            "in": "query",
            "description": "Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaGraphCollection"
                }
              }
            }
          },
          "default": {
            "description": "Detailed error information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/mediaGraphs/{mediaGraphName}": {
      "get": {
        "summary": "Get a Media Graph",
        "description": "Get the details of a Media Graph in the Media Services account",
        "operationId": "MediaGraphs_Get",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique identifier for a Microsoft Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceGroupName",
            "in": "path",
            "description": "The name of the resource group within the Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountName",
            "in": "path",
            "description": "The Media Services account name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaGraphName",
            "in": "path",
            "description": "The Media Graph name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "description": "The Version of the API to be used with the client request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaGraph"
                }
              }
            }
          },
          "404": {
            "description": "NotFound"
          },
          "default": {
            "description": "Detailed error information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Create or update a Media Graph",
        "description": "Create or update a Media Graph in the Media Services account",
        "operationId": "MediaGraphs_CreateOrUpdate",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique identifier for a Microsoft Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceGroupName",
            "in": "path",
            "description": "The name of the resource group within the Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountName",
            "in": "path",
            "description": "The Media Services account name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaGraphName",
            "in": "path",
            "description": "The Media Graph name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "description": "The Version of the API to be used with the client request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MediaGraph"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaGraph"
                }
              }
            }
          },
          "default": {
            "description": "Detailed error information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete a Media Graph",
        "description": "Deletes a Media Graph in the Media Services account",
        "operationId": "MediaGraphs_Delete",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique identifier for a Microsoft Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceGroupName",
            "in": "path",
            "description": "The name of the resource group within the Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountName",
            "in": "path",
            "description": "The Media Services account name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaGraphName",
            "in": "path",
            "description": "The Media Graph name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "description": "The Version of the API to be used with the client request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "NoContent"
          },
          "default": {
            "description": "Detailed error information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/mediaGraphs/{mediaGraphName}/operationResults/{operationId}": {
      "get": {
        "summary": "Get the operation result",
        "description": "Get the operation result of a Media Graph in the Media Services account",
        "operationId": "OperationResults_Get",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique identifier for a Microsoft Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceGroupName",
            "in": "path",
            "description": "The name of the resource group within the Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountName",
            "in": "path",
            "description": "The Media Services account name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaGraphName",
            "in": "path",
            "description": "The Media Graph name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operationId",
            "in": "path",
            "description": "The operation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "description": "The Version of the API to be used with the client request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaGraphOperationResult"
                }
              }
            }
          },
          "default": {
            "description": "Detailed error information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/mediaGraphs/{mediaGraphName}/operationsStatus/{operationId}": {
      "get": {
        "summary": "Get the operation status",
        "description": "Get the operation status of a Media Graph in the media services account",
        "operationId": "OperationsStatus_Get",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique identifier for a Microsoft Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceGroupName",
            "in": "path",
            "description": "The name of the resource group within the Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountName",
            "in": "path",
            "description": "The Media Services account name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaGraphName",
            "in": "path",
            "description": "The Media Graph name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operationId",
            "in": "path",
            "description": "The operation ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "description": "The Version of the API to be used with the client request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MediaGraphOperationStatus"
                }
              }
            }
          },
          "default": {
            "description": "Detailed error information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/mediaGraphs/{mediaGraphName}/start": {
      "post": {
        "summary": "Start a Media Graph",
        "description": "Start a Media Graph in the Media Services account",
        "operationId": "MediaGraphs_Start",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique identifier for a Microsoft Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceGroupName",
            "in": "path",
            "description": "The name of the resource group within the Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountName",
            "in": "path",
            "description": "The Media Services account name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaGraphName",
            "in": "path",
            "description": "The Media Graph name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "description": "The Version of the API to be used with the client request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "202": {
            "description": "Accepted"
          },
          "default": {
            "description": "Detailed error information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/mediaGraphs/{mediaGraphName}/stop": {
      "post": {
        "summary": "Stop a Media Graph",
        "description": "Stop a Media Graph in the Media Services account",
        "operationId": "MediaGraphs_Stop",
        "parameters": [
          {
            "name": "subscriptionId",
            "in": "path",
            "description": "The unique identifier for a Microsoft Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resourceGroupName",
            "in": "path",
            "description": "The name of the resource group within the Azure subscription.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountName",
            "in": "path",
            "description": "The Media Services account name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mediaGraphName",
            "in": "path",
            "description": "The Media Graph name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "api-version",
            "in": "query",
            "description": "The Version of the API to be used with the client request.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "202": {
            "description": "Accepted"
          },
          "default": {
            "description": "Detailed error information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApiError": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ODataError"
          }
        },
        "description": "The API error."
      },
      "MediaGraph": {
        "properties": {
          "properties": {
            "$ref": "#/components/schemas/MediaGraphProperties"
          }
        },
        "description": "The Media Graph.",
        "allOf": [
          {
            "description": "The resource model definition for a ARM proxy resource.",
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Fully qualified resource ID for the resource.",
                    "readOnly": true
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the resource.",
                    "readOnly": true
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the resource.",
                    "readOnly": true
                  }
                },
                "description": "The core properties of ARM resources."
              }
            ]
          }
        ]
      },
      "MediaGraphAssetSink": {
        "required": [
          "assetName"
        ],
        "properties": {
          "assetName": {
            "type": "string",
            "description": "Asset name"
          }
        },
        "description": "Asset sink",
        "allOf": [
          {
            "$ref": "#/components/schemas/MediaGraphSink"
          }
        ]
      },
      "MediaGraphCollection": {
        "type": "object",
        "properties": {
          "@odata.nextLink": {
            "type": "string",
            "description": "A link to the next page of the collection (when the collection contains too many results to return in one response)."
          },
          "value": {
            "type": "array",
            "description": "A collection of MediaGraph items.",
            "items": {
              "$ref": "#/components/schemas/MediaGraph"
            }
          }
        },
        "description": "A collection of MediaGraph items."
      },
      "MediaGraphOperationError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The operation error code"
          },
          "message": {
            "type": "string",
            "description": "The operation error message"
          }
        },
        "description": "The operation error"
      },
      "MediaGraphOperationResult": {
        "type": "object",
        "description": "The result of the Media Graph operation"
      },
      "MediaGraphOperationStatus": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/MediaGraphOperationError"
          },
          "name": {
            "type": "string",
            "description": "The name of the Media Graph operation"
          },
          "status": {
            "type": "string",
            "description": "The status of the Media Graph operation"
          }
        },
        "description": "The status of the Media Graph operation"
      },
      "MediaGraphProperties": {
        "required": [
          "sinks",
          "sources"
        ],
        "type": "object",
        "properties": {
          "created": {
            "type": "string",
            "description": "Date the Media Graph was created",
            "format": "date-time",
            "nullable": false,
            "readOnly": true
          },
          "description": {
            "type": "string",
            "description": "Media Graph  description"
          },
          "lastModified": {
            "type": "string",
            "description": "Date the Media Graph was last modified",
            "format": "date-time",
            "nullable": false,
            "readOnly": true
          },
          "sinks": {
            "type": "array",
            "description": "Media Graph sinks",
            "items": {
              "$ref": "#/components/schemas/MediaGraphSink"
            }
          },
          "sources": {
            "type": "array",
            "description": "Media Graph sources",
            "items": {
              "$ref": "#/components/schemas/MediaGraphSource"
            }
          },
          "state": {
            "type": "string",
            "description": "Media Graph state",
            "nullable": false,
            "readOnly": true,
            "enum": [
              "Running",
              "Starting",
              "Stopped",
              "Stopping"
            ]
          }
        },
        "description": "Class for Media Graph properties"
      },
      "MediaGraphRtspSource": {
        "required": [
          "rtspUrl"
        ],
        "properties": {
          "credentials": {
            "$ref": "#/components/schemas/MediaGraphUserCredentials"
          },
          "rtspUrl": {
            "type": "string",
            "description": "RTSP URL"
          }
        },
        "description": "RTSP source",
        "allOf": [
          {
            "$ref": "#/components/schemas/MediaGraphSource"
          }
        ]
      },
      "MediaGraphSink": {
        "required": [
          "@odata.type",
          "inputs",
          "name"
        ],
        "type": "object",
        "properties": {
          "@odata.type": {
            "type": "string",
            "description": "The discriminator for derived types."
          },
          "inputs": {
            "type": "array",
            "description": "Sink inputs",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string",
            "description": "Sink name"
          }
        },
        "description": "Media Sink",
        "discriminator": {
          "propertyName": "@odata.type"
        }
      },
      "MediaGraphSource": {
        "required": [
          "@odata.type",
          "name"
        ],
        "type": "object",
        "properties": {
          "@odata.type": {
            "type": "string",
            "description": "The discriminator for derived types."
          },
          "name": {
            "type": "string",
            "description": "Source name"
          }
        },
        "description": "Media source",
        "discriminator": {
          "propertyName": "@odata.type"
        }
      },
      "MediaGraphUserCredentials": {
        "required": [
          "password",
          "username"
        ],
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "description": "Password credential"
          },
          "username": {
            "type": "string",
            "description": "User name"
          }
        },
        "description": "Credentials to authenticate to Media Graph sources"
      },
      "ODataError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "A language-independent error name."
          },
          "details": {
            "type": "array",
            "description": "The error details.",
            "items": {
              "$ref": "#/components/schemas/ODataError"
            }
          },
          "message": {
            "type": "string",
            "description": "The error message."
          },
          "target": {
            "type": "string",
            "description": "The target of the error (for example, the name of the property in error)."
          }
        },
        "description": "Information about an error."
      }
    },
    "parameters": {
      "ApiVersion": {
        "name": "api-version",
        "in": "query",
        "description": "The Version of the API to be used with the client request.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "MediaServicesAccountName": {
        "name": "accountName",
        "in": "path",
        "description": "The Media Services account name.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "ResourceGroupName": {
        "name": "resourceGroupName",
        "in": "path",
        "description": "The name of the resource group within the Azure subscription.",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "SubscriptionId": {
        "name": "subscriptionId",
        "in": "path",
        "description": "The unique identifier for a Microsoft Azure subscription.",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "azure_auth": {
        "type": "oauth2",
        "description": "Azure Active Directory OAuth2 Flow"
      }
    }
  }
}