{ "swagger": "2.0", "info": { "version": "2025-07-01", "title": "ContainerApps API Client" }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "flow": "implicit", "description": "Azure Active Directory OAuth2 Flow", "scopes": { "user_impersonation": "impersonate your user account" } } }, "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols": { "get": { "tags": [ "ContainerAppsSourceControls" ], "summary": "Get the Container App SourceControls in a given resource group.", "operationId": "ContainerAppsSourceControls_ListByContainerApp", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "containerAppName", "in": "path", "description": "Name of the Container App.", "required": true, "type": "string" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SourceControlCollection" } }, "default": { "description": "Common error response.", "schema": { "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } }, "x-ms-examples": { "List App's Source Controls": { "$ref": "./examples/SourceControls_ListByContainer.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}": { "get": { "tags": [ "ContainerAppsSourceControls" ], "summary": "Get a SourceControl of a Container App.", "operationId": "ContainerAppsSourceControls_Get", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "containerAppName", "in": "path", "description": "Name of the Container App.", "required": true, "type": "string" }, { "name": "sourceControlName", "in": "path", "description": "Name of the Container App SourceControl.", "required": true, "type": "string" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SourceControl" } }, "default": { "description": "Common error response.", "schema": { "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } }, "x-ms-examples": { "Get Container App's SourceControl": { "$ref": "./examples/SourceControls_Get.json" } } }, "put": { "tags": [ "ContainerAppsSourceControls" ], "summary": "Create or update the SourceControl for a Container App.", "description": "Create or update the SourceControl for a Container App.", "operationId": "ContainerAppsSourceControls_CreateOrUpdate", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "containerAppName", "in": "path", "description": "Name of the Container App.", "required": true, "type": "string" }, { "name": "sourceControlName", "in": "path", "description": "Name of the Container App SourceControl.", "required": true, "type": "string" }, { "name": "sourceControlEnvelope", "in": "body", "description": "Properties used to create a Container App SourceControl", "required": true, "schema": { "$ref": "#/definitions/SourceControl" } }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/SourceControl" } }, "201": { "description": "Created", "schema": { "$ref": "#/definitions/SourceControl" } }, "default": { "description": "Common error response.", "schema": { "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } }, "x-ms-examples": { "Create or Update Container App SourceControl": { "$ref": "./examples/SourceControls_CreateOrUpdate.json" } }, "x-ms-long-running-operation": true }, "delete": { "tags": [ "ContainerAppsSourceControls" ], "summary": "Delete a Container App SourceControl.", "description": "Delete a Container App SourceControl.", "operationId": "ContainerAppsSourceControls_Delete", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "containerAppName", "in": "path", "description": "Name of the Container App.", "required": true, "type": "string" }, { "name": "sourceControlName", "in": "path", "description": "Name of the Container App SourceControl.", "required": true, "type": "string" }, { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Container App SourceControl deleted successfully." }, "202": { "description": "Delete operation is in progress." }, "204": { "description": "Container App SourceControl does not exist." }, "default": { "description": "Common error response.", "schema": { "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" } } }, "x-ms-examples": { "Delete Container App SourceControl": { "$ref": "./examples/SourceControls_Delete.json" } }, "x-ms-long-running-operation": true } } }, "definitions": { "SourceControl": { "description": "Container App SourceControl.", "type": "object", "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ], "properties": { "properties": { "description": "SourceControl resource specific properties", "type": "object", "properties": { "operationState": { "description": "Current provisioning State of the operation", "enum": [ "InProgress", "Succeeded", "Failed", "Canceled" ], "type": "string", "readOnly": true, "x-ms-enum": { "name": "SourceControlOperationState", "modelAsString": true } }, "repoUrl": { "description": "The repo url which will be integrated to ContainerApp.", "type": "string" }, "branch": { "description": "The branch which will trigger the auto deployment", "type": "string" }, "githubActionConfiguration": { "$ref": "#/definitions/GithubActionConfiguration", "description": "Container App Revision Template with all possible settings and the\ndefaults if user did not provide them. The defaults are populated\nas they were at the creation time" } }, "x-ms-client-flatten": true } } }, "GithubActionConfiguration": { "description": "Configuration properties that define the mutable settings of a Container App SourceControl", "type": "object", "properties": { "registryInfo": { "$ref": "#/definitions/RegistryInfo", "description": "Registry configurations." }, "azureCredentials": { "$ref": "#/definitions/AzureCredentials", "description": "AzureCredentials configurations." }, "contextPath": { "description": "Context path", "type": "string" }, "githubPersonalAccessToken": { "description": "One time Github PAT to configure github environment", "type": "string", "x-ms-mutability": [ "create", "update" ], "x-ms-secret": true }, "image": { "description": "Image name", "type": "string" }, "publishType": { "description": "Code or Image", "type": "string" }, "os": { "description": "Operation system", "type": "string" }, "runtimeStack": { "description": "Runtime stack", "type": "string" }, "runtimeVersion": { "description": "Runtime version", "type": "string" } } }, "RegistryInfo": { "description": "Container App registry information.", "type": "object", "properties": { "registryUrl": { "description": "registry server Url.", "type": "string" }, "registryUserName": { "description": "registry username.", "type": "string" }, "registryPassword": { "description": "registry secret.", "type": "string", "x-ms-mutability": [ "create", "update" ], "x-ms-secret": true } } }, "AzureCredentials": { "description": "Container App credentials.", "type": "object", "properties": { "clientId": { "description": "Client Id.", "type": "string", "x-ms-mutability": [ "create", "update" ], "x-ms-secret": true }, "clientSecret": { "description": "Client Secret.", "type": "string", "x-ms-mutability": [ "create", "update" ], "x-ms-secret": true }, "tenantId": { "description": "Tenant Id.", "type": "string", "x-ms-mutability": [ "create", "update" ], "x-ms-secret": true }, "kind": { "description": "Kind of auth github does for deploying the template", "type": "string", "x-ms-mutability": [ "create", "update" ] }, "subscriptionId": { "description": "Subscription Id.", "type": "string" } } }, "SourceControlCollection": { "description": "SourceControl collection ARM resource.", "required": [ "value" ], "type": "object", "properties": { "value": { "description": "Collection of resources.", "type": "array", "items": { "$ref": "#/definitions/SourceControl" } }, "nextLink": { "description": "Link to next page of resources.", "type": "string", "readOnly": true } } } } }