Billing Account API
The Notehub billing account API provides RESTful methods that can be used to retrieve data related to Notehub billing accounts.
Name | HTTP Request |
---|---|
Get Billing Accounts | GET /v1/billing-accounts |
Get Billing Accounts Notehub
Get an array of Notehub billing accounts associated with a generated authentication token.
HTTP Method: | GET |
URL: | https://api.notefile.net/v1/billing-accounts |
Minimum Notehub project-level role: | viewer |
Required HTTP Headers: | Authorization: Bearer <access_token> , where the access token is a Notehub API bearer token. |
curl -X GET
-L 'https://api.notefile.net/v1/billing-accounts'
-H 'Authorization: Bearer <access_token>'
import * as NotehubJs from "@blues-inc/notehub-js";
let defaultClient = NotehubJs.ApiClient.instance;
// Configure API key authorization: api_key
let api_key = defaultClient.authentications["api_key"];
api_key.apiKey = "YOUR API KEY";
let apiInstance = new NotehubJs.BillingAccountApi();
apiInstance.getBillingAccounts().then(
(data) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
},
(error) => {
console.error(error);
}
);
import notehub_py
from notehub_py.models.get_billing_accounts200_response import GetBillingAccounts200Response
from notehub_py.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.notefile.net
configuration = notehub_py.Configuration(
host = "https://api.notefile.net"
)
# Configure API key authorization: api_key
configuration.api_key["api_key"] = os.environ["API_KEY"]
# Enter a context with an instance of the API client
with notehub_py.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = notehub_py.BillingAccountApi(api_client)
try:
api_response = api_instance.get_billing_accounts()
print("The response of BillingAccountApi->get_billing_accounts:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling BillingAccountApi->get_billing_accounts: %s\n" % e)
Response Members
uid
string
The globally-unique identifier of the billing account.
name
string
The name of the billing account.
role
The role of the billing account:
billing_admin
Full administrative privileges to purchase credits, setup
auto-recharge and invite members.
billing_manager
Access to invite members is restricted.
project_creator
Access is limited to creating projects within a billing
account.
{
"billing_accounts": [
{
"uid": "00000000-0000-0000-0000-000000000000",
"name": "Jane's Billing Account",
"role": "billing_admin"
},
{
"uid": "00000000-0000-0000-0000-000000000000",
"name": "John's Billing Account",
"role": "billing_manager"
}
]
}