{ "swagger": "2.0", "info": { "version": "2021-11-01-preview", "title": "ArtifactsClient", "x-ms-code-generation-settings": { "useDateTimeOffset": true } }, "x-ms-parameterized-host": { "hostTemplate": "{endpoint}", "useSchemePrefix": false, "parameters": [ { "$ref": "#/parameters/Endpoint" } ] }, "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/kqlScripts": { "get": { "tags": [ "kqlScripts" ], "operationId": "KqlScripts_GetAll", "description": "Get all KQL scripts", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK.", "schema": { "$ref": "#/definitions/KqlScripts_ResourceCollectionResponse" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../resource-manager/Microsoft.Synapse/preview/2019-06-01-preview/workspace.json#/definitions/ErrorContract" } } }, "x-ms-examples": { "KqlScripts_GetAll": { "$ref": "./examples/KqlScripts_GetAll.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/kqlScripts/{kqlScriptName}": { "put": { "tags": [ "kqlScripts" ], "operationId": "KqlScript_CreateOrUpdate", "description": "Creates or updates a KQL Script", "parameters": [ { "$ref": "#/parameters/KqlScriptName" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "name": "kqlScript", "description": "KQL script", "in": "body", "required": true, "schema": { "$ref": "#/definitions/KqlScriptResource" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/KqlScriptResource" } }, "202": { "description": "Accepted" }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../resource-manager/Microsoft.Synapse/preview/2019-06-01-preview/workspace.json#/definitions/ErrorContract" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { "KqlScript_CreateOrUpdate": { "$ref": "./examples/KqlScript_CreateOrUpdate.json" } } }, "get": { "tags": [ "kqlScripts" ], "operationId": "KqlScript_GetByName", "description": "Get KQL script by name", "parameters": [ { "$ref": "#/parameters/KqlScriptName" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/KqlScriptResource" } }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../common/v1/types.json#/definitions/ErrorContract" } } }, "x-ms-examples": { "KqlScript_GetByName": { "$ref": "./examples/KqlScript_GetByName.json" } } }, "delete": { "tags": [ "kqlScripts" ], "operationId": "KqlScript_DeleteByName", "description": "Delete KQL script by name", "parameters": [ { "$ref": "#/parameters/KqlScriptName" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK" }, "202": { "description": "Accepted" }, "204": { "description": "No Content" }, "default": { "description": "Error response describing why the operation failed.", "schema": { "$ref": "../../../../common/v1/types.json#/definitions/ErrorContract" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { "KqlScript_DeleteByName": { "$ref": "./examples/KqlScript_DeleteByName.json" } } } }, "/kqlScripts/{kqlScriptName}/rename": { "post": { "tags": [ "kqlScripts" ], "operationId": "KqlScript_Rename", "description": "Rename KQL script", "parameters": [ { "$ref": "#/parameters/KqlScriptName" }, { "$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter" }, { "in": "body", "name": "renameRequest", "description": "Rename request", "required": true, "schema": { "$ref": "#/definitions/ArtifactRenameRequest" } } ], "responses": { "200": { "description": "OK" }, "202": { "description": "Accepted" }, "default": { "description": "Error response describing why the operation failed", "schema": { "$ref": "../../../../common/v1/types.json#/definitions/ErrorContract" } } }, "x-ms-long-running-operation": true, "x-ms-examples": { "KqlScript_Rename": { "$ref": "./examples/KqlScript_Rename.json" } } } } }, "definitions": { "KqlScripts_ResourceCollectionResponse": { "type": "object", "properties": { "value": { "type": "array", "items": { "$ref": "#/definitions/KqlScriptResource" } }, "nextLink": { "type": "string" } } }, "KqlScriptResource": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "properties": { "$ref": "#/definitions/KqlScript", "description": "Properties of sql script." } } }, "KqlScript": { "properties": { "content": { "properties": { "query": { "type": "string" }, "metadata": { "type": "object", "properties": { "language": { "type": "string" } } }, "currentConnection": { "properties": { "name": { "type": "string" }, "poolName": { "type": "string" }, "databaseName": { "type": "string" }, "type": { "type": "string" } } } } } } }, "ArtifactRenameRequest": { "description": "Request body structure for rename artifact.", "type": "object", "properties": { "newName": { "description": "New name of the artifact.", "type": "string", "pattern": "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$", "minLength": 1, "maxLength": 260 } } } }, "parameters": { "workspaceName": { "name": "workspaceName", "description": "The workspace name.", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ApiVersionParameter": { "name": "api-version", "in": "query", "required": true, "type": "string", "description": "The Synapse client API Version." }, "Endpoint": { "name": "endpoint", "description": "The workspace development endpoint, for example `https://myworkspace.dev.azuresynapse.net`.", "required": true, "type": "string", "in": "path", "x-ms-skip-url-encoding": true, "x-ms-parameter-location": "client", "format": "uri" }, "KqlScriptName": { "name": "kqlScriptName", "in": "path", "required": true, "type": "string", "description": "KQL script name", "x-ms-parameter-location": "method" } } }