{ "swagger": "2.0", "info": { "version": "2020-12-01", "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": { "/sqlScripts": { "get": { "tags": [ "sqlScripts" ], "operationId": "SqlScript_GetSqlScriptsByWorkspace", "x-ms-examples": { "SqlScripts_ListByWorkspace": { "$ref": "./examples/SqlScripts_ListByWorkspace.json" } }, "description": "Lists sql scripts.", "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK.", "schema": { "$ref": "#/definitions/SqlScriptsListResponse" } }, "default": { "description": "An error response received from the Azure Synapse service.", "schema": { "$ref": "../../../../common/v1/types.json#/definitions/CloudError" } } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/sqlScripts/{sqlScriptName}": { "put": { "tags": [ "sqlScripts" ], "operationId": "SqlScript_CreateOrUpdateSqlScript", "x-ms-examples": { "SqlScripts_Create": { "$ref": "./examples/SqlScripts_Create.json" }, "SqlScripts_Update": { "$ref": "./examples/SqlScripts_Update.json" } }, "description": "Creates or updates a Sql Script.", "x-ms-long-running-operation": true, "parameters": [ { "$ref": "#/parameters/sqlScriptName" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "If-Match", "in": "header", "required": false, "type": "string", "description": "ETag of the SQL script entity. Should only be specified for update, for which it should match existing entity or can be * for unconditional update." }, { "name": "sqlScript", "description": "Sql Script resource definition.", "in": "body", "required": true, "schema": { "$ref": "#/definitions/SqlScriptResource" } } ], "responses": { "200": { "description": "OK.", "schema": { "$ref": "#/definitions/SqlScriptResource" } }, "202": { "description": "Accepted." }, "default": { "description": "An error response received from the Azure Synapse service.", "schema": { "$ref": "../../../../common/v1/types.json#/definitions/CloudError" } } } }, "get": { "tags": [ "sqlScripts" ], "operationId": "SqlScript_GetSqlScript", "x-ms-examples": { "SqlScripts_Get": { "$ref": "./examples/SqlScripts_Get.json" } }, "description": "Gets a sql script.", "parameters": [ { "$ref": "#/parameters/sqlScriptName" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "If-None-Match", "in": "header", "required": false, "type": "string", "description": "ETag of the sql compute entity. Should only be specified for get. If the ETag matches the existing entity tag, or if * was provided, then no content will be returned." } ], "responses": { "200": { "description": "OK.", "schema": { "$ref": "#/definitions/SqlScriptResource" } }, "304": { "description": "Not modified." }, "default": { "description": "An error response received from the Azure Synapse service.", "schema": { "$ref": "../../../../common/v1/types.json#/definitions/CloudError" } } } }, "delete": { "tags": [ "sqlScripts" ], "operationId": "SqlScript_DeleteSqlScript", "x-ms-examples": { "SqlScripts_Delete": { "$ref": "./examples/SqlScripts_Delete.json" } }, "description": "Deletes a Sql Script.", "x-ms-long-running-operation": true, "parameters": [ { "$ref": "#/parameters/sqlScriptName" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "OK." }, "202": { "description": "Accepted." }, "204": { "description": "No Content." }, "default": { "description": "An error response received from the Azure Synapse service.", "schema": { "$ref": "../../../../common/v1/types.json#/definitions/CloudError" } } } } }, "/sqlScripts/{sqlScriptName}/rename": { "post": { "tags": [ "sqlScripts" ], "operationId": "SqlScript_RenameSqlScript", "x-ms-examples": { "SqlScripts_Rename": { "$ref": "./examples/SqlScripts_Rename.json" } }, "description": "Renames a sqlScript.", "x-ms-long-running-operation": true, "parameters": [ { "$ref": "#/parameters/sqlScriptName" }, { "$ref": "#/parameters/ApiVersionParameter" }, { "name": "request", "description": "proposed new name.", "in": "body", "required": true, "schema": { "$ref": "artifacts.json#/definitions/ArtifactRenameRequest" } } ], "responses": { "200": { "description": "OK." }, "202": { "description": "Accepted." }, "default": { "description": "An error response received from the Azure Synapse service.", "schema": { "$ref": "../../../../common/v1/types.json#/definitions/CloudError" } } } } } }, "definitions": { "SqlScriptsListResponse": { "description": "A list of sql scripts resources.", "type": "object", "required": [ "value" ], "properties": { "value": { "type": "array", "description": "List of sql scripts.", "items": { "$ref": "#/definitions/SqlScriptResource" } }, "nextLink": { "description": "The link to the next page of results, if any remaining results exist.", "type": "string" } } }, "SqlScriptResource": { "description": "Sql Script resource type.", "type": "object", "properties": { "id": { "readOnly": true, "type": "string", "description": "Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" }, "name": { "type": "string", "description": "The name of the resource" }, "type": { "readOnly": true, "type": "string", "description": "The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts." }, "etag": { "type": "string", "readOnly": true, "description": "Resource Etag." }, "properties": { "$ref": "./entityTypes/SqlScript.json#/definitions/SqlScript", "description": "Properties of sql script." } }, "required": [ "name", "properties" ] } }, "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" }, "sqlScriptName": { "name": "sqlScriptName", "description": "The sql script name.", "in": "path", "required": true, "type": "string", "x-ms-parameter-location": "method" } } }