{ "swagger": "2.0", "info": { "title": "ApplicationInsightsManagementClient", "description": "Azure Application Insights client for API keys of 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}/ApiKeys": { "get": { "description": "Gets a list of API keys of an Application Insights component.", "operationId": "APIKeys_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" } ], "responses": { "200": { "description": "A list containing 0 or more API key definitions of an Application Insights component.", "schema": { "$ref": "#/definitions/ApplicationInsightsComponentAPIKeyListResult" } } }, "x-ms-examples": { "APIKeysList": { "$ref": "./examples/APIKeysList.json" } }, "x-ms-pageable": { "nextLinkName": null } }, "post": { "description": "Create an API Key of an Application Insights component.", "operationId": "APIKeys_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": "APIKeyProperties", "description": "Properties that need to be specified to create an API key of a Application Insights component.", "in": "body", "required": true, "schema": { "$ref": "#/definitions/APIKeyRequest" } } ], "responses": { "200": { "description": "An object containing the API Key definition created by this POST call.", "schema": { "$ref": "#/definitions/ApplicationInsightsComponentAPIKey" } } }, "x-ms-examples": { "APIKeyCreate": { "$ref": "./examples/APIKeysCreate.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}": { "delete": { "description": "Delete an API Key of an Application Insights component.", "operationId": "APIKeys_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/KeyId" } ], "responses": { "200": { "description": "The API Key that was successfully deleted.", "schema": { "$ref": "#/definitions/ApplicationInsightsComponentAPIKey" } } }, "x-ms-examples": { "APIKeyDelete": { "$ref": "./examples/APIKeysDelete.json" } } }, "get": { "description": "Get the API Key for this key id.", "operationId": "APIKeys_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/KeyId" } ], "responses": { "200": { "description": "The API Key for this key id.", "schema": { "$ref": "#/definitions/ApplicationInsightsComponentAPIKey" } } }, "x-ms-examples": { "APIKeysGet": { "$ref": "./examples/APIKeysGet.json" } } } } }, "definitions": { "APIKeyRequest": { "description": "An Application Insights component API Key creation request definition.", "type": "object", "properties": { "name": { "type": "string", "description": "The name of the API Key." }, "linkedReadProperties": { "type": "array", "items": { "type": "string" }, "description": "The read access rights of this API Key." }, "linkedWriteProperties": { "type": "array", "items": { "type": "string" }, "description": "The write access rights of this API Key." } } }, "ApplicationInsightsComponentAPIKeyListResult": { "description": "Describes the list of API Keys of an Application Insights Component.", "required": [ "value" ], "properties": { "value": { "type": "array", "description": "List of API Key definitions.", "items": { "$ref": "#/definitions/ApplicationInsightsComponentAPIKey" } } } }, "ApplicationInsightsComponentAPIKey": { "description": "Properties that define an API key of an Application Insights Component.", "type": "object", "properties": { "id": { "type": "string", "readOnly": true, "description": "The unique ID of the API key inside an Application Insights component. It is auto generated when the API key is created." }, "apiKey": { "type": "string", "readOnly": true, "description": "The API key value. It will be only return once when the API Key was created." }, "createdDate": { "type": "string", "description": "The create date of this API key." }, "name": { "type": "string", "description": "The name of the API key." }, "linkedReadProperties": { "type": "array", "items": { "type": "string" }, "description": "The read access rights of this API Key." }, "linkedWriteProperties": { "type": "array", "items": { "type": "string" }, "description": "The write access rights of this API Key." } } } }, "parameters": { "ResourceNameParameter": { "name": "resourceName", "in": "path", "required": true, "type": "string", "description": "The name of the Application Insights component resource.", "x-ms-parameter-location": "method" }, "KeyId": { "name": "keyId", "in": "path", "required": true, "type": "string", "description": "The API Key ID. This is unique within a Application Insights component.", "x-ms-parameter-location": "method" } } }