{ "swagger": "2.0", "info": { "title": "ApiManagementClient", "description": "Use these REST APIs for performing operations on Diagnostic entity associated with your Azure API Management deployment. Diagnostics are used to log requests/responses in the APIM proxy.", "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}/diagnostics": { "get": { "tags": [ "Diagnostics" ], "operationId": "Diagnostic_ListByService", "description": "Lists all diagnostics of the API Management service instance.", "x-ms-examples": { "ApiManagementListDiagnostics": { "$ref": "./examples/ApiManagementListDiagnostics.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|-----------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |" }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" } ], "responses": { "200": { "description": "Paged Result response of diagnostics.", "schema": { "$ref": "#/definitions/DiagnosticCollection" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "#/definitions/DiagnosticContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}": { "head": { "tags": [ "Diagnostics" ], "operationId": "Diagnostic_GetEntityTag", "description": "Gets the entity state (Etag) version of the Diagnostic specified by its identifier.", "x-ms-examples": { "ApiManagementHeadDiagnostic": { "$ref": "./examples/ApiManagementHeadDiagnostic.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/DiagnosticIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Operation completed successfully.", "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": [ "Diagnostics" ], "operationId": "Diagnostic_Get", "description": "Gets the details of the Diagnostic specified by its identifier.", "x-ms-examples": { "ApiManagementGetDiagnostic": { "$ref": "./examples/ApiManagementGetDiagnostic.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/DiagnosticIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The response body contains the specified Diagnostic entity.", "schema": { "$ref": "#/definitions/DiagnosticContract" }, "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": [ "Diagnostics" ], "operationId": "Diagnostic_CreateOrUpdate", "description": "Creates a new Diagnostic or updates an existing one.", "x-ms-examples": { "ApiManagementCreateDiagnostic": { "$ref": "./examples/ApiManagementCreateDiagnostic.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/DiagnosticIdParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/DiagnosticContract" }, "description": "Create parameters." }, { "$ref": "./apimanagement.json#/parameters/IfMatchOptionalParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "201": { "description": "Diagnostic was successfully created.", "schema": { "$ref": "#/definitions/DiagnosticContract" } }, "200": { "description": "Diagnostic was successfully updated.", "schema": { "$ref": "#/definitions/DiagnosticContract" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Diagnostics" ], "operationId": "Diagnostic_Update", "description": "Updates the details of the Diagnostic specified by its identifier.", "x-ms-examples": { "ApiManagementUpdateDiagnostic": { "$ref": "./examples/ApiManagementUpdateDiagnostic.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/DiagnosticIdParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/DiagnosticContract" }, "description": "Diagnostic Update parameters." }, { "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "The Diagnostic was successfully updated." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "Diagnostics" ], "operationId": "Diagnostic_Delete", "description": "Deletes the specified Diagnostic.", "x-ms-examples": { "ApiManagementDeleteDiagnostic": { "$ref": "./examples/ApiManagementDeleteDiagnostic.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/DiagnosticIdParameter" }, { "$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The Diagnostic was successfully deleted." }, "204": { "description": "The Diagnostic was successfully deleted." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers": { "get": { "tags": [ "DiagnosticLoggers" ], "operationId": "DiagnosticLogger_ListByService", "description": "Lists all loggers associated with the specified Diagnostic of the API Management service instance.", "x-ms-examples": { "ApiManagementListDiagnosticLoggers": { "$ref": "./examples/ApiManagementListDiagnosticLoggers.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/DiagnosticIdParameter" }, { "name": "$filter", "in": "query", "required": false, "type": "string", "description": "| Field | Supported operators | Supported functions |\n|-------------|------------------------|-----------------------------------|\n| id | ge, le, eq, ne, gt, lt | substringof, startswith, endswith |\n| type | eq | |" }, { "$ref": "./apimanagement.json#/parameters/TopQueryParameter" }, { "$ref": "./apimanagement.json#/parameters/SkipQueryParameter" } ], "responses": { "200": { "description": "Paged Result response of loggers assigned to the specified Diagnostic.", "schema": { "$ref": "./apimloggers.json#/definitions/LoggerCollection" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-odata": "./apimloggers.json#/definitions/LoggerContract" } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/diagnostics/{diagnosticId}/loggers/{loggerid}": { "head": { "tags": [ "DiagnosticLoggers" ], "operationId": "DiagnosticLogger_CheckEntityExists", "description": "Checks that logger entity specified by identifier is associated with the diagnostics entity.", "x-ms-examples": { "ApiManagementHeadDiagnosticLogger": { "$ref": "./examples/ApiManagementHeadDiagnosticLogger.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/DiagnosticIdParameter" }, { "$ref": "./apimloggers.json#/parameters/LoggerIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "204": { "description": "The logger is associated with the diagnostic entity." }, "404": { "description": "The logger is not associated with the diagnostic entity." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "put": { "tags": [ "DiagnosticLoggers" ], "operationId": "DiagnosticLogger_CreateOrUpdate", "description": "Attaches a logger to a diagnostic.", "x-ms-examples": { "ApiManagementCreateDiagnosticLogger": { "$ref": "./examples/ApiManagementCreateDiagnosticLogger.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/DiagnosticIdParameter" }, { "$ref": "./apimloggers.json#/parameters/LoggerIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "201": { "description": "Logger was successfully attached to Diagnostic.", "schema": { "$ref": "./apimloggers.json#/definitions/LoggerContract" } }, "200": { "description": "Logger to Diagnostic link was successfully updated.", "schema": { "$ref": "./apimloggers.json#/definitions/LoggerContract" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } }, "delete": { "tags": [ "DiagnosticLoggers" ], "operationId": "DiagnosticLogger_Delete", "description": "Deletes the specified Logger from Diagnostic.", "x-ms-examples": { "ApiManagementDeleteDiagnosticLogger": { "$ref": "./examples/ApiManagementDeleteDiagnosticLogger.json" } }, "parameters": [ { "$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "./apimanagement.json#/parameters/ServiceNameParameter" }, { "$ref": "#/parameters/DiagnosticIdParameter" }, { "$ref": "./apimloggers.json#/parameters/LoggerIdParameter" }, { "$ref": "./apimanagement.json#/parameters/ApiVersionParameter" }, { "$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The Logger was successfully detached from Diagnostic." }, "204": { "description": "The Logger was successfully detached from Diagnostic." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "./apimanagement.json#/definitions/ErrorResponse" } } } } } }, "definitions": { "DiagnosticCollection": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/DiagnosticContract" }, "description": "Page values." }, "nextLink": { "type": "string", "description": "Next page link if any." } }, "description": "Paged Diagnostic list representation." }, "DiagnosticContract": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/DiagnosticContractProperties", "description": "Diagnostic entity contract properties." } }, "allOf": [ { "$ref": "./apimanagement.json#/definitions/Resource" } ], "description": "Diagnostic details." }, "DiagnosticContractProperties": { "properties": { "enabled": { "type": "boolean", "description": "Indicates whether a diagnostic should receive data or not." } }, "required": [ "enabled" ], "description": "Diagnostic Entity Properties" } }, "parameters": { "DiagnosticIdParameter": { "name": "diagnosticId", "in": "path", "required": true, "type": "string", "description": "Diagnostic identifier. Must be unique in the current API Management service instance.", "minLength": 1, "maxLength": 80, "pattern": "(^[\\w]+$)|(^[\\w][\\w\\-]+[\\w]$)", "x-ms-parameter-location": "method" } } }