client portal Guide
client portal: API Integration Guide #
The BESTNET-CLOUD client portal provides an HTTP REST API. You can automate, from your own programs, the review and operation of your account information and contracted services. All responses are returned as JSON.
Prerequisites #
- You can log in to the client portal
- The account using the API has access permission to the target service
- Communication must always use HTTPS (never send credentials in plaintext)
API basics #
Base URL
Each method is provided under https://hb.bestnetllc.co.jp/api/.
Data format
Requests use HTTP (GET / POST / PUT / DELETE), and responses are JSON.
Interactive reference
From “API” in the portal’s left menu, you can review all methods and code examples in bash / php / python.
Authentication #
The API supports Basic authentication. Concatenate your client area email address and password with a : (colon), Base64-encode the value, and send it in the Authorization header.
# -u オプションでリクエストごとに認証情報を送信します
curl 'https://hb.bestnetllc.co.jp/api/details' \
-u "your-email@example.com:your-password"
When using tokens, you can obtain a token with POST /login, refresh it with POST /token, and revoke it with POST /revoke.
Opening the API reference #
1. Open “API” in the portal’s left menu #
- Log in to the client portal.
- Click “API” at the bottom of the left menu.
- The API Reference opens. Select a method in the left menu, and in the right pane review the required parameters and code examples in bash / php / python.
- You can also obtain the Swagger JSON from download at the top of the screen.
Main method groups available #
The API consists of about 135 methods classified by purpose.
Clientarea
Login / token, retrieving and updating user information, operation logs, contact management, affiliate information, and more.
Billing
Retrieving payment-related information such as invoices, payments, and credit balance.
Services
Retrieving the list and details of your contracted services, and operations related to services.
Domains
Retrieving the list and details of domains, and domain-related operations.
SSL Certificates
Reviewing and managing SSL certificates.
Support
Retrieving, creating, and replying to support tickets.
Cart
Creating and confirming new orders (cart).
DNS
Retrieving and managing DNS zones and records.
Request examples #
These are examples of representative endpoints. For the complete list and parameters, refer to the API Reference in the portal.
| Purpose | Method | Path |
|---|---|---|
| Retrieve account information | GET | /api/details |
| Login (obtain token) | POST | /api/login |
| Retrieve operation logs | GET | /api/logs |
| Retrieve the contact list | GET | /api/contact |
| Add a contact | POST | /api/contact |
# アカウント情報(details)を取得する例
curl 'https://hb.bestnetllc.co.jp/api/details' \
-u "your-email@example.com:your-password"
Notes #
Make HTTPS mandatory
To protect credentials, always make API calls over HTTPS.
Scope of permissions
The range you can retrieve and operate depends on the permissions of the logged-in account and your contract.
Caution with production operations
Create, update, and delete methods are reflected in real data. Verify automation scripts thoroughly before use.
Troubleshooting #
401 Unauthorized is returned
Check whether the email address / password or the Base64 encoding result is correct. The Basic authentication header format is Authorization: Basic <base64>.
JSON is not returned / HTML is returned
Check the endpoint path and HTTPS. Methods that require login also require credentials.
The method is not found
Paths and parameters may be updated. Check the latest definitions in the portal’s API Reference.