Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6a3962a

Browse files
jaredmoojhendrixMSFT
authored andcommitted
Add querytexts (Azure#2041)
1 parent ca5044e commit 6a3962a

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"parameters":{
3+
"subscriptionId":"00000000-1111-2222-3333-444444444444",
4+
"resourceGroupName":"group1",
5+
"serverName":"sqlcrudtest",
6+
"databaseName":"db1",
7+
"queryId":"19",
8+
"api-version":"2014-04-01"
9+
},
10+
"responses":{
11+
"200":{
12+
"value":[
13+
{
14+
"name":"current",
15+
"queryText":"select 1",
16+
"type":"Microsoft.Sql/servers/databases/topQueries/queryText"
17+
}
18+
]
19+
}
20+
}
21+
}

specification/sql/resource-manager/Microsoft.Sql/2014-04-01/queries.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,53 @@
102102
"nextLinkName": null
103103
}
104104
}
105+
},
106+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/topQueries/{queryId}/queryText": {
107+
"get": {
108+
"tags": [
109+
"Queries"
110+
],
111+
"operationId": "QueryTexts_ListByQuery",
112+
"description": "Gets a query's text.",
113+
"x-ms-examples":{
114+
"Get a query": { "$ref": "./examples/QueryTextsList.json" }
115+
},
116+
"parameters": [
117+
{
118+
"$ref": "#/parameters/ApiVersionParameter"
119+
},
120+
{
121+
"$ref": "#/parameters/SubscriptionIdParameter"
122+
},
123+
{
124+
"$ref": "#/parameters/ResourceGroupParameter"
125+
},
126+
{
127+
"$ref": "#/parameters/ServerNameParameter"
128+
},
129+
{
130+
"$ref": "#/parameters/DatabaseNameParameter"
131+
},
132+
{
133+
"name": "queryId",
134+
"type": "string",
135+
"description": "The id of the query",
136+
"required": true,
137+
"in": "path"
138+
}
139+
],
140+
"responses": {
141+
"200": {
142+
"description": "OK",
143+
"schema": {
144+
"$ref": "#/definitions/QueryTextListResult"
145+
}
146+
}
147+
},
148+
"x-ms-pageable": {
149+
"nextLinkName": null
150+
}
151+
}
105152
}
106153
},
107154
"definitions": {
@@ -291,6 +338,38 @@
291338
},
292339
"required": ["value"],
293340
"description": "Represents the response to a get query request."
341+
},
342+
"QueryText": {
343+
"properties": {
344+
"name": {
345+
"readOnly":true,
346+
"type":"string",
347+
"description":"Resource name."
348+
},
349+
"type": {
350+
"readOnly":true,
351+
"type":"string",
352+
"description":"Resource type."
353+
},
354+
"queryText": {
355+
"readOnly":true,
356+
"type":"string",
357+
"description":"Query text."
358+
}
359+
}
360+
},
361+
"QueryTextListResult": {
362+
"properties": {
363+
"value": {
364+
"type": "array",
365+
"items": {
366+
"$ref": "#/definitions/QueryText"
367+
},
368+
"description": "The query text."
369+
}
370+
},
371+
"required": ["value"],
372+
"description": "Represents the response to a get query text request."
294373
}
295374
},
296375
"parameters": {

0 commit comments

Comments
 (0)