{ "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}/providers/Microsoft.OperationalInsights/workspaces": { "get": { "tags": [ "Workspaces" ], "x-ms-examples": { "WorkspacesSubscriptionList": { "$ref": "./examples/WorkspacesSubscriptionList.json" } }, "operationId": "Workspaces_List", "description": "Gets the workspaces in a subscription.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/WorkspaceListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces": { "get": { "tags": [ "Workspaces" ], "x-ms-examples": { "WorkspacesGet": { "$ref": "./examples/WorkspacesListByResourceGroup.json" } }, "operationId": "Workspaces_ListByResourceGroup", "description": "Gets workspaces in a resource group.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/WorkspaceListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}": { "put": { "tags": [ "Workspaces" ], "x-ms-examples": { "WorkspacesCreate": { "$ref": "./examples/WorkspacesCreate.json" } }, "operationId": "Workspaces_CreateOrUpdate", "description": "Create or update a workspace.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/types.json#/parameters/WorkspaceNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/Workspace" }, "description": "The parameters required to create or update a workspace." }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/Workspace" } }, "201": { "description": "Created response definition.", "schema": { "$ref": "#/definitions/Workspace" } }, "202": { "description": "Accepted" }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation": true }, "delete": { "tags": [ "Workspaces" ], "x-ms-examples": { "WorkspacesDelete": { "$ref": "./examples/WorkspacesDelete.json" } }, "operationId": "Workspaces_Delete", "description": "Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/types.json#/parameters/WorkspaceNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" }, { "name": "force", "in": "query", "required": false, "type": "boolean", "description": "Deletes the workspace without the recovery option. A workspace that was deleted with this flag cannot be recovered." } ], "responses": { "200": { "description": "OK response definition." }, "202": { "description": "Accepted" }, "204": { "description": "NoContent response definition." }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, "x-ms-long-running-operation": true }, "get": { "tags": [ "Workspaces" ], "x-ms-examples": { "WorkspaceGet": { "$ref": "./examples/WorkspacesGet.json" } }, "operationId": "Workspaces_Get", "description": "Gets a workspace instance.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/types.json#/parameters/WorkspaceNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/Workspace" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } } }, "patch": { "tags": [ "Workspaces" ], "x-ms-examples": { "WorkspacesPatch": { "$ref": "./examples/WorkspacesUpdate.json" } }, "operationId": "Workspaces_Update", "description": "Updates a workspace.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../common/v1/types.json#/parameters/WorkspaceNameParameter" }, { "name": "parameters", "in": "body", "required": true, "schema": { "$ref": "#/definitions/WorkspacePatch" }, "description": "The parameters required to patch a workspace." }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The existing workspace was successfully updated. Check provisioningStatus to see detailed status.", "schema": { "$ref": "#/definitions/Workspace" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/deletedWorkspaces": { "get": { "tags": [ "DeletedWorkspaces" ], "x-ms-examples": { "WorkspacesSubscriptionList": { "$ref": "./examples/WorkspacesSubscriptionList.json" } }, "operationId": "DeletedWorkspaces_List", "description": "Gets recently deleted workspaces in a subscription, available for recovery.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/WorkspaceListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": null } } }, "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/deletedWorkspaces": { "get": { "tags": [ "DeletedWorkspaces" ], "x-ms-examples": { "WorkspacesGet": { "$ref": "./examples/WorkspacesListByResourceGroup.json" } }, "operationId": "DeletedWorkspaces_ListByResourceGroup", "description": "Gets recently deleted workspaces in a resource group, available for recovery.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/WorkspaceListResult" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" } } }, "x-ms-pageable": { "nextLinkName": null } } } }, "definitions": { "WorkspaceSku": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the SKU.", "enum": [ "Free", "Standard", "Premium", "PerNode", "PerGB2018", "Standalone", "CapacityReservation", "LACluster" ], "x-ms-enum": { "name": "WorkspaceSkuNameEnum", "modelAsString": true } }, "capacityReservationLevel": { "type": "integer", "format": "int32", "description": "The capacity reservation level in GB for this workspace, when CapacityReservation sku is selected.", "enum": [ 100, 200, 300, 400, 500, 1000, 2000, 5000, 10000, 25000, 50000 ], "x-ms-enum": { "name": "CapacityReservationLevel" } }, "lastSkuUpdate": { "type": "string", "format": "date-time", "description": "The last time when the sku was updated.", "readOnly": true } }, "required": [ "name" ], "description": "The SKU (tier) of a workspace." }, "WorkspaceCapping": { "type": "object", "description": "The daily volume cap for ingestion.", "properties": { "dailyQuotaGb": { "type": "number", "format": "double", "description": "The workspace daily quota for ingestion." }, "quotaNextResetTime": { "type": "string", "description": "The time when the quota will be rest.", "readOnly": true }, "dataIngestionStatus": { "type": "string", "readOnly": true, "description": "The status of data ingestion for this workspace.", "enum": [ "RespectQuota", "ForceOn", "ForceOff", "OverQuota", "SubscriptionSuspended", "ApproachingQuota" ], "x-ms-enum": { "name": "DataIngestionStatus", "modelAsString": true, "values": [ { "value": "RespectQuota", "description": "Ingestion enabled following daily cap quota reset, or subscription enablement." }, { "value": "ForceOn", "description": "Ingestion started following service setting change." }, { "value": "ForceOff", "description": "Ingestion stopped following service setting change." }, { "value": "OverQuota", "description": "Reached daily cap quota, ingestion stopped." }, { "value": "SubscriptionSuspended", "description": "Ingestion stopped following suspended subscription." }, { "value": "ApproachingQuota", "description": "80% of daily cap quota reached." } ] } } } }, "WorkspaceProperties": { "type": "object", "properties": { "provisioningState": { "type": "string", "description": "The provisioning state of the workspace.", "readOnly": true, "enum": [ "Creating", "Succeeded", "Failed", "Canceled", "Deleting", "ProvisioningAccount", "Updating" ], "x-ms-enum": { "name": "WorkspaceEntityStatus", "modelAsString": true } }, "customerId": { "type": "string", "description": "This is a read-only property. Represents the ID associated with the workspace.", "readOnly": true }, "sku": { "$ref": "#/definitions/WorkspaceSku", "description": "The SKU of the workspace." }, "retentionInDays": { "type": "integer", "format": "int32", "x-nullable": true, "description": "The workspace data retention in days. Allowed values are per pricing plan. See pricing tiers documentation for details." }, "workspaceCapping": { "$ref": "#/definitions/WorkspaceCapping", "description": "The daily volume cap for ingestion." }, "createdDate": { "type": "string", "format": "date-time", "description": "Workspace creation date.", "readOnly": true }, "modifiedDate": { "type": "string", "format": "date-time", "description": "Workspace modification date.", "readOnly": true }, "publicNetworkAccessForIngestion": { "description": "The network access type for accessing Log Analytics ingestion.", "$ref": "#/definitions/PublicNetworkAccessType" }, "publicNetworkAccessForQuery": { "description": "The network access type for accessing Log Analytics query.", "$ref": "#/definitions/PublicNetworkAccessType" }, "forceCmkForQuery": { "type": "boolean", "description": "Indicates whether customer managed storage is mandatory for query management." }, "privateLinkScopedResources": { "readOnly": true, "type": "array", "items": { "$ref": "#/definitions/PrivateLinkScopedResource" }, "x-ms-identifiers": [ "resourceId" ], "description": "List of linked private link scope resources." }, "features": { "$ref": "#/definitions/WorkspaceFeatures", "description": "Workspace features." }, "defaultDataCollectionRuleResourceId": { "type": "string", "description": "The resource ID of the default Data Collection Rule to use for this workspace. Expected format is - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}." }, "replication": { "$ref": "#/definitions/WorkspaceReplicationProperties", "description": "workspace replication properties." }, "failover": { "$ref": "#/definitions/WorkspaceFailoverProperties", "description": "workspace failover properties." } }, "description": "Workspace properties." }, "WorkspaceFeatures": { "type": "object", "properties": { "enableDataExport": { "type": "boolean", "x-nullable": true, "description": "Flag that indicate if data should be exported." }, "immediatePurgeDataOn30Days": { "type": "boolean", "x-nullable": true, "description": "Flag that describes if we want to remove the data after 30 days." }, "enableLogAccessUsingOnlyResourcePermissions": { "type": "boolean", "x-nullable": true, "description": "Flag that indicate which permission to use - resource or workspace or both." }, "clusterResourceId": { "type": "string", "x-nullable": true, "description": "Dedicated LA cluster resourceId that is linked to the workspaces." }, "disableLocalAuth": { "type": "boolean", "x-nullable": true, "description": "Disable Non-AAD based Auth." }, "unifiedSentinelBillingOnly": { "type": "boolean", "x-nullable": true, "readOnly": true, "description": "An indication if the specify workspace is limited to sentinel's unified billing model only." } }, "additionalProperties": true, "description": "Workspace features." }, "Identity": { "properties": { "principalId": { "readOnly": true, "type": "string", "description": "The principal ID of resource identity." }, "tenantId": { "readOnly": true, "type": "string", "description": "The tenant ID of resource." }, "type": { "type": "string", "description": "Type of managed service identity.", "enum": [ "SystemAssigned", "UserAssigned", "None" ], "x-ms-enum": { "name": "IdentityType", "modelAsString": false } }, "userAssignedIdentities": { "description": "The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", "type": "object", "additionalProperties": { "$ref": "#/definitions/UserIdentityProperties" } } }, "required": [ "type" ], "type": "object", "description": "Identity for the resource." }, "UserIdentityProperties": { "type": "object", "description": "User assigned identity properties.", "properties": { "principalId": { "readOnly": true, "description": "The principal id of user assigned identity.", "type": "string" }, "clientId": { "readOnly": true, "description": "The client id of user assigned identity.", "type": "string" } } }, "PrivateLinkScopedResource": { "type": "object", "properties": { "resourceId": { "type": "string", "description": "The full resource Id of the private link scope resource." }, "scopeId": { "type": "string", "description": "The private link scope unique Identifier." } }, "description": "The private link scope resource reference." }, "WorkspaceReplicationProperties": { "type": "object", "description": "Workspace replication properties.", "properties": { "location": { "description": "The location of the replication.", "type": "string", "x-ms-mutability": [ "read", "create" ] }, "enabled": { "description": "Specifies whether the replication is enabled or not. When true, workspace configuration and data is replicated to the specified location. If replication is been enabled, location must be provided.", "type": "boolean" }, "provisioningState": { "type": "string", "readOnly": true, "description": "The provisioning state of the replication.", "enum": [ "Succeeded", "EnableRequested", "Enabling", "DisableRequested", "Disabling", "RollbackRequested", "RollingBack", "Failed", "Canceled" ], "x-ms-enum": { "name": "WorkspaceReplicationState", "modelAsString": true } }, "createdDate": { "type": "string", "description": "The last time when the replication was enabled.", "format": "date-time", "readOnly": true }, "lastModifiedDate": { "type": "string", "format": "date-time", "description": "The last time when the replication was updated.", "readOnly": true } } }, "WorkspaceReplicationPatProperties": { "type": "object", "description": "Workspace replication properties.", "properties": { "location": { "description": "The location of the replication.", "type": "string", "x-ms-mutability": [ "read", "create" ] }, "enabled": { "description": "Specifies whether the replication is enabled or not. When true, workspace configuration and data is replicated to the specified location.", "type": "boolean" }, "provisioningState": { "type": "string", "readOnly": true, "description": "The provisioning state of the replication.", "enum": [ "Succeeded", "EnableRequested", "Enabling", "DisableRequested", "Disabling", "RollbackRequested", "RollingBack", "Failed", "Canceled" ], "x-ms-enum": { "name": "WorkspaceReplicationState", "modelAsString": true } }, "createdDate": { "type": "string", "description": "The last time when the replication was enabled.", "format": "date-time", "readOnly": true }, "lastModifiedDate": { "type": "string", "format": "date-time", "description": "The last time when the replication was updated.", "readOnly": true } } }, "WorkspaceFailoverProperties": { "type": "object", "description": "The failover state of the replication.", "properties": { "state": { "type": "string", "readOnly": true, "description": "The failover state of the replication.", "enum": [ "Inactive", "Activating", "Active", "Deactivating", "Failed" ], "x-ms-enum": { "name": "WorkspaceFailoverState", "modelAsString": true } }, "lastModifiedDate": { "type": "string", "format": "date-time", "description": "The last time when the failover state was updated.", "readOnly": true } } }, "Workspace": { "type": "object", "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/WorkspaceProperties", "description": "Workspace properties." }, "identity": { "$ref": "#/definitions/Identity", "description": "The identity of the resource." }, "systemData": { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/systemData", "readOnly": true }, "etag": { "type": "string", "description": "The etag of the workspace." } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/TrackedResource" } ], "description": "The top level Workspace resource container." }, "WorkspacePatch": { "type": "object", "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/WorkspaceProperties", "description": "Workspace properties." }, "identity": { "$ref": "#/definitions/Identity", "description": "The identity of the resource." }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "x-ms-mutability": [ "read", "create", "update" ], "description": "Resource tags. Optional." } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/AzureEntityResource" } ], "description": "The top level Workspace resource container." }, "WorkspaceListResult": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/Workspace" }, "description": "A list of workspaces." } }, "description": "The list workspaces operation response." }, "PublicNetworkAccessType": { "type": "string", "description": "The network access type for operating on the Log Analytics Workspace. By default it is Enabled", "default": "Enabled", "enum": [ "Enabled", "Disabled" ], "x-ms-enum": { "name": "PublicNetworkAccessType", "modelAsString": true, "values": [ { "value": "Enabled", "description": "Enables connectivity to Log Analytics through public DNS." }, { "value": "Disabled", "description": "Disables public connectivity to Log Analytics through public DNS." } ] } } }, "parameters": {} }