API Description
Before releasing a SaaS product to KooGallery, develop a production API on your server by referring to this access guide.
- You can configure only one production API address for a SaaS product to accommodate different scenarios, including instance creation, query, update, release, and upgrade.
- Before releasing a yearly/monthly/daily product, implement the APIs for instance creation, query, update, status update, and release. In addition, call the KooGallery API for querying an order.
- Before releasing a product billed by one-time payment, implement the APIs for instance creation, query, and release. In addition, call the KooGallery API for querying an order.
- If a product can be upgraded, implement the API for instance upgrade.
API Calling Scenarios
- Instance creation: A customer purchases and pays for a product.
- KooGallery calls the instance creation API to ask you to create an instance based on the order ID.
- After receiving the request, your system calls the KooGallery API for querying an order to obtain the subscription information and subscribe to the instance.
- KooGallery calls the instance query API to obtain instance information.
- Instance query: Queries information about an instance (instanceId).
- After obtaining the instance ID (instanceId) returned by the instance creation API, KooGallery continuously calls the instance query API until the seller successfully returns the instance information.
- When a customer queries resource information in KooGallery, KooGallery synchronously calls the instance query API and returns the information.
- Instance update: Customers change their trial use to commercial use, renew their resources, or cancel their renewals.
- KooGallery calls the instance update API to notify the seller system of the resource expiration time. The seller system performs the corresponding action and returns the execution result to KooGallery.
- Instance status update: If an instance of a customer expires or the customer violates regulations, the instance will be frozen. After the instance is renewed or the violation is canceled, the instance will be unfrozen.
- KooGallery calls the instance status update API to ask the seller system to freeze or unfreeze the corresponding resource and returns the execution result to KooGallery.
After an order expires, the resource is frozen for 15 days. During the frozen period, the resource cannot be used, but the customer can renew the order to unfreeze the resource. Therefore, the seller needs to set a 15-day frozen period for SaaS products and retain the customer data during that period.
- Instance release: A customer releases an instance of a purchased product (in scenarios such as no renewal upon expiration and unsubscription).
- KooGallery calls the instance release API to ask the seller system to release the corresponding resource and returns the execution result to KooGallery.
- Instance upgrade: A customer upgrades purchased resources and pays for the upgrade order.
- KooGallery calls the instance upgrade API to ask the seller system to upgrade the corresponding resource.
- The seller system calls the order query API of KooGallery to obtain the upgrade information, upgrades the instance, and returns the execution result to KooGallery.
API Failure Scenarios and Retry Mechanism
If an API fails to respond, the system sends an email to the email address bound to your KooGallery account. You can query the exception information on the Service Interface Messages page of the Seller Console. Handle the exceptions as soon as possible to avoid unsubscription due to order failure.
- When the instance creation API fails to be called,
- if service supervision is involved, KooGallery retries to call the API for 3 consecutive hours (once an hour) and sends a notification each time the API fails to be called. During this period, you can click Restart in the Operation column on the right of the order on the Service Interface Messages page. If the API exception persists after 3 hours, the system determines that the order fails and cancels the order.
- if service supervision is not involved, KooGallery retries to call the API for 3 consecutive hours (once every 3 minutes) and sends a notification every five times the API fails to be called. During this period, you can click Restart in the Operation column on the right of the order on the Service Interface Messages page. If the API exception persists after 3 hours, the system determines that the order fails and cancels the order.
- When the instance update API fails to be called, KooGallery retries to call it for one hour. You can query the exception information on the Service Interface Messages page of the Seller Console. After rectifying the exception, click Restart in the Operation column on the right of the order on the Service Interface Messages page.
- When the instance status update API fails to be called, KooGallery retries to call it for one hour. You can query the exception information on the Service Interface Messages page of the Seller Console. After rectifying the exception, click Restart in the Operation column on the right of the order on the Service Interface Messages page.
- When the instance upgrade API fails to be called,
- if service supervision is involved, KooGallery retries to call the API for 3 consecutive hours (once an hour) and sends a notification each time the API fails to be called. During this period, you can click Restart in the Operation column on the right of the order on the Service Interface Messages page. If the API exception persists after 3 hours, the system determines that the order fails and cancels the order.
- if service supervision is not involved, KooGallery retries to call the API for 3 consecutive hours (once every 3 minutes) and sends a notification every five times the API fails to be called. During this period, you can click Restart in the Operation column on the right of the order on the Service Interface Messages page. If the API exception persists after 3 hours, the system determines that the order fails and cancels the order.
- If an API fails to respond, an email, SMS message, or private message will be sent to you. Check the email address and mobile number bound to your account and the Message Center on Huawei Cloud.
- If more than five orders of a product failed in a month due to API failures, KooGallery will remove the product from the catalog.
- If an order is automatically canceled due to an API failure, contact the customer at the earliest to handle the problem.
- If a customer can still use expired resources due to an API failure, you shall bear the resource loss incurred.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.