Skip to content

Commit a3787ca

Browse files
epkalyanrKalyan RamanDongwei Wang
authored
Rest API changes for SymsSync service (#15695)
* Rest API changes for SymsSync service * fixing ci failures * correcting api version * addressing PR comments * addressing PR comments * fixing test failures * correcting the example file * changing description from resource to database * addressing PR comment for response type * Leave SymsSync only * Minor change * Add an empty line Co-authored-by: Kalyan Raman <[email protected]> Co-authored-by: Dongwei Wang <[email protected]>
1 parent b49af80 commit a3787ca

File tree

7 files changed

+396
-0
lines changed

7 files changed

+396
-0
lines changed

custom-words.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2163,6 +2163,7 @@ updatehostname
21632163
updatepolicy
21642164
updateprivateendpointconnection
21652165
updateproperties
2166+
updation
21662167
upgradeos
21672168
uploadbatchservicelogs
21682169
uploadcertificate
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"parameters": {
3+
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
4+
"api-version": "2021-07-01-preview",
5+
"id": "testdatabase"
6+
},
7+
"responses": {
8+
"204": {},
9+
"default": {
10+
"body": {
11+
"error": {
12+
"code": "Error code",
13+
"message": "Error message"
14+
}
15+
}
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
4+
"api-version": "2021-07-01-preview",
5+
"id": "testdatabase"
6+
},
7+
"responses": {
8+
"200": {
9+
"body": {
10+
"status": "Completed"
11+
}
12+
},
13+
"default": {
14+
"body": {
15+
"error": {
16+
"code": "Error code",
17+
"message": "Error message"
18+
}
19+
}
20+
}
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
4+
"api-version": "2021-07-01-preview",
5+
"id": "testdatabase",
6+
"registerBody": {
7+
"inputFolder": "https://testsymsstorage.dfs.core.windows.net/testsymscontainer/CDM/"
8+
}
9+
},
10+
"responses": {
11+
"201": {
12+
"body": {
13+
"status": "Running"
14+
}
15+
},
16+
"default": {
17+
"body": {
18+
"error": {
19+
"code": "Error code",
20+
"message": "Error message"
21+
}
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"parameters": {
3+
"endpoint": "exampleWorkspace.dev.azuresynapse.net",
4+
"api-version": "2021-07-01-preview",
5+
"id": "testdatabase",
6+
"updateBody": {
7+
"inputFolder": "https://testsymsstorage.dfs.core.windows.net/testsymscontainer/CDM/"
8+
}
9+
},
10+
"responses": {
11+
"201": {
12+
"body": {
13+
"status": "Running"
14+
}
15+
},
16+
"default": {
17+
"body": {
18+
"error": {
19+
"code": "Error code",
20+
"message": "Error message"
21+
}
22+
}
23+
}
24+
}
25+
}
Lines changed: 294 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,294 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2021-07-01-preview",
5+
"title": "ArtifactsClient"
6+
},
7+
"x-ms-parameterized-host": {
8+
"hostTemplate": "{endpoint}",
9+
"useSchemePrefix": false,
10+
"parameters": [
11+
{
12+
"$ref": "#/parameters/Endpoint"
13+
}
14+
]
15+
},
16+
"schemes": [
17+
"https"
18+
],
19+
"consumes": [
20+
"application/json"
21+
],
22+
"produces": [
23+
"application/json"
24+
],
25+
"paths": {
26+
"/metastore/create-database-operations/{id}": {
27+
"put": {
28+
"tags": [
29+
"metastore"
30+
],
31+
"operationId": "Metastore_Register",
32+
"description": "Register files in Syms",
33+
"x-ms-examples": {
34+
"Register files in Syms": {
35+
"$ref": "./examples/Metastore_Register.json"
36+
}
37+
},
38+
"parameters": [
39+
{
40+
"$ref": "#/parameters/ApiVersionParameter"
41+
},
42+
{
43+
"name": "id",
44+
"in": "path",
45+
"required": true,
46+
"type": "string",
47+
"description": "The name of the database to be created. The name can contain only alphanumeric characters and should not exceed 24 characters"
48+
},
49+
{
50+
"in": "body",
51+
"name": "registerBody",
52+
"required": true,
53+
"description": "The body for the register request",
54+
"schema": {
55+
"$ref": "#/definitions/metastoreRegisterObject"
56+
}
57+
}
58+
],
59+
"responses": {
60+
"201": {
61+
"description": "The Job created for the resource creation/updation request",
62+
"schema": {
63+
"$ref": "#/definitions/metastoreRegistrationResponse"
64+
}
65+
},
66+
"default": {
67+
"description": "Error response describing why the operation failed.",
68+
"schema": {
69+
"$ref": "../../../../common/v1/types.json#/definitions/ErrorContract"
70+
}
71+
}
72+
}
73+
},
74+
"get": {
75+
"tags": [
76+
"metastore"
77+
],
78+
"operationId": "Metastore_GetDatabaseOperations",
79+
"description": "Gets status of the database",
80+
"x-ms-examples": {
81+
"Register files in Syms": {
82+
"$ref": "./examples/Metastore_GetResourceStatus.json"
83+
}
84+
},
85+
"parameters": [
86+
{
87+
"$ref": "#/parameters/ApiVersionParameter"
88+
},
89+
{
90+
"in": "path",
91+
"name": "id",
92+
"required": true,
93+
"type": "string"
94+
}
95+
],
96+
"responses": {
97+
"200": {
98+
"description": "Request Success Response.",
99+
"schema": {
100+
"$ref": "#/definitions/metastoreRequestSuccessResponse"
101+
}
102+
},
103+
"default": {
104+
"description": "Error response describing why the operation failed.",
105+
"schema": {
106+
"$ref": "../../../../common/v1/types.json#/definitions/ErrorContract"
107+
}
108+
}
109+
}
110+
}
111+
},
112+
"/metastore/update-database-operations/{id}": {
113+
"put": {
114+
"tags": [
115+
"metastore"
116+
],
117+
"operationId": "Metastore_Update",
118+
"description": "Update files in Syms",
119+
"x-ms-examples": {
120+
"Register files in Syms": {
121+
"$ref": "./examples/Metastore_Update.json"
122+
}
123+
},
124+
"parameters": [
125+
{
126+
"$ref": "#/parameters/ApiVersionParameter"
127+
},
128+
{
129+
"name": "id",
130+
"in": "path",
131+
"required": true,
132+
"type": "string",
133+
"description": "The name of the database to be updated"
134+
},
135+
{
136+
"in": "body",
137+
"name": "updateBody",
138+
"required": true,
139+
"description": "The body for the update request",
140+
"schema": {
141+
"$ref": "#/definitions/metastoreUpdateObject"
142+
}
143+
}
144+
],
145+
"responses": {
146+
"201": {
147+
"description": "The Job created for the resource creation/updation request",
148+
"schema": {
149+
"$ref": "#/definitions/metastoreUpdationResponse"
150+
}
151+
},
152+
"default": {
153+
"description": "Error response describing why the operation failed.",
154+
"schema": {
155+
"$ref": "../../../../common/v1/types.json#/definitions/ErrorContract"
156+
}
157+
}
158+
}
159+
}
160+
},
161+
"/metastore/databases/{id}": {
162+
"delete": {
163+
"tags": [
164+
"metastore"
165+
],
166+
"operationId": "Metastore_Delete",
167+
"description": "Remove files in Syms",
168+
"x-ms-examples": {
169+
"Register files in Syms": {
170+
"$ref": "./examples/Metastore_Delete.json"
171+
}
172+
},
173+
"parameters": [
174+
{
175+
"$ref": "#/parameters/ApiVersionParameter"
176+
},
177+
{
178+
"in": "path",
179+
"name": "id",
180+
"required": true,
181+
"type": "string"
182+
}
183+
],
184+
"responses": {
185+
"204": {
186+
"description": "The Job created for the resource Deletion request"
187+
},
188+
"default": {
189+
"description": "Error response describing why the operation failed.",
190+
"schema": {
191+
"$ref": "../../../../common/v1/types.json#/definitions/ErrorContract"
192+
}
193+
}
194+
}
195+
}
196+
}
197+
},
198+
"definitions": {
199+
"metastoreRegistrationResponse": {
200+
"type": "object",
201+
"properties": {
202+
"status": {
203+
"$ref": "#/definitions/RequestStatus"
204+
}
205+
}
206+
},
207+
"metastoreUpdationResponse": {
208+
"type": "object",
209+
"properties": {
210+
"status": {
211+
"$ref": "#/definitions/RequestStatus"
212+
}
213+
}
214+
},
215+
"metastoreRequestSuccessResponse": {
216+
"type": "object",
217+
"properties": {
218+
"status": {
219+
"$ref": "#/definitions/ResourceStatus"
220+
}
221+
}
222+
},
223+
"ResourceStatus": {
224+
"description": "Enumerates possible Status of the resource.",
225+
"type": "string",
226+
"enum": [
227+
"Creating",
228+
"Created",
229+
"Failed"
230+
],
231+
"x-ms-enum": {
232+
"name": "ResourceStatus",
233+
"modelAsString": true
234+
}
235+
},
236+
"RequestStatus": {
237+
"description": "Enumerates possible request statuses.",
238+
"type": "string",
239+
"enum": [
240+
"Running",
241+
"Completed",
242+
"Failed"
243+
],
244+
"x-ms-enum": {
245+
"name": "RequestStatus",
246+
"modelAsString": true
247+
}
248+
},
249+
"metastoreRegisterObject": {
250+
"type": "object",
251+
"required": [
252+
"inputFolder"
253+
],
254+
"properties": {
255+
"inputFolder": {
256+
"type": "string",
257+
"example": "https://testsymsstorage.blob.core.windows.net/testsymsstoragefilesystem/CDM/",
258+
"description": "The input folder containing CDM files."
259+
}
260+
}
261+
},
262+
"metastoreUpdateObject": {
263+
"type": "object",
264+
"required": [
265+
"inputFolder"
266+
],
267+
"properties": {
268+
"inputFolder": {
269+
"type": "string",
270+
"example": "https://testsymsstorage.blob.core.windows.net/testsymsstoragefilesystem/CDM/",
271+
"description": "The input folder containing CDM files."
272+
}
273+
}
274+
}
275+
},
276+
"parameters": {
277+
"ApiVersionParameter": {
278+
"name": "api-version",
279+
"in": "query",
280+
"required": true,
281+
"type": "string",
282+
"description": "The Synapse client API Version."
283+
},
284+
"Endpoint": {
285+
"name": "endpoint",
286+
"description": "The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.",
287+
"required": true,
288+
"type": "string",
289+
"in": "path",
290+
"x-ms-skip-url-encoding": true,
291+
"x-ms-parameter-location": "client"
292+
}
293+
}
294+
}

0 commit comments

Comments
 (0)