{ "swagger": "2.0", "info": { "title": "ApiManagementClient", "description": "Use these REST APIs for performing operations on Email Templates associated with your Azure API Management deployment.", "version": "2018-01-01" }, "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.ApiManagement/service/{serviceName}/templates": { "get": { "tags": [ "EmailTemplate" ], "operationId": "EmailTemplate_ListByService", "description": "Lists a collection of properties defined within a service instance.", "x-ms-examples": { "ApiManagementListEmailTemplates": { "$ref": "./examples/ApiManagementListEmailTemplates.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "A Collection of the Email Template for the specified API Management service instance.", "schema": { "$ref": "#/definitions/EmailTemplateCollection" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}": { "head": { "tags": [ "EmailTemplates" ], "operationId": "EmailTemplate_GetEntityTag", "description": "Gets the entity state (Etag) version of the email template specified by its identifier.", "x-ms-examples": { "ApiManagementHeadEmailTemplate": { "$ref": "./examples/ApiManagementHeadEmailTemplate.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/TemplateNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Specified email template entity exists and current entity state version is present in the ETag header.", "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "get": { "tags": [ "EmailTemplates" ], "operationId": "EmailTemplate_Get", "description": "Gets the details of the email template specified by its identifier.", "x-ms-examples": { "ApiManagementGetEmailTemplate": { "$ref": "./examples/ApiManagementGetEmailTemplate.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/TemplateNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The response body contains the specified Email template.", "schema": { "$ref": "#/definitions/EmailTemplateContract" }, "headers": { "ETag": { "description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.", "type": "string" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "put": { "tags": [ "EmailTemplates" ], "operationId": "EmailTemplate_CreateOrUpdate", "description": "Updates an Email Template.", "x-ms-examples": { "ApiManagementCreateEmailTemplate": { "$ref": "./examples/ApiManagementCreateEmailTemplate.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/TemplateNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/EmailTemplateUpdateParameters" }, "description": "Email Template update parameters." }, { "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "201": { "description": "Email Template was successfully updated.", "schema": { "$ref": "#/definitions/EmailTemplateContract" } }, "200": { "description": "Email Template was successfully updated.", "schema": { "$ref": "#/definitions/EmailTemplateContract" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "EmailTemplates" ], "operationId": "EmailTemplate_Update", "description": "Updates the specific Email Template.", "x-ms-examples": { "ApiManagementUpdateEmailTemplate": { "$ref": "./examples/ApiManagementUpdateEmailTemplate.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/TemplateNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/EmailTemplateUpdateParameters" }, "description": "Update parameters." }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "Email Template was successfully updated." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "EmailTemplates" ], "operationId": "EmailTemplate_Delete", "description": "Reset the Email Template to default template provided by the API Management service instance.", "x-ms-examples": { "ApiManagementDeleteEmailTemplate": { "$ref": "./examples/ApiManagementDeleteEmailTemplate.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/TemplateNameParameter" }, { "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Email Template was successfully reset to default." }, "204": { "description": "Email Template was successfully reset to default." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } } } }, "definitions": { "EmailTemplateCollection": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/EmailTemplateContract" }, "description": "Page values." }, "nextLink": { "type": "string", "description": "Next page link if any." } }, "description": "Paged email template list representation." }, "EmailTemplateContract": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/EmailTemplateContractProperties", "description": "Email Template entity contract properties." } }, "allOf": [ { "$ref": "./apimanagement.json#/definitions/Resource" } ], "description": "Email Template details." }, "EmailTemplateContractProperties": { "properties": { "subject": { "type": "string", "description": "Subject of the Template.", "minLength": 1, "maxLength": 1000 }, "body": { "type": "string", "description": "Email Template Body. This should be a valid XDocument", "minLength": 1 }, "title": { "type": "string", "description": "Title of the Template." }, "description": { "type": "string", "description": "Description of the Email Template." }, "isDefault": { "type": "boolean", "description": "Whether the template is the default template provided by Api Management or has been edited.", "readOnly": true }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/EmailTemplateParametersContractProperties" }, "description": "Email Template Parameter values." } }, "required": [ "body", "subject" ], "description": "Email Template Contract properties." }, "EmailTemplateUpdateParameters": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/EmailTemplateUpdateParameterProperties", "description": "Email Template Update contract properties." } }, "description": "Email Template update Parameters." }, "EmailTemplateUpdateParameterProperties": { "properties": { "subject": { "type": "string", "description": "Subject of the Template.", "minLength": 1, "maxLength": 1000 }, "title": { "type": "string", "description": "Title of the Template." }, "description": { "type": "string", "description": "Description of the Email Template." }, "body": { "type": "string", "description": "Email Template Body. This should be a valid XDocument", "minLength": 1 }, "parameters": { "type": "array", "items": { "$ref": "#/definitions/EmailTemplateParametersContractProperties" }, "description": "Email Template Parameter values." } }, "description": "Email Template Update Contract properties." }, "EmailTemplateParametersContractProperties": { "properties": { "name": { "type": "string", "description": "Template parameter name.", "minLength": 1, "maxLength": 256, "pattern": "^[A-Za-z0-9-._]+$" }, "title": { "type": "string", "description": "Template parameter title.", "minLength": 1, "maxLength": 4096 }, "description": { "type": "string", "description": "Template parameter description.", "minLength": 1, "maxLength": 256, "pattern": "^[A-Za-z0-9-._]+$" } }, "description": "Email Template Parameter contract." } }, "parameters": { "TemplateNameParameter": { "name": "templateName", "in": "path", "required": true, "type": "string", "enum": [ "applicationApprovedNotificationMessage", "accountClosedDeveloper", "quotaLimitApproachingDeveloperNotificationMessage", "newDeveloperNotificationMessage", "emailChangeIdentityDefault", "inviteUserNotificationMessage", "newCommentNotificationMessage", "confirmSignUpIdentityDefault", "newIssueNotificationMessage", "purchaseDeveloperNotificationMessage", "passwordResetIdentityDefault", "passwordResetByAdminNotificationMessage", "rejectDeveloperNotificationMessage", "requestDeveloperNotificationMessage" ], "x-ms-enum": { "name": "TemplateName", "modelAsString": true }, "description": "Email Template Name Identifier.", "x-ms-parameter-location": "method" } } }