openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 12.9 kB
JSON
{"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/metrics.json","version":"2.0"}],"x-providerName":"azure.com","x-serviceName":"sql-metrics","x-tags":["Azure","Microsoft"]},"paths":{"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions":{"get":{"description":"Returns database metric definitions.","operationId":"Databases_ListMetricDefinitions","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 database usage metrics":{"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 database usage metrics":{"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 database usage metrics":{"value":"sqlcrudtest-6730"}}},{"$ref":"#/components/parameters/ServerNameParameter"},{"description":"The name of the database.","in":"path","name":"databaseName","required":true,"schema":{"type":"string"},"examples":{"List database usage metrics":{"value":"3481"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricDefinitionListResult"},"examples":{"List database usage metrics":{"$ref":"#/components/examples/List_database_usage_metrics"}}}}}},"tags":["Databases"],"x-ms-pageable":{}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics":{"get":{"description":"Returns database metrics.","operationId":"Databases_ListMetrics","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 database usage metrics":{"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 database usage metrics":{"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 database usage metrics":{"value":"sqlcrudtest-6730"}}},{"$ref":"#/components/parameters/ServerNameParameter"},{"description":"The name of the database.","in":"path","name":"databaseName","required":true,"schema":{"type":"string"},"examples":{"List database usage metrics":{"value":"3481"}}},{"description":"An OData filter expression that describes a subset of metrics to return.","in":"query","name":"$filter","required":true,"schema":{"type":"string"},"examples":{"List database usage metrics":{"value":"name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and endTime eq '2017-06-02T18:55:00Z'"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricListResult"},"examples":{"List database usage metrics":{"$ref":"#/components/examples/List_database_usage_metrics"}}}}}},"tags":["Databases"],"x-ms-pageable":{}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions":{"get":{"description":"Returns elastic pool metric definitions.","operationId":"ElasticPools_ListMetricDefinitions","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 database usage metrics":{"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 database usage metrics":{"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 database usage metrics":{"value":"sqlcrudtest-6730"}}},{"$ref":"#/components/parameters/ServerNameParameter"},{"description":"The name of the elastic pool.","in":"path","name":"elasticPoolName","required":true,"schema":{"type":"string"},"examples":{"List database usage metrics":{"value":"3481"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricDefinitionListResult"},"examples":{"List database usage metrics":{"$ref":"#/components/examples/List_database_usage_metrics"}}}}}},"tags":["ElasticPools"],"x-ms-pageable":{}}},"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics":{"get":{"description":"Returns elastic pool metrics.","operationId":"ElasticPools_ListMetrics","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 database usage metrics":{"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 database usage metrics":{"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 database usage metrics":{"value":"sqlcrudtest-6730"}}},{"$ref":"#/components/parameters/ServerNameParameter"},{"description":"The name of the elastic pool.","in":"path","name":"elasticPoolName","required":true,"schema":{"type":"string"},"examples":{"List database usage metrics":{"value":"3481"}}},{"description":"An OData filter expression that describes a subset of metrics to return.","in":"query","name":"$filter","required":true,"schema":{"type":"string"},"examples":{"List database usage metrics":{"value":"name/value eq 'cpu_percent' and timeGrain eq '00:10:00' and startTime eq '2017-06-02T18:35:00Z' and endTime eq '2017-06-02T18:55:00Z'"}}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricListResult"},"examples":{"List database usage metrics":{"$ref":"#/components/examples/List_database_usage_metrics"}}}}}},"tags":["ElasticPools"],"x-ms-pageable":{}}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"List_database_usage_metrics":{"value":{"value":[{"endTime":"2017-06-02T18:55:00Z","metricValues":[{"average":0,"count":1,"maximum":0,"minimum":0,"timestamp":"2017-06-02T18:30:01Z","total":0},{"average":0,"count":1,"maximum":0,"minimum":0,"timestamp":"2017-06-02T18:40:01Z","total":0},{"average":0,"count":1,"maximum":0,"minimum":0,"timestamp":"2017-06-02T18:50:01Z","total":0}],"name":{"localizedValue":"CPU percentage","value":"cpu_percent"},"startTime":"2017-06-02T18:35:00Z","timeGrain":"00:10:00","unit":"percent"}]}}},"parameters":{"ServerNameParameter":{"description":"The name of the server.","in":"path","name":"serverName","required":true,"x-ms-parameter-location":"method","schema":{"type":"string"},"examples":{"List database usage metrics":{"value":"sqlcrudtest-9007"}}}},"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":{"Metric":{"description":"Database metrics.","properties":{"endTime":{"description":"The end time for the metric (ISO-8601 format).","format":"date-time","readOnly":true,"type":"string"},"metricValues":{"description":"The metric values for the specified time window and timestep.","items":{"$ref":"#/components/schemas/MetricValue"},"readOnly":true,"type":"array"},"name":{"$ref":"#/components/schemas/MetricName"},"startTime":{"description":"The start time for the metric (ISO-8601 format).","format":"date-time","readOnly":true,"type":"string"},"timeGrain":{"description":"The time step to be used to summarize the metric values.","readOnly":true,"type":"string"},"unit":{"description":"The unit of the metric.","enum":["count","bytes","seconds","percent","countPerSecond","bytesPerSecond"],"readOnly":true,"type":"string","x-ms-enum":{"modelAsString":true,"name":"UnitType"}}}},"MetricAvailability":{"description":"A metric availability value.","properties":{"retention":{"description":"The length of retention for the database metric.","readOnly":true,"type":"string"},"timeGrain":{"description":"The granularity of the database metric.","readOnly":true,"type":"string"}}},"MetricDefinition":{"description":"A database metric definition.","properties":{"metricAvailabilities":{"description":"The list of database metric availabilities for the metric.","items":{"$ref":"#/components/schemas/MetricAvailability"},"readOnly":true,"type":"array"},"name":{"$ref":"#/components/schemas/MetricName"},"primaryAggregationType":{"description":"The primary aggregation type defining how metric values are displayed.","enum":["None","Average","Count","Minimum","Maximum","Total"],"readOnly":true,"type":"string","x-ms-enum":{"modelAsString":true,"name":"PrimaryAggregationType"}},"resourceUri":{"description":"The resource uri of the database.","readOnly":true,"type":"string"},"unit":{"description":"The unit of the metric.","enum":["Count","Bytes","Seconds","Percent","CountPerSecond","BytesPerSecond"],"readOnly":true,"type":"string","x-ms-enum":{"modelAsString":true,"name":"UnitDefinitionType"}}}},"MetricDefinitionListResult":{"description":"The response to a list database metric definitions request.","properties":{"value":{"description":"The list of metric definitions for the database.","items":{"$ref":"#/components/schemas/MetricDefinition"},"type":"array"}},"required":["value"]},"MetricListResult":{"description":"The response to a list database metrics request.","properties":{"value":{"description":"The list of metrics for the database.","items":{"$ref":"#/components/schemas/Metric"},"type":"array"}},"required":["value"]},"MetricName":{"description":"A database metric name.","properties":{"localizedValue":{"description":"The friendly name of the database metric.","readOnly":true,"type":"string"},"value":{"description":"The name of the database metric.","readOnly":true,"type":"string"}}},"MetricValue":{"description":"Represents database metrics.","properties":{"average":{"description":"The average value of the metric.","format":"double","readOnly":true,"type":"number"},"count":{"description":"The number of values for the metric.","format":"int32","readOnly":true,"type":"number"},"maximum":{"description":"The max value of the metric.","format":"double","readOnly":true,"type":"number"},"minimum":{"description":"The min value of the metric.","format":"double","readOnly":true,"type":"number"},"timestamp":{"description":"The metric timestamp (ISO-8601 format).","format":"date-time","readOnly":true,"type":"string"},"total":{"description":"The total value of the metric.","format":"double","readOnly":true,"type":"number"}}}}}}