Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rest API changes for SymsSync service #15695

Merged
merged 12 commits into from
Sep 25, 2021
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,7 @@ updatehostname
updatepolicy
updateprivateendpointconnection
updateproperties
updation
upgradeos
uploadbatchservicelogs
uploadcertificate
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
"api-version": "2021-07-01-preview",
"id": "testdatabase"
},
"responses": {
"204": {},
"default": {
"body": {
"error": {
"code": "Error code",
"message": "Error message"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
"api-version": "2021-07-01-preview",
"id": "testdatabase"
},
"responses": {
"200": {
"body": {
"status": "Completed"
}
},
"default": {
"body": {
"error": {
"code": "Error code",
"message": "Error message"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
"api-version": "2021-07-01-preview",
"id": "testdatabase",
"registerBody": {
"inputFolder": "https://testsymsstorage.dfs.core.windows.net/testsymscontainer/CDM/"
}
},
"responses": {
"201": {
"body": {
"status": "Running"
}
},
"default": {
"body": {
"error": {
"code": "Error code",
"message": "Error message"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
"api-version": "2021-07-01-preview",
"id": "testdatabase",
"updateBody": {
"inputFolder": "https://testsymsstorage.dfs.core.windows.net/testsymscontainer/CDM/"
}
},
"responses": {
"201": {
"body": {
"status": "Running"
}
},
"default": {
"body": {
"error": {
"code": "Error code",
"message": "Error message"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,294 @@
{
"swagger": "2.0",
"info": {
"version": "2021-07-01-preview",
"title": "ArtifactsClient"
epkalyanr marked this conversation as resolved.
Show resolved Hide resolved
},
"x-ms-parameterized-host": {
"hostTemplate": "{endpoint}",
"useSchemePrefix": false,
"parameters": [
{
"$ref": "#/parameters/Endpoint"
}
]
},
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/metastore/create-database-operations/{id}": {
"put": {
"tags": [
"metastore"
],
"operationId": "Metastore_Register",
"description": "Register files in Syms",
"x-ms-examples": {
"Register files in Syms": {
"$ref": "./examples/Metastore_Register.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "id",
epkalyanr marked this conversation as resolved.
Show resolved Hide resolved
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database to be created. The name can contain only alphanumeric characters and should not exceed 24 characters"
},
{
"in": "body",
"name": "registerBody",
"required": true,
"description": "The body for the register request",
"schema": {
"$ref": "#/definitions/metastoreRegisterObject"
}
}
],
"responses": {
"201": {
"description": "The Job created for the resource creation/updation request",
"schema": {
"$ref": "#/definitions/metastoreRegistrationResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../common/v1/types.json#/definitions/ErrorContract"
}
}
}
},
"get": {
"tags": [
"metastore"
],
"operationId": "Metastore_GetDatabaseOperations",
"description": "Gets status of the database",
"x-ms-examples": {
"Register files in Syms": {
"$ref": "./examples/Metastore_GetResourceStatus.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"in": "path",
"name": "id",
"required": true,
"type": "string"
epkalyanr marked this conversation as resolved.
Show resolved Hide resolved
}
],
"responses": {
"200": {
"description": "Request Success Response.",
"schema": {
"$ref": "#/definitions/metastoreRequestSuccessResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../common/v1/types.json#/definitions/ErrorContract"
}
}
}
}
},
"/metastore/update-database-operations/{id}": {
"put": {
epkalyanr marked this conversation as resolved.
Show resolved Hide resolved
"tags": [
"metastore"
],
"operationId": "Metastore_Update",
"description": "Update files in Syms",
"x-ms-examples": {
"Register files in Syms": {
"$ref": "./examples/Metastore_Update.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"name": "id",
epkalyanr marked this conversation as resolved.
Show resolved Hide resolved
"in": "path",
"required": true,
"type": "string",
"description": "The name of the database to be updated"
},
{
"in": "body",
"name": "updateBody",
"required": true,
"description": "The body for the update request",
"schema": {
"$ref": "#/definitions/metastoreUpdateObject"
}
}
],
"responses": {
"201": {
"description": "The Job created for the resource creation/updation request",
"schema": {
"$ref": "#/definitions/metastoreUpdationResponse"
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../common/v1/types.json#/definitions/ErrorContract"
}
}
}
}
},
"/metastore/databases/{id}": {
"delete": {
"tags": [
"metastore"
],
"operationId": "Metastore_Delete",
"description": "Remove files in Syms",
"x-ms-examples": {
"Register files in Syms": {
"$ref": "./examples/Metastore_Delete.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"in": "path",
"name": "id",
"required": true,
"type": "string"
}
],
"responses": {
"204": {
"description": "The Job created for the resource Deletion request"
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "../../../../common/v1/types.json#/definitions/ErrorContract"
}
}
}
}
}
},
"definitions": {
"metastoreRegistrationResponse": {
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/RequestStatus"
}
}
},
"metastoreUpdationResponse": {
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/RequestStatus"
}
}
},
"metastoreRequestSuccessResponse": {
"type": "object",
"properties": {
"status": {
"$ref": "#/definitions/ResourceStatus"
}
}
},
"ResourceStatus": {
"description": "Enumerates possible Status of the resource.",
"type": "string",
"enum": [
"Creating",
"Created",
"Failed"
],
"x-ms-enum": {
"name": "ResourceStatus",
"modelAsString": true
}
},
"RequestStatus": {
"description": "Enumerates possible request statuses.",
"type": "string",
"enum": [
"Running",
"Completed",
"Failed"
],
"x-ms-enum": {
"name": "RequestStatus",
"modelAsString": true
}
},
"metastoreRegisterObject": {
"type": "object",
"required": [
"inputFolder"
],
"properties": {
"inputFolder": {
"type": "string",
"example": "https://testsymsstorage.blob.core.windows.net/testsymsstoragefilesystem/CDM/",
"description": "The input folder containing CDM files."
}
}
},
"metastoreUpdateObject": {
"type": "object",
"required": [
"inputFolder"
],
"properties": {
"inputFolder": {
"type": "string",
"example": "https://testsymsstorage.blob.core.windows.net/testsymsstoragefilesystem/CDM/",
"description": "The input folder containing CDM files."
}
}
}
},
"parameters": {
"ApiVersionParameter": {
"name": "api-version",
"in": "query",
"required": true,
"type": "string",
"description": "The Synapse client API Version."
epkalyanr marked this conversation as resolved.
Show resolved Hide resolved
},
"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"
}
}
}
Loading