{ "swagger": "2.0", "info": { "title": "Azure Log Analytics", "description": "Azure Log Analytics API reference", "version": "2020-03-01-preview" }, "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/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/WorkspaceListResult" } } }, "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/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" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/WorkspaceListResult" } } }, "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/v1/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/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/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" } }, "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/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" }, { "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." } }, "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/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": "OK response definition.", "schema": { "$ref": "#/definitions/Workspace" } } } }, "patch": { "tags": [ "Workspaces" ], "x-ms-examples": { "WorkspacesPatch": { "$ref": "./examples/WorkspacesUpdate.json" } }, "operationId": "Workspaces_Update", "description": "Updates a workspace.", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/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/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "The existing workspace was successfully updated. Check provisioningStatus to see detailed status.", "schema": { "$ref": "#/definitions/Workspace" } } } } }, "/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/v1/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/WorkspaceListResult" } } }, "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/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" } ], "responses": { "200": { "description": "OK response definition.", "schema": { "$ref": "#/definitions/WorkspaceListResult" } } }, "x-ms-pageable": { "nextLinkName": null } } } }, "definitions": { "WorkspaceSku": { "properties": { "name": { "type": "string", "description": "The name of the SKU.", "enum": [ "Free", "Standard", "Premium", "PerNode", "PerGB2018", "Standalone", "CapacityReservation" ], "x-ms-enum": { "name": "WorkspaceSkuNameEnum", "modelAsString": true } }, "capacityReservationLevel": { "type": "integer", "format": "int32", "description": "The capacity reservation level for this workspace, when CapacityReservation sku is selected." }, "maxCapacityReservationLevel": { "type": "integer", "format": "int32", "description": "The maximum capacity reservation level available for this workspace, when CapacityReservation sku is selected.", "readOnly": true }, "lastSkuUpdate": { "type": "string", "description": "The last time when the sku was updated.", "readOnly": true } }, "required": [ "name" ], "description": "The SKU (tier) of a workspace." }, "WorkspaceCapping": { "description": "The daily volume cap for ingestion.", "properties": { "dailyQuotaGb": { "type": "number", "format": "double", "description": "The workspace daily quota for ingestion. -1 means unlimited." }, "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 } } } }, "WorkspaceProperties": { "properties": { "provisioningState": { "type": "string", "description": "The provisioning state of the workspace.", "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", "minimum": -1, "maximum": 730, "description": "The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 days is the maximum allowed for all other Skus. " }, "workspaceCapping": { "$ref": "#/definitions/WorkspaceCapping", "description": "The daily volume cap for ingestion." }, "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" }, "privateLinkScopedResources": { "readOnly": true, "type": "array", "items": { "$ref": "#/definitions/PrivateLinkScopedResource" }, "description": "List of linked private link scope resources." } }, "description": "Workspace properties." }, "PrivateLinkScopedResource": { "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." }, "Workspace": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/WorkspaceProperties", "description": "Workspace properties." }, "etag": { "type": "string", "description": "The ETag of the workspace." } }, "allOf": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" } ], "description": "The top level Workspace resource container." }, "WorkspacePatch": { "properties": { "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/WorkspaceProperties", "description": "Workspace properties." }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "x-ms-mutability": [ "read", "create", "update" ], "description": "Resource tags. Optional." } }, "allOf": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/AzureEntityResource" } ], "description": "The top level Workspace resource container." }, "WorkspaceListResult": { "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": {} }