Updated on 2024-06-12 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

Body parameters

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 each 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=9C61F188C3C2889C2DD201B00E42041BDCE4751F31E35805DE412969F0A7829C&timestamp=1680508237508&nonce=9FB42E04DF4594B1FAA50B304E647AD7154AB9B4F144A65F1168886540A8B24C' -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -d'{"activity":"queryInstance","instanceId":"10e758d0-31ad-4c4b-8f1b-81d03469a10e","testFlag":"0"}'

Response Message

The following table describes the response parameters.

Parameter

Mandatory

Type

Maximum Length

Description

resultCode

Yes

String

6

Result code.

For details, see Result Codes.

resultMsg

No

String

255

Result message.

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

App instance information.

After a customer purchases a product, return a 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 app 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 response. Otherwise, the app instance information must be returned in the 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

1,024

Remarks.

Example response:

{
    "resultCode": "000000",
    "resultMsg": "success.",
    "Info": [
{
            "instanceId": "huaweitest123",
            "appInfo": {
                "frontEndUrl": "https://www.baidu.com",
                "userName": "zhangsan123",
                "password": "zhangsan123",
                "memo": "Test"
}
            ]
}