{ "swagger": "2.0", "info": { "title": "ApplicationInsightsManagementClient", "description": "Azure Application Insights client for Annotations for a component.", "version": "2015-05-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.Insights/components/{resourceName}/Annotations": { "get": { "description": "Gets the list of annotations for a component for given time range", "operationId": "Annotations_List", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceNameParameter" }, { "$ref": "#/parameters/StartParameter" }, { "$ref": "#/parameters/EndParameter" } ], "responses": { "200": { "description": "successful operation", "schema": { "$ref": "#/definitions/AnnotationsListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/AnnotationError" } } }, "x-ms-examples": { "AnnotationsList": { "$ref": "./examples/AnnotationsList.json" } }, "x-ms-pageable": { "nextLinkName": null } }, "put": { "description": "Create an Annotation of an Application Insights component.", "operationId": "Annotations_Create", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceNameParameter" }, { "name": "AnnotationProperties", "description": "Properties that need to be specified to create an annotation of a Application Insights component.", "in": "body", "required": true, "schema": { "$ref": "#/definitions/Annotation" } } ], "responses": { "200": { "description": "An object containing the annotation definition created by this PUT call.", "schema": { "type": "array", "items": { "$ref": "#/definitions/Annotation" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/AnnotationError" } } }, "x-ms-examples": { "AnnotationsCreate": { "$ref": "./examples/AnnotationsCreate.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}": { "delete": { "description": "Delete an Annotation of an Application Insights component.", "operationId": "Annotations_Delete", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceNameParameter" }, { "$ref": "#/parameters/AnnotationIdParameter" } ], "responses": { "200": { "description": "The annotation that was successfully deleted." } }, "x-ms-examples": { "AnnotationsDelete": { "$ref": "./examples/AnnotationsDelete.json" } } }, "get": { "description": "Get the annotation for given id.", "operationId": "Annotations_Get", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ResourceNameParameter" }, { "$ref": "#/parameters/AnnotationIdParameter" } ], "responses": { "200": { "description": "The Annotation object for this id.", "schema": { "type": "array", "items": { "$ref": "#/definitions/Annotation" } } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "#/definitions/AnnotationError" } } }, "x-ms-examples": { "AnnotationsGet": { "$ref": "./examples/AnnotationsGet.json" } } } } }, "definitions": { "Annotation": { "type": "object", "description": "Annotation associated with an application insights resource.", "properties": { "AnnotationName": { "type": "string", "description": "Name of annotation" }, "Category": { "type": "string", "description": "Category of annotation, free form" }, "EventTime": { "type": "string", "format": "date-time", "description": "Time when event occurred" }, "Id": { "type": "string", "description": "Unique Id for annotation" }, "Properties": { "type": "string", "description": "Serialized JSON object for detailed properties" }, "RelatedAnnotation": { "type": "string", "description": "Related parent annotation if any", "default": "null" } } }, "AnnotationsListResult": { "properties": { "value": { "type": "array", "readOnly": true, "items": { "$ref": "#/definitions/Annotation" }, "x-ms-identifiers": [ "Id" ], "description": "An array of annotations." } }, "description": "Annotations list result." }, "InnerError": { "type": "object", "description": "Inner error", "properties": { "diagnosticcontext": { "type": "string", "description": "Provides correlation for request" }, "time": { "type": "string", "format": "date-time", "description": "Request time" } } }, "AnnotationError": { "type": "object", "description": "Error associated with trying to create annotation with Id that already exist", "properties": { "code": { "type": "string", "description": "Error detail code and explanation" }, "message": { "type": "string", "description": "Error message" }, "innererror": { "$ref": "#/definitions/InnerError" } } } }, "parameters": { "ResourceNameParameter": { "name": "resourceName", "in": "path", "required": true, "type": "string", "description": "The name of the Application Insights component resource.", "x-ms-parameter-location": "method" }, "AnnotationIdParameter": { "name": "annotationId", "in": "path", "required": true, "type": "string", "description": "The unique annotation ID. This is unique within a Application Insights component.", "x-ms-parameter-location": "method" }, "StartParameter": { "name": "start", "in": "query", "required": true, "type": "string", "description": "The start time to query from for annotations, cannot be older than 90 days from current date.", "x-ms-parameter-location": "method" }, "EndParameter": { "name": "end", "in": "query", "required": true, "type": "string", "description": "The end time to query for annotations.", "x-ms-parameter-location": "method" } } }