Updated on 2023-09-01 GMT+08:00

Querying Instance Information

Description

After you create an instance, KooGallery queries the instance information based on the instance ID.

  • The following figure shows the process of querying instance information.

Request Message

The following table describes the request parameters.

Request method: POST

Parameter

Mandatory

Type

Maximum Length

Description

activity

Yes

String

20

Request ID, which is used to distinguish the scenario.

In the upgrade scenario, the value is queryInstance.

instanceId

Yes

String

100

Instance IDs separated by commas (,). Up to 100 instances can be queried at a time.

testFlag

No

String

2

Whether a request is submitted for debugging.

  • 1: debugging request.
  • 0: non-debugging request.

The default value is 0.

Example request:

curl -X POST 'https://www.isvwebsite.com/saasproduce?signature=9C61F188C3C2889C2DD201B00E42041BDCE4751F**********A7829C&timestamp=1680508237508&nonce=9FB42E04DF4594B1FAA50B304E647AD7154AB9B4F144A65F1168886540A8B24C' -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -d'{"activity":"queryInstance","instanceId":"10e758d0********-81d03469a10e","testFlag":"0"}'

Response Message

The following table describes the response parameters.

Parameter

Mandatory

Type

Maximum Length

Description

resultCode

Yes

String

6

Invocation result code.

For details, see Result Codes.

resultMsg

No

String

255

Invocation result description.

info

No

InstanceInfo[]

  

Instance details.

The following table describes the InstanceInfo data structure.

Parameter

Mandatory

Type

Maximum Length

Description

instanceId

Yes

String

64

Instance ID.

appInfo

No

AppInfo

N/A

Application instance information.

After a customer purchases a product, you need to return the login address (website address) or an address that does not require login for the customer to perform subsequent operations.

NOTE:

You must provide customers who purchase your SaaS products with the application usage information, including the addresses, accounts, and passwords.

If the usage information can be sent through SMS messages, emails, or other methods, this parameter is not required in the API response. Otherwise, this parameter must be returned in the API response.

You can use the memo parameter to specify usage instructions or other information if any.

For details about the appInfo data structure, see the following table.

The following table describes the AppInfo data structure.

Parameter

Mandatory

Type

Maximum Length

Description

frontEndUrl

Yes

String

512

Frontend URL.

URL of the website that the customer can access to use the purchased product.

adminUrl

No

String

512

Management URL.

URL of the backend website that the customer can access to manage the purchased product.

userName

No

String

128

Administrator account.

password

No

String

128

Initial password of the administrator.

memo

No

String

1024

Remarks.

Example response:

{
    "resultCode": "000000",
    "resultMsg": "success.",
    "encryptType": "1",
    "Info": [
{
            "instanceId": "huawei*******",
            "appInfo": {
                "frontEndUrl": "https://www.******.com",
                "userName": "3Zpq806E2********ipbcQ==",
                "password": "x4E1********7TDxbv4babJM+MQ==",
                "memo": "Test"
}
            ]