Skip to content

Commit e7867b1

Browse files
committed
Add swagger for DW queries API 2025-08-01-preview
1 parent dea084f commit e7867b1

File tree

5 files changed

+543
-0
lines changed

5 files changed

+543
-0
lines changed
Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2025-08-01-preview",
5+
"title": "SqlManagementClient",
6+
"description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities."
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"paths": {
19+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseQueries": {
20+
"get": {
21+
"tags": [
22+
"DataWarehouseQueries"
23+
],
24+
"operationId": "DataWarehouseQueries_ListByDatabase",
25+
"parameters": [
26+
{
27+
"$ref": "../../../common/v1/types.json#/parameters/ResourceGroupParameter"
28+
},
29+
{
30+
"$ref": "#/parameters/ServerNameParameter"
31+
},
32+
{
33+
"$ref": "#/parameters/DatabaseNameParameter"
34+
},
35+
{
36+
"$ref": "../../../common/v1/types.json#/parameters/SubscriptionIdParameter"
37+
},
38+
{
39+
"$ref": "../../../common/v1/types.json#/parameters/ApiVersionParameter"
40+
}
41+
],
42+
"responses": {
43+
"200": {
44+
"description": "Successfully retrieved list of Data Warehouse queries.",
45+
"schema": {
46+
"$ref": "#/definitions/DataWarehouseQueryListResult"
47+
}
48+
},
49+
"default": {
50+
"description": "*** Error Responses: ***\n\n * 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state\n\n * 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state\n\n * 400 UpdateNotAllowedOnPausedDatabase - User attempted to perform an update on a paused database.\n\n * 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ServerNotInSubscriptionResourceGroup - Specified server does not exist in the specified resource group and subscription.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 ResourceNotFound - The specified resource was not found.\n\n * 404 SubscriptionNotFound - The requested subscription was not found.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.\n\n * 504 RequestTimeout - Service request exceeded the allowed timeout.",
51+
"schema": {
52+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
53+
}
54+
}
55+
},
56+
"x-ms-pageable": {
57+
"nextLinkName": "nextLink"
58+
},
59+
"x-ms-examples": {
60+
"Gets top 50 most time-consuming Data Warehouse queries for specific database.": {
61+
"$ref": "./examples/DataWarehouseQueriesListByDatabase.json"
62+
}
63+
}
64+
}
65+
}
66+
},
67+
"definitions": {
68+
"DataWarehouseQuery": {
69+
"description": "A data warehouse query.",
70+
"type": "object",
71+
"allOf": [
72+
{
73+
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
74+
}
75+
],
76+
"properties": {
77+
"properties": {
78+
"$ref": "#/definitions/DataWarehouseQueryProperties",
79+
"description": "Resource properties.",
80+
"x-ms-client-flatten": true
81+
}
82+
}
83+
},
84+
"DataWarehouseQueryListResult": {
85+
"description": "The response to a list data warehouse queries request",
86+
"type": "object",
87+
"properties": {
88+
"value": {
89+
"description": "Array of results.",
90+
"type": "array",
91+
"items": {
92+
"$ref": "#/definitions/DataWarehouseQuery"
93+
},
94+
"readOnly": true
95+
},
96+
"nextLink": {
97+
"description": "Link to retrieve next page of results.",
98+
"type": "string",
99+
"readOnly": true
100+
}
101+
}
102+
},
103+
"DataWarehouseQueryProperties": {
104+
"description": "The Data Warehouse query properties.",
105+
"type": "object",
106+
"properties": {
107+
"queryId": {
108+
"description": "The query ID.",
109+
"type": "string",
110+
"readOnly": true
111+
},
112+
"startTime": {
113+
"format": "date-time",
114+
"description": "The query start time.",
115+
"type": "string",
116+
"readOnly": true
117+
},
118+
"endTime": {
119+
"format": "date-time",
120+
"description": "The query end time.",
121+
"type": "string",
122+
"readOnly": true
123+
},
124+
"duration": {
125+
"format": "int32",
126+
"description": "The query duration in milliseconds.",
127+
"type": "integer",
128+
"readOnly": true
129+
},
130+
"status": {
131+
"description": "The query status.",
132+
"type": "string",
133+
"readOnly": true
134+
},
135+
"queryText": {
136+
"description": "The query text.",
137+
"type": "string",
138+
"readOnly": true
139+
},
140+
"importance": {
141+
"description": "The query importance level.",
142+
"type": "string",
143+
"readOnly": true
144+
},
145+
"groupName": {
146+
"description": "The workload group name.",
147+
"type": "string",
148+
"readOnly": true
149+
},
150+
"classifierName": {
151+
"description": "The workload classifier name.",
152+
"type": "string",
153+
"readOnly": true
154+
},
155+
"resourceAllocationPercentage": {
156+
"description": "The resource allocation percentage.",
157+
"type": "string",
158+
"readOnly": true
159+
},
160+
"error": {
161+
"description": "The query error information.",
162+
"type": "string",
163+
"readOnly": true
164+
},
165+
"login": {
166+
"description": "The login associated with the query.",
167+
"type": "string",
168+
"readOnly": true
169+
},
170+
"progress": {
171+
"format": "int32",
172+
"description": "The query progress percentage.",
173+
"type": "integer",
174+
"readOnly": true
175+
},
176+
"sessionId": {
177+
"description": "The session ID.",
178+
"type": "string",
179+
"readOnly": true
180+
},
181+
"resourceClass": {
182+
"description": "The resource class.",
183+
"type": "string",
184+
"readOnly": true
185+
},
186+
"concurrencySlots": {
187+
"description": "The concurrency slots.",
188+
"type": "string",
189+
"readOnly": true
190+
}
191+
}
192+
}
193+
},
194+
"parameters": {
195+
"DatabaseNameParameter": {
196+
"name": "databaseName",
197+
"in": "path",
198+
"description": "The name of the database.",
199+
"required": true,
200+
"type": "string",
201+
"x-ms-parameter-location": "method"
202+
},
203+
"ServerNameParameter": {
204+
"name": "serverName",
205+
"in": "path",
206+
"description": "The name of the server.",
207+
"required": true,
208+
"type": "string",
209+
"x-ms-parameter-location": "method"
210+
}
211+
},
212+
"securityDefinitions": {
213+
"azure_auth": {
214+
"type": "oauth2",
215+
"description": "Azure Active Directory OAuth2 Flow",
216+
"flow": "implicit",
217+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
218+
"scopes": {
219+
"user_impersonation": "impersonate your user account"
220+
}
221+
}
222+
}
223+
}

0 commit comments

Comments
 (0)