openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 21.4 kB
JSON
{"openapi":"3.0.0","info":{"description":"Billing client provides access to billing resources for Azure subscriptions.","title":"BillingManagementClient","version":"2018-03-01-preview","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/billing/resource-manager/Microsoft.Billing/preview/2018-03-01-preview/billing.json","version":"2.0"}],"x-preferred":true,"x-providerName":"azure.com","x-serviceName":"billing","x-tags":["Azure","Microsoft"]},"security":[{"azure_auth":["user_impersonation"]}],"paths":{"/providers/Microsoft.Billing/enrollmentAccounts":{"get":{"description":"Lists the enrollment accounts the caller has access to.","operationId":"EnrollmentAccounts_List","parameters":[{"$ref":"#/components/parameters/apiVersionParameter"}],"responses":{"200":{"description":"OK. The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentAccountListResult"},"examples":{"EnrollmentAccountsList":{"$ref":"#/components/examples/EnrollmentAccountsList"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["EnrollmentAccounts"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/providers/Microsoft.Billing/enrollmentAccounts/{name}":{"get":{"description":"Gets a enrollment account by name.","operationId":"EnrollmentAccounts_Get","parameters":[{"description":"Enrollment Account name.","in":"path","name":"name","required":true,"schema":{"type":"string"},"examples":{"EnrollmentAccountsGet":{"value":"e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556"}}},{"$ref":"#/components/parameters/apiVersionParameter"}],"responses":{"200":{"description":"OK. The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentAccount"},"examples":{"EnrollmentAccountsGet":{"$ref":"#/components/examples/EnrollmentAccountsGet"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["EnrollmentAccounts"]}},"/providers/Microsoft.Billing/operations":{"get":{"description":"Lists all of the available billing REST API operations.","operationId":"Operations_List","parameters":[{"$ref":"#/components/parameters/apiVersionParameter"}],"responses":{"200":{"description":"OK. The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationListResult"}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Operations"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods":{"get":{"description":"Lists the available billing periods for a subscription in reverse chronological order. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.","externalDocs":{"url":"https://go.microsoft.com/fwlink/?linkid=844490"},"operationId":"BillingPeriods_List","parameters":[{"$ref":"#/components/parameters/subscriptionIdParameter"},{"$ref":"#/components/parameters/apiVersionParameter"},{"description":"May be used to filter billing periods by billingPeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.","in":"query","name":"$filter","required":false,"schema":{"type":"string"}},{"description":"Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.","in":"query","name":"$skiptoken","required":false,"schema":{"type":"string"}},{"description":"May be used to limit the number of results to the most recent N billing periods.","in":"query","name":"$top","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK. The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPeriodsListResult"},"examples":{"BillingPeriodsList":{"$ref":"#/components/examples/BillingPeriodsList"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["BillingPeriods"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}":{"get":{"description":"Gets a named billing period. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.","operationId":"BillingPeriods_Get","parameters":[{"$ref":"#/components/parameters/subscriptionIdParameter"},{"$ref":"#/components/parameters/apiVersionParameter"},{"description":"The name of a BillingPeriod resource.","in":"path","name":"billingPeriodName","required":true,"schema":{"type":"string"},"examples":{"BillingPeriodsGet":{"value":"201702-1"}}}],"responses":{"200":{"description":"OK. The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPeriod"},"examples":{"BillingPeriodsGet":{"$ref":"#/components/examples/BillingPeriodsGet"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["BillingPeriods"]}},"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices":{"get":{"description":"Lists the available invoices for a subscription in reverse chronological order beginning with the most recent invoice. In preview, invoices are available via this API only for invoice periods which end December 1, 2016 or later. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.","externalDocs":{"url":"https://go.microsoft.com/fwlink/?linkid=842057"},"operationId":"Invoices_List","parameters":[{"$ref":"#/components/parameters/subscriptionIdParameter"},{"$ref":"#/components/parameters/apiVersionParameter"},{"description":"May be used to expand the downloadUrl property within a list of invoices. This enables download links to be generated for multiple invoices at once. By default, downloadURLs are not included when listing invoices.","in":"query","name":"$expand","required":false,"schema":{"type":"string"},"examples":{"InvoicesExpand":{"value":"downloadUrl"}}},{"description":"May be used to filter invoices by invoicePeriodEndDate. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.","in":"query","name":"$filter","required":false,"schema":{"type":"string"},"examples":{"InvoicesExpand":{"value":"invoicePeriodEndDate le 2017-02-01"}}},{"description":"Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.","in":"query","name":"$skiptoken","required":false,"schema":{"type":"string"}},{"description":"May be used to limit the number of results to the most recent N invoices.","in":"query","name":"$top","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"examples":{"InvoicesExpand":{"value":1}}}],"responses":{"200":{"description":"OK. The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicesListResult"},"examples":{"InvoicesExpand":{"$ref":"#/components/examples/InvoicesExpand"},"InvoicesList":{"$ref":"#/components/examples/InvoicesList"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Invoices"],"x-ms-pageable":{"nextLinkName":"nextLink"}}},"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/latest":{"get":{"description":"Gets the most recent invoice. When getting a single invoice, the downloadUrl property is expanded automatically. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.","operationId":"Invoices_GetLatest","parameters":[{"$ref":"#/components/parameters/subscriptionIdParameter"},{"$ref":"#/components/parameters/apiVersionParameter"}],"responses":{"200":{"description":"OK. The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"},"examples":{"InvoicesGetLatest":{"$ref":"#/components/examples/InvoicesGetLatest"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Invoices"]}},"/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}":{"get":{"description":"Gets a named invoice resource. When getting a single invoice, the downloadUrl property is expanded automatically. This is only supported for Azure Web-Direct subscriptions. Other subscription types which were not purchased directly through the Azure web portal are not supported through this preview API.","operationId":"Invoices_Get","parameters":[{"$ref":"#/components/parameters/subscriptionIdParameter"},{"$ref":"#/components/parameters/apiVersionParameter"},{"description":"The name of an invoice resource.","in":"path","name":"invoiceName","required":true,"schema":{"type":"string"},"examples":{"InvoicesGet":{"value":"2017-02-05-123456789"}}}],"responses":{"200":{"description":"OK. The request has succeeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"},"examples":{"InvoicesGet":{"$ref":"#/components/examples/InvoicesGet"}}}}},"default":{"description":"Error response describing why the operation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Invoices"]}}},"servers":[{"url":"https://management.azure.com"}],"components":{"examples":{"EnrollmentAccountsList":{"value":{"value":[{"id":"/providers/Microsoft.Billing/enrollmentAccounts/e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556","name":"e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556","properties":{"principalName":"kathy@contoso.com"},"type":"Microsoft.Billing/enrollmentAccounts"},{"id":"/providers/Microsoft.Billing/enrollmentAccounts/edd24053-07cd-4ed4-aa5b-326160a6680d","name":"edd24053-07cd-4ed4-aa5b-326160a6680d","properties":{"principalName":"dan@contoso.com"},"type":"Microsoft.Billing/enrollmentAccounts"}]}},"EnrollmentAccountsGet":{"value":{"id":"/providers/Microsoft.Billing/enrollmentAccounts/e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556","name":"e1bf1c8c-5ac6-44a0-bdcd-aa7c1cf60556","properties":{"principalName":"kathy@contoso.com"},"type":"Microsoft.Billing/enrollmentAccounts"}},"BillingPeriodsList":{"value":{"value":[{"id":"/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1","name":"201702-1","properties":{"billingPeriodEndDate":"2017-02-01","billingPeriodStartDate":"2017-01-01","invoiceIds":["/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789","/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-01-05-987654321"]},"type":"Microsoft.Billing/billingPeriods"}]}},"BillingPeriodsGet":{"value":{"id":"/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1","name":"201702-1","properties":{"billingPeriodEndDate":"2017-02-01","billingPeriodStartDate":"2017-01-01","invoiceIds":["/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789","/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-01-05-987654321"]},"type":"Microsoft.Billing/billingPeriods"}},"InvoicesExpand":{"value":{"value":[{"id":"/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789","name":"2017-02-05-123456789","properties":{"billingPeriodIds":["/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1","/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201701-1"],"downloadUrl":{"expiryTime":"2017-02-13T20:46:30Z","url":"https://microsoft.com"},"invoicePeriodEndDate":"2017-02-01","invoicePeriodStartDate":"2017-01-01"},"type":"Microsoft.Billing/invoices"}]}},"InvoicesList":{"value":{"value":[{"id":"/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789","name":"2017-02-05-123456789","properties":{"billingPeriodIds":["/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1","/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201701-1"],"invoicePeriodEndDate":"2017-02-01","invoicePeriodStartDate":"2017-01-01"},"type":"Microsoft.Billing/invoices"}]}},"InvoicesGetLatest":{"value":{"id":"/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789","name":"2017-02-05-123456789","properties":{"billingPeriodIds":["/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1","/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201701-1"],"downloadUrl":{"expiryTime":"2017-02-13T20:46:30Z","url":"https://microsoft.com"},"invoicePeriodEndDate":"2017-02-01","invoicePeriodStartDate":"2017-01-01"},"type":"Microsoft.Billing/invoices"}},"InvoicesGet":{"value":{"id":"/subscriptions/subid/providers/Microsoft.Billing/invoices/2017-02-05-123456789","name":"2017-02-05-123456789","properties":{"billingPeriodIds":["/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702-1","/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201701-1"],"downloadUrl":{"expiryTime":"2017-02-13T20:46:30Z","url":"https://microsoft.com"},"invoicePeriodEndDate":"2017-02-01","invoicePeriodStartDate":"2017-01-01"},"type":"Microsoft.Billing/invoices"}}},"parameters":{"apiVersionParameter":{"description":"Version of the API to be used with the client request. The current version is 2018-03-01-preview.","in":"query","name":"api-version","required":true,"schema":{"type":"string"},"examples":{"EnrollmentAccountsList":{"value":"2018-03-01-preview"},"EnrollmentAccountsGet":{"value":"2018-03-01-preview"},"BillingPeriodsList":{"value":"2018-03-01-preview"},"BillingPeriodsGet":{"value":"2018-03-01-preview"},"InvoicesExpand":{"value":"2018-03-01-preview"},"InvoicesList":{"value":"2018-03-01-preview"},"InvoicesGetLatest":{"value":"2018-03-01-preview"},"InvoicesGet":{"value":"2018-03-01-preview"}}},"subscriptionIdParameter":{"description":"Azure Subscription ID.","in":"path","name":"subscriptionId","required":true,"schema":{"type":"string"},"examples":{"BillingPeriodsList":{"value":"subid"},"BillingPeriodsGet":{"value":"subid"},"InvoicesExpand":{"value":"subid"},"InvoicesList":{"value":"subid"},"InvoicesGetLatest":{"value":"subid"},"InvoicesGet":{"value":"subid"}}}},"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":{"BillingPeriod":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"A billing period resource.","properties":{"properties":{"$ref":"#/components/schemas/BillingPeriodProperties"}},"type":"object"},"BillingPeriodProperties":{"description":"The properties of the billing period.","properties":{"billingPeriodEndDate":{"description":"The end of the date range covered by the billing period.","format":"date","readOnly":true,"type":"string"},"billingPeriodStartDate":{"description":"The start of the date range covered by the billing period.","format":"date","readOnly":true,"type":"string"},"invoiceIds":{"description":"Array of invoice ids that associated with.","items":{"type":"string"},"readOnly":true,"type":"array"}}},"BillingPeriodsListResult":{"description":"Result of listing billing periods. It contains a list of available billing periods in reverse chronological order.","properties":{"nextLink":{"description":"The link (url) to the next page of results.","readOnly":true,"type":"string"},"value":{"description":"The list of billing periods.","items":{"$ref":"#/components/schemas/BillingPeriod"},"readOnly":true,"type":"array"}}},"DownloadUrl":{"description":"A secure URL that can be used to download a PDF invoice until the URL expires.","properties":{"expiryTime":{"description":"The time in UTC at which this download URL will expire.","format":"date-time","readOnly":true,"type":"string"},"url":{"description":"The URL to the PDF file.","readOnly":true,"type":"string"}}},"EnrollmentAccount":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"An enrollment account resource.","properties":{"properties":{"$ref":"#/components/schemas/EnrollmentAccountProperties"}},"type":"object"},"EnrollmentAccountListResult":{"description":"Result of listing enrollment accounts.","properties":{"nextLink":{"description":"The link (url) to the next page of results.","readOnly":true,"type":"string"},"value":{"description":"The list of enrollment accounts.","items":{"$ref":"#/components/schemas/EnrollmentAccount"},"readOnly":true,"type":"array"}}},"EnrollmentAccountProperties":{"description":"The properties of the enrollment account.","properties":{"principalName":{"description":"The account owner's principal name.","readOnly":true,"type":"string"}}},"ErrorDetails":{"description":"The details of the error.","properties":{"code":{"description":"Error code.","readOnly":true,"type":"string"},"message":{"description":"Error message indicating why the operation failed.","readOnly":true,"type":"string"},"target":{"description":"The target of the particular error.","readOnly":true,"type":"string"}}},"ErrorResponse":{"description":"Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.","properties":{"error":{"$ref":"#/components/schemas/ErrorDetails"}},"type":"object"},"Invoice":{"allOf":[{"$ref":"#/components/schemas/Resource"}],"description":"An invoice resource can be used download a PDF version of an invoice.","properties":{"properties":{"$ref":"#/components/schemas/InvoiceProperties"}},"type":"object"},"InvoiceProperties":{"description":"The properties of the invoice.","properties":{"billingPeriodIds":{"description":"Array of billing period ids that the invoice is attributed to.","items":{"type":"string"},"readOnly":true,"type":"array"},"downloadUrl":{"$ref":"#/components/schemas/DownloadUrl"},"invoicePeriodEndDate":{"description":"The end of the date range covered by the invoice.","format":"date","readOnly":true,"type":"string"},"invoicePeriodStartDate":{"description":"The start of the date range covered by the invoice.","format":"date","readOnly":true,"type":"string"}}},"InvoicesListResult":{"description":"Result of listing invoices. It contains a list of available invoices in reverse chronological order.","properties":{"nextLink":{"description":"The link (url) to the next page of results.","readOnly":true,"type":"string"},"value":{"description":"The list of invoices.","items":{"$ref":"#/components/schemas/Invoice"},"readOnly":true,"type":"array"}}},"Operation":{"description":"A Billing REST API operation.","properties":{"display":{"description":"The object that represents the operation.","properties":{"operation":{"description":"Operation type: Read, write, delete, etc.","readOnly":true,"type":"string"},"provider":{"description":"Service provider: Microsoft.Billing.","readOnly":true,"type":"string"},"resource":{"description":"Resource on which the operation is performed: Invoice, etc.","readOnly":true,"type":"string"}}},"name":{"description":"Operation name: {provider}/{resource}/{operation}.","readOnly":true,"type":"string"}},"type":"object"},"OperationListResult":{"description":"Result listing billing operations. It contains a list of operations and a URL link to get the next set of results.","properties":{"nextLink":{"description":"URL to get the next set of operation list results if there are any.","readOnly":true,"type":"string"},"value":{"description":"List of billing operations supported by the Microsoft.Billing resource provider.","items":{"$ref":"#/components/schemas/Operation"},"readOnly":true,"type":"array"}}},"Resource":{"description":"The Resource model definition.","properties":{"id":{"description":"Resource Id.","readOnly":true,"type":"string"},"name":{"description":"Resource name.","readOnly":true,"type":"string"},"type":{"description":"Resource type.","readOnly":true,"type":"string"}},"x-ms-azure-resource":true}}}}