UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 11.5 kB
{"openapi":"3.0.0","info":{"description":"Provides create, read, update and delete functionality for Azure SQL Database resources including servers, databases, elastic pools, recommendations, operations, and usage metrics.","title":"Azure SQL Database","version":"2014-04-01","x-apisguru-categories":["cloud"],"x-logo":{"url":"https://assets.onestore.ms/cdnfiles/onestorerolling-1606-01000/shell/v3/images/logo/microsoft.png"},"x-origin":[{"format":"swagger","url":"https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/queries.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"sql-queries","x-tags":["Azure","Microsoft"]},"paths":{"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/topQueries":{"get":{"description":"Gets a list of top queries by database.","operationId":"Queries_ListByDatabase","parameters":[{"description":"The API version to use for the request.","in":"query","name":"api-version","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"List top queries":{"value":"2014-04-01"}}},{"description":"The subscription ID that identifies an Azure subscription.","in":"path","name":"subscriptionId","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"List top queries":{"value":"00000000-1111-2222-3333-444444444444"}}},{"description":"The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"List top queries":{"value":"group1"}}},{"$ref":"#/components/parameters/ServerNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopQueriesListResult"},"examples":{"List top queries":{"$ref":"#/components/examples/List_top_queries"}}}}}},"tags":["Queries"],"x-ms-pageable":{}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/topQueries/{queryId}/queryText":{"get":{"description":"Gets a query's text.","operationId":"QueryTexts_ListByQuery","parameters":[{"description":"The API version to use for the request.","in":"query","name":"api-version","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Get a query":{"value":"2014-04-01"}}},{"description":"The subscription ID that identifies an Azure subscription.","in":"path","name":"subscriptionId","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Get a query":{"value":"00000000-1111-2222-3333-444444444444"}}},{"description":"The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get a query":{"value":"group1"}}},{"$ref":"#/components/parameters/ServerNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"description":"The id of the query","in":"path","name":"queryId","required":true,"schema":{"type":"string"},"examples":{"Get a query":{"value":"19"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryTextListResult"},"examples":{"Get a query":{"$ref":"#/components/examples/Get_a_query"}}}}}},"tags":["Queries"],"x-ms-pageable":{}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/topQueries/{queryId}/statistics":{"get":{"description":"Lists a query's statistics.","operationId":"QueryStatistics_ListByQuery","parameters":[{"description":"The API version to use for the request.","in":"query","name":"api-version","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Get a query":{"value":"2014-04-01"}}},{"description":"The subscription ID that identifies an Azure subscription.","in":"path","name":"subscriptionId","required":true,"x-ms-parameter-location":"client","schema":{"type":"string"},"examples":{"Get a query":{"value":"00000000-1111-2222-3333-444444444444"}}},{"description":"The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.","in":"path","name":"resourceGroupName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"Get a query":{"value":"group1"}}},{"$ref":"#/components/parameters/ServerNameParameter"},{"$ref":"#/components/parameters/DatabaseNameParameter"},{"description":"The id of the query","in":"path","name":"queryId","required":true,"schema":{"type":"string"},"examples":{"Get a query":{"value":"19"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryStatisticListResult"},"examples":{"Get a query":{"$ref":"#/components/examples/Get_a_query"}}}}}},"tags":["Queries"],"x-ms-pageable":{}}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"List_top_queries":{"value":{"value":[{"aggregationFunction":"sum","executionType":"any","intervalType":"PT1H","numberOfTopQueries":1,"observationEndTime":"2017-07-12T16:21:54.0916567Z","observationStartTime":"2017-07-11T16:21:54.0916567Z","observedMetric":"cpu","queries":[{"intervals":[{"executionCount":12,"intervalStartTime":"2017-07-11T16:00:00","metrics":[{"displayName":"Cpu","name":"cpu","unit":"percentage","value":0.000763888888888889},{"displayName":"Physical Io Reads","name":"io","unit":"percentage","value":0},{"displayName":"Log Writes","name":"logIo","unit":"percentage","value":0},{"displayName":"Memory consumption","name":"memory","unit":"KB","value":0},{"displayName":"Query duration","name":"duration","unit":"microseconds","value":3308}]}],"queryId":"19"}],"type":"Microsoft.Sql/servers/databases/topQueries"}]}},"Get_a_query":{"value":{"value":[{"intervals":[{"executionCount":12,"intervalStartTime":"2017-07-11T16:00:00","metrics":[{"displayName":"Cpu","name":"cpu","unit":"percentage","value":0.000763888888888889},{"displayName":"Physical Io Reads","name":"io","unit":"percentage","value":0},{"displayName":"Log Writes","name":"logIo","unit":"percentage","value":0},{"displayName":"Memory consumption","name":"memory","unit":"KB","value":0},{"displayName":"Query duration","name":"duration","unit":"microseconds","value":3308}]}],"queryId":"19"}]}}},"parameters":{"DatabaseNameParameter":{"description":"The name of the database.","in":"path","name":"databaseName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"List top queries":{"value":"db1"},"Get a query":{"value":"db1"}}},"ServerNameParameter":{"description":"The name of the server.","in":"path","name":"serverName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"List top queries":{"value":"sqlcrudtest"},"Get a query":{"value":"sqlcrudtest"}}}},"securitySchemes":{"azure_auth":{"description":"Azure Active Directory OAuth2 Flow","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://login.microsoftonline.com/common/oauth2/authorize","scopes":{"user_impersonation":"impersonate your user account"}}}}},"schemas":{"QueryInterval":{"description":"A database query.","properties":{"executionCount":{"description":"The number of times the query was executed during this interval.","format":"int32","readOnly":true,"type":"number"},"intervalStartTime":{"description":"The start time of the measurement interval (ISO8601 format).","format":"date-time","readOnly":true,"type":"string"},"metrics":{"description":"The list of query metrics during this interval.","items":{"$ref":"#/components/schemas/QueryMetric"},"readOnly":true,"type":"array"}}},"QueryMetric":{"description":"A database query.","properties":{"displayName":{"description":"The name of the metric for display in user interface","readOnly":true,"type":"string"},"name":{"description":"The name of the metric","readOnly":true,"type":"string"},"unit":{"description":"The unit of measurement","enum":["percentage","KB","microseconds"],"readOnly":true,"type":"string","x-ms-enum":{"modelAsString":false,"name":"QueryMetricUnit"}},"value":{"description":"The measured value","format":"double","readOnly":true,"type":"number"}}},"QueryStatistic":{"description":"A database query.","properties":{"intervals":{"description":"The list of query intervals.","items":{"$ref":"#/components/schemas/QueryInterval"},"readOnly":true,"type":"array"},"queryId":{"description":"The id of the query","readOnly":true,"type":"string"}}},"QueryStatisticListResult":{"description":"Represents the response to a get query request.","properties":{"value":{"description":"The query.","items":{"$ref":"#/components/schemas/QueryStatistic"},"type":"array"}},"required":["value"]},"QueryText":{"properties":{"name":{"description":"Resource name.","readOnly":true,"type":"string"},"queryText":{"description":"Query text.","readOnly":true,"type":"string"},"type":{"description":"Resource type.","readOnly":true,"type":"string"}}},"QueryTextListResult":{"description":"Represents the response to a get query text request.","properties":{"value":{"description":"The query text.","items":{"$ref":"#/components/schemas/QueryText"},"type":"array"}},"required":["value"]},"TopQueries":{"description":"A database query.","properties":{"aggregationFunction":{"description":"The function that is used to aggregate each query's metrics.","enum":["min","max","avg","sum"],"readOnly":true,"type":"string","x-ms-enum":{"modelAsString":false,"name":"QueryAggregationFunction"}},"executionType":{"description":"The execution type that is used to filter the query instances that are returned.","enum":["any","regular","irregular","aborted","exception"],"readOnly":true,"type":"string","x-ms-enum":{"modelAsString":false,"name":"QueryExecutionType"}},"intervalType":{"description":"The duration of the interval (ISO8601 duration format).","readOnly":true,"type":"string"},"numberOfTopQueries":{"description":"The number of requested queries.","format":"int32","readOnly":true,"type":"number"},"observationEndTime":{"description":"The end time for queries that are returned (ISO8601 format)","format":"date-time","readOnly":true,"type":"string"},"observationStartTime":{"description":"The start time for queries that are returned (ISO8601 format)","format":"date-time","readOnly":true,"type":"string"},"observedMetric":{"description":"The type of metric to use for ordering the top metrics.","enum":["cpu","io","logio","duration","executionCount"],"readOnly":true,"type":"string","x-ms-enum":{"modelAsString":false,"name":"QueryObservedMetricType"}},"queries":{"description":"The list of queries.","items":{"$ref":"#/components/schemas/QueryStatistic"},"readOnly":true,"type":"array"}}},"TopQueriesListResult":{"description":"Represents the response to a get top queries request.","properties":{"value":{"description":"The list of top queries.","items":{"$ref":"#/components/schemas/TopQueries"},"type":"array"}},"required":["value"]}}}}