{ "swagger": "2.0", "info": { "title": "Azure Log Analytics", "description": "Azure Log Analytics API reference.", "version": "2025-02-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.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}": { "delete": { "tags": [ "SavedSearches" ], "x-ms-examples": { "SavedSearchesDelete": { "$ref": "./examples/WorkspacesDeleteSavedSearches.json" } }, "operationId": "SavedSearches_Delete", "description": "Deletes the specified saved search in a given workspace.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/types.json#/parameters/WorkspaceNameParameter" }, { "name": "savedSearchId", "in": "path", "required": true, "type": "string", "description": "The id of the saved search." }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK response definition." } } }, "put": { "tags": [ "SavedSearches" ], "x-ms-examples": { "SavedSearchCreateOrUpdate": { "$ref": "./examples/WorkspacesSavedSearchesCreateOrUpdate.json" } }, "operationId": "SavedSearches_CreateOrUpdate", "description": "Creates or updates a saved search for a given workspace.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/types.json#/parameters/WorkspaceNameParameter" }, { "name": "savedSearchId", "in": "path", "required": true, "type": "string", "description": "The id of the saved search." }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/SavedSearch" }, "description": "The parameters required to save a search." } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/SavedSearch" } } } }, "get": { "tags": [ "SavedSearches" ], "x-ms-examples": { "SavedSearchesGet": { "$ref": "./examples/WorkspacesSavedSearchesGet.json" } }, "operationId": "SavedSearches_Get", "description": "Gets the specified saved search for a given workspace.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/types.json#/parameters/WorkspaceNameParameter" }, { "name": "savedSearchId", "in": "path", "required": true, "type": "string", "description": "The id of the saved search." }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/SavedSearch" } } } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches": { "get": { "tags": [ "SavedSearches" ], "x-ms-examples": { "SavedSearchesList": { "$ref": "./examples/SavedSearchesListByWorkspace.json" } }, "operationId": "SavedSearches_ListByWorkspace", "description": "Gets the saved searches for a given Log Analytics Workspace", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/types.json#/parameters/WorkspaceNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "Returns the list of saved searches for the given Log Analytics Workspace.", "schema": { "$ref": "#/definitions/SavedSearchesListResult" } } } } } }, "definitions": { "Tag": { "properties": { "name": { "type": "string", "description": "The tag name." }, "value": { "type": "string", "description": "The tag value." } }, "required": [ "name", "value" ], "description": "A tag of a saved search." }, "SavedSearchProperties": { "properties": { "category": { "type": "string", "description": "The category of the saved search. This helps the user to find a saved search faster. " }, "displayName": { "type": "string", "description": "Saved search display name." }, "query": { "type": "string", "description": "The query expression for the saved search." }, "functionAlias": { "type": "string", "description": "The function alias if query serves as a function." }, "functionParameters": { "type": "string", "description": "The optional function parameters if query serves as a function. Value should be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more examples and proper syntax please refer to https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions." }, "version": { "type": "integer", "format": "int64", "description": "The version number of the query language. The current version is 2 and is the default." }, "tags": { "type": "array", "items": { "$ref": "#/definitions/Tag" }, "x-ms-identifiers": [ "name" ], "description": "The tags attached to the saved search." } }, "required": [ "category", "displayName", "query" ], "description": "Value object for saved search results." }, "SavedSearch": { "properties": { "etag": { "type": "string", "description": "The ETag of the saved search. To override an existing saved search, use \"*\" or specify the current Etag" }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/SavedSearchProperties", "description": "The properties of the saved search." } }, "required": [ "properties" ], "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource" } ], "description": "Value object for saved search results." }, "SavedSearchesListResult": { "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/SavedSearch" }, "description": "The array of result values." } }, "description": "The saved search list operation response." } }, "parameters": {} }