UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 21.2 kB
{"openapi":"3.0.0","info":{"description":"Azure Log Analytics API reference for management of saved Queries within Query Packs.","title":"Azure Log Analytics Query Packs","version":"2019-09-01-preview","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/applicationinsights/resource-manager/Microsoft.Insights/preview/2019-09-01-preview/QueryPackQueries_API.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"applicationinsights-QueryPackQueries_API","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries":{"get":{"description":"Gets a list of Queries defined within a Log Analytics QueryPack.","operationId":"Queries_List","parameters":[{"description":"The ID of the target subscription.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string","minLength":1},"examples":{"QueryList":{"value":"86dc51d3-92ed-4d7e-947a-775ea79b4918"}}},{"description":"The name of the resource group. The name is case insensitive.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":90,"pattern":"^[-\\w\\._\\(\\)]+$"},"examples":{"QueryList":{"value":"my-resource-group"}}},{"$ref":"#/components/parameters/QueryPackNameParameter"},{"description":"The API version to use for this operation.","in":"query","name":"api-version","required":true,"schema":{"type":"string","minLength":1},"examples":{"QueryList":{"value":"2019-09-01-preview"}}},{"$ref":"#/components/parameters/MaxItemCountParameter"},{"$ref":"#/components/parameters/IncludeBodyParameter"},{"$ref":"#/components/parameters/ContinuationTokenParameter"}],"responses":{"200":{"description":"A list containing 0 or more queries contained within the Log Analytics QueryPack.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogAnalyticsQueryPackQueryListResult"},"examples":{"QueryList":{"$ref":"#/components/examples/QueryList"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/search":{"post":{"description":"Search a list of Queries defined within a Log Analytics QueryPack according to given search properties.","operationId":"Queries_Search","parameters":[{"description":"The ID of the target subscription.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string","minLength":1},"examples":{"QuerySearch":{"value":"86dc51d3-92ed-4d7e-947a-775ea79b4918"}}},{"description":"The name of the resource group. The name is case insensitive.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":90,"pattern":"^[-\\w\\._\\(\\)]+$"},"examples":{"QuerySearch":{"value":"my-resource-group"}}},{"$ref":"#/components/parameters/QueryPackNameParameter"},{"description":"The API version to use for this operation.","in":"query","name":"api-version","required":true,"schema":{"type":"string","minLength":1},"examples":{"QuerySearch":{"value":"2019-09-01-preview"}}},{"$ref":"#/components/parameters/MaxItemCountParameter"},{"$ref":"#/components/parameters/IncludeBodyParameter"},{"$ref":"#/components/parameters/ContinuationTokenParameter"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogAnalyticsQueryPackQuerySearchProperties"}}},"description":"Properties by which to search queries in the given Log Analytics QueryPack.","required":true},"responses":{"200":{"description":"A list containing 0 or more queries contained within the Log Analytics QueryPack.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogAnalyticsQueryPackQueryListResult"},"examples":{"QuerySearch":{"$ref":"#/components/examples/QuerySearch"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/{queryId}":{"delete":{"description":"Deletes a specific Query defined within an Log Analytics QueryPack.","operationId":"Queries_Delete","parameters":[{"description":"The ID of the target subscription.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string","minLength":1},"examples":{"QueryDelete":{"value":"86dc51d3-92ed-4d7e-947a-775ea79b4918"}}},{"description":"The name of the resource group. The name is case insensitive.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":90,"pattern":"^[-\\w\\._\\(\\)]+$"},"examples":{"QueryDelete":{"value":"my-resource-group"}}},{"$ref":"#/components/parameters/QueryPackNameParameter"},{"$ref":"#/components/parameters/QueryIdParameter"},{"description":"The API version to use for this operation.","in":"query","name":"api-version","required":true,"schema":{"type":"string","minLength":1},"examples":{"QueryDelete":{"value":"2019-09-01-preview"}}}],"responses":{"200":{"description":"The query has been successfully removed from the Log Analytics QueryPack"},"204":{"description":"The specified query or associated QueryPack does not exist."},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"description":"Gets a specific Log Analytics Query defined within a Log Analytics QueryPack.","operationId":"Queries_Get","parameters":[{"description":"The ID of the target subscription.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string","minLength":1},"examples":{"QueryGet":{"value":"86dc51d3-92ed-4d7e-947a-775ea79b4918"}}},{"description":"The name of the resource group. The name is case insensitive.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":90,"pattern":"^[-\\w\\._\\(\\)]+$"},"examples":{"QueryGet":{"value":"my-resource-group"}}},{"$ref":"#/components/parameters/QueryPackNameParameter"},{"$ref":"#/components/parameters/QueryIdParameter"},{"description":"The API version to use for this operation.","in":"query","name":"api-version","required":true,"schema":{"type":"string","minLength":1},"examples":{"QueryGet":{"value":"2019-09-01-preview"}}}],"responses":{"200":{"description":"A single query contained within the Log Analytics QueryPack.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogAnalyticsQueryPackQuery"},"examples":{"QueryGet":{"$ref":"#/components/examples/QueryGet"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"description":"Adds or Updates a specific Query within a Log Analytics QueryPack.","operationId":"Queries_Put","parameters":[{"description":"The ID of the target subscription.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string","minLength":1},"examples":{"QueryPut":{"value":"86dc51d3-92ed-4d7e-947a-775ea79b4918"}}},{"description":"The name of the resource group. The name is case insensitive.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string","minLength":1,"maxLength":90,"pattern":"^[-\\w\\._\\(\\)]+$"},"examples":{"QueryPut":{"value":"my-resource-group"}}},{"$ref":"#/components/parameters/QueryPackNameParameter"},{"$ref":"#/components/parameters/QueryIdParameter"},{"description":"The API version to use for this operation.","in":"query","name":"api-version","required":true,"schema":{"type":"string","minLength":1},"examples":{"QueryPut":{"value":"2019-09-01-preview"}}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogAnalyticsQueryPackQuery"}}},"description":"Properties that need to be specified to create a new query and add it to a Log Analytics QueryPack.","required":true},"responses":{"200":{"description":"The new or updated query contained within the Log Analytics QueryPack.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogAnalyticsQueryPackQuery"},"examples":{"QueryPut":{"$ref":"#/components/examples/QueryPut"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"QueryList":{"value":{"value":[{"id":"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.insights/queryPacks/my-querypack/queries/4337bb16-d6fe-4ff7-97cf-59df25941476","name":"4337bb16-d6fe-4ff7-97cf-59df25941476","properties":{"author":"1809f206-263a-46f7-942d-4572c156b7e7","body":"heartbeat | take 10","description":"Thie query takes 10 entries of heartbeat","displayName":"Heartbeat_1","queryId":"4337bb16-d6fe-4ff7-97cf-59df25941476","timeCreated":"2019-08-15T10:29:56.1030254Z","timeModified":"2019-08-15T10:29:56.1030254Z"},"type":"microsoft.insights/queryPacks/queries"},{"id":"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.insights/queryPacks/my-querypack/queries/bf015bf7-be70-49c2-8d52-4cce85c42ef1","name":"bf015bf7-be70-49c2-8d52-4cce85c42ef1","properties":{"author":"1809f206-263a-46f7-942d-4572c156b7e7","body":"heartbeat | take 10","description":"Thie query takes 10 entries of heartbeat","displayName":"Heartbeat_2","queryId":"bf015bf7-be70-49c2-8d52-4cce85c42ef1","timeCreated":"2019-08-15T10:30:26.7943629Z","timeModified":"2019-08-15T10:30:26.7943629Z"},"type":"microsoft.insights/queryPacks/queries"},{"id":"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.insights/queryPacks/my-querypack/queries/8d91c6ca-9c56-49c6-b3ae-112a68871acd","name":"8d91c6ca-9c56-49c6-b3ae-112a68871acd","properties":{"author":"1809f206-263a-46f7-942d-4572c156b7e7","body":"heartbeat | take 10","description":"Thie query takes 10 entries of heartbeat","displayName":"Heartbeat_3","queryId":"8d91c6ca-9c56-49c6-b3ae-112a68871acd","timeCreated":"2019-08-15T10:30:29.4505584Z","timeModified":"2019-08-15T10:30:29.4505584Z"},"type":"microsoft.insights/queryPacks/queries"},{"id":"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.insights/queryPacks/my-querypack/queries/a5a9010e-e4b7-45ad-8b14-09d7e6082819","name":"a5a9010e-e4b7-45ad-8b14-09d7e6082819","properties":{"author":"1809f206-263a-46f7-942d-4572c156b7e7","body":"heartbeat | take 10","description":"Thie query takes 10 entries of heartbeat","displayName":"Heartbeat_4","queryId":"a5a9010e-e4b7-45ad-8b14-09d7e6082819","timeCreated":"2019-08-15T10:30:32.5742324Z","timeModified":"2019-08-15T10:30:32.5742324Z"},"type":"microsoft.insights/queryPacks/queries"}]}},"QuerySearch":{"value":{"value":[{"id":"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.insights/queryPacks/my-querypack/queries/4337bb16-d6fe-4ff7-97cf-59df25941476","name":"4337bb16-d6fe-4ff7-97cf-59df25941476","properties":{"author":"1809f206-263a-46f7-942d-4572c156b7e7","body":"Heartbeat | take 1","categories":["other"],"description":"Thie query takes 10 entries of heartbeat 0","displayName":"Heartbeat_1","labels":["my-label"],"queryId":"4337bb16-d6fe-4ff7-97cf-59df25941476","timeCreated":"2019-08-15T10:29:56.1030254Z","timeModified":"2019-08-15T10:29:56.1030254Z"},"type":"microsoft.insights/queryPacks/queries"},{"id":"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.insights/queryPacks/my-querypack/queries/bf015bf7-be70-49c2-8d52-4cce85c42ef1","name":"bf015bf7-be70-49c2-8d52-4cce85c42ef1","properties":{"author":"1809f206-263a-46f7-942d-4572c156b7e7","body":"Heartbeat | take 1","categories":["analytics"],"description":"Thie query takes 10 entries of heartbeat 1","displayName":"Heartbeat_2","labels":["my-label"],"queryId":"bf015bf7-be70-49c2-8d52-4cce85c42ef1","timeCreated":"2019-08-15T10:30:26.7943629Z","timeModified":"2019-08-15T10:30:26.7943629Z"},"type":"microsoft.insights/queryPacks/queries"},{"id":"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.insights/queryPacks/my-querypack/queries/8d91c6ca-9c56-49c6-b3ae-112a68871acd","name":"8d91c6ca-9c56-49c6-b3ae-112a68871acd","properties":{"author":"1809f206-263a-46f7-942d-4572c156b7e7","body":"Heartbeat | take 1","categories":["other","analytics"],"description":"Thie query takes 10 entries of heartbeat 2","displayName":"Heartbeat_3","labels":["my-label"],"queryId":"8d91c6ca-9c56-49c6-b3ae-112a68871acd","timeCreated":"2019-08-15T10:30:29.4505584Z","timeModified":"2019-08-15T10:30:29.4505584Z"},"type":"microsoft.insights/queryPacks/queries"}]}},"QueryGet":{"value":{"id":"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.insights/queryPacks/my-querypack/queries/a449f8af-8e64-4b3a-9b16-5a7165ff98c4","name":"a449f8af-8e64-4b3a-9b16-5a7165ff98c4","properties":{"body":"let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n","description":"Thie query fetcges the recent exceptions from the last 24 hours","displayName":"Exceptions - New in the last 24 hours","queryId":"a449f8af-8e64-4b3a-9b16-5a7165ff98c4","timeCreated":"2018-02-12T11:44:39.2980634Z","timeModified":"2018-02-14T13:13:19.3381394Z"},"type":"microsoft.insights/queryPacks/queries"}},"QueryPut":{"value":{"id":"/subscriptions/86dc51d3-92ed-4d7e-947a-775ea79b4918/resourceGroups/my-resource-group/providers/microsoft.insights/queryPacks/my-querypack/queries/a449f8af-8e64-4b3a-9b16-5a7165ff98c4","name":"a449f8af-8e64-4b3a-9b16-5a7165ff98c4","properties":{"author":"1809f206-263a-46f7-942d-4572c156b7e7","body":"let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n","categories":["analytics"],"description":"my description","displayName":"Exceptions - New in the last 24 hours","labels":["my-label","my-other-label"],"linkedResourceId":"/subscriptions/a51967b5-271e-4f12-810e-e7fa20c8828d/resourceGroups/FoodHere/providers/Microsoft.KeyVault/vaults/FoodHere","queryId":"a449f8af-8e64-4b3a-9b16-5a7165ff98c4","timeCreated":"2019-08-15T10:30:32.5742324Z","timeModified":"2019-08-15T10:30:32.5742324Z"},"type":"microsoft.insights/queryPacks/queries"}}},"parameters":{"ContinuationTokenParameter":{"description":"Base64 encoded token used to fetch the next page of items. Default is null.","in":"query","name":"$skipToken","required":false,"x-ms-parameter-location":"method","schema":{"type":"string"}},"IncludeBodyParameter":{"description":"Flag indicating whether or not to return the body of each applicable query. If false, only return the query information.","in":"query","name":"includeBody","required":false,"x-ms-parameter-location":"method","schema":{"type":"boolean"},"examples":{"QueryList":{"value":true},"QuerySearch":{"value":true}}},"MaxItemCountParameter":{"description":"Maximum items returned in page.","in":"query","name":"$top","required":false,"x-ms-parameter-location":"method","schema":{"type":"integer"},"examples":{"QuerySearch":{"value":3}}},"QueryIdParameter":{"description":"The id of a specific query defined in the Log Analytics QueryPack","in":"path","name":"queryId","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"QueryDelete":{"value":"a449f8af-8e64-4b3a-9b16-5a7165ff98c4"},"QueryGet":{"value":"a449f8af-8e64-4b3a-9b16-5a7165ff98c4"},"QueryPut":{"value":"a449f8af-8e64-4b3a-9b16-5a7165ff98c4"}}},"QueryPackNameParameter":{"description":"The name of the Log Analytics QueryPack resource.","in":"path","name":"queryPackName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"QueryList":{"value":"my-querypack"},"QuerySearch":{"value":"my-querypack"},"QueryDelete":{"value":"my-querypack"},"QueryGet":{"value":"my-querypack"},"QueryPut":{"value":"my-querypack"}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow.","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"AzureResourceProperties":{"description":"An Azure resource QueryPack-Query object","properties":{"id":{"description":"Azure resource Id","readOnly":true,"type":"string"},"name":{"description":"Azure resource name","readOnly":true,"type":"string"},"type":{"description":"Azure resource type","readOnly":true,"type":"string"}}},"ErrorResponse":{"description":"Describe the format of an Error response.","properties":{"code":{"description":"Error code","type":"string"},"message":{"description":"Error message indicating why the operation failed.","type":"string"}},"type":"object"},"LogAnalyticsQueryPackQuery":{"allOf":[{"$ref":"#/components/schemas/AzureResourceProperties"}],"description":"A Log Analytics QueryPack-Query definition.","properties":{"properties":{"$ref":"#/components/schemas/LogAnalyticsQueryPackQueryProperties"}}},"LogAnalyticsQueryPackQueryListResult":{"description":"Describes the list of Log Analytics QueryPack-Query resources.","properties":{"nextLink":{"description":"The URI to get the next set of Log Analytics QueryPack definitions if too many QueryPack-Queries where returned in the result set.","type":"string"},"value":{"description":"List of Log Analytics QueryPack Query definitions.","items":{"$ref":"#/components/schemas/LogAnalyticsQueryPackQuery"},"type":"array"}},"required":["value"]},"LogAnalyticsQueryPackQueryProperties":{"description":"Properties that define an Log Analytics QueryPack-Query resource.","properties":{"author":{"description":"Object Id of user creating the query.","readOnly":true,"type":"string"},"body":{"description":"Body of the query.","readOnly":false,"type":"string"},"categories":{"description":"Categories associated with the query.","items":{"type":"string"},"type":"array"},"description":{"description":"Description of the query.","readOnly":false,"type":"string"},"displayName":{"description":"Unique display name for your query within the Query Pack.","readOnly":false,"type":"string"},"labels":{"description":"Labels associated with the query.","items":{"type":"string"},"type":"array"},"linkedResourceId":{"description":"Resource id associated with the query.","readOnly":false,"type":"string"},"queryId":{"description":"The unique ID of your application. This field cannot be changed.","readOnly":true,"type":"string"},"resourceTypes":{"description":"Resource Types associated with the query.","items":{"type":"string"},"type":"array"},"timeCreated":{"description":"Creation Date for the Log Analytics Query, in ISO 8601 format.","format":"date-time","readOnly":true,"type":"string"},"timeModified":{"description":"Last modified date of the Log Analytics Query, in ISO 8601 format.","format":"date-time","readOnly":true,"type":"string"}},"required":["body","displayName"]},"LogAnalyticsQueryPackQuerySearchProperties":{"description":"Properties that define an Log Analytics QueryPack-Query search properties.","properties":{"categories":{"description":"Categories associated with the query.","items":{"type":"string"},"type":"array"},"labels":{"description":"Labels associated with the query.","items":{"type":"string"},"type":"array"},"resourceTypes":{"description":"Resource Types associated with the query.","items":{"type":"string"},"type":"array"}}}}}}