/v2/miniprogram/app/info/list/query
POST /v2/miniprogram/app/info/list/query
This API is used by the super app to inquire about the details of the mini program list.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Request parameters
Field | Data type | Required | Description | Example |
queryStartIndex | Integer | No | Indicates the starting index to query the mini program list. Value range: 0 - unlimited Note:
| 0 |
querySize | Integer | No | Indicates how many mini programs to query. By default, the value is If both queryStartIndex and querySize are not specified, the data of the first 50 mini programs is returned no matter how many times this API is called. Value range: 0 - 50 | 1 |
orderKey | String | No | Indicates how mini programs are sorted, for example, by mini program ID or by release time. By default, the value is Valid values are:
| "APP_NAME" |
orderType | String | No | Indicates that mini programs are sorted in ascending or descending order. By default, the value is Valid values are:
| "DESC" |
userId | String | No | Indicates the unique ID assigned by the super app to identify a user.
| - |
relatedEnv | String | No | Indicates the related environment where a mini program is released. By default, the value is Valid values are:
| "prod" |
deviceInfo | No | Indicates the information of the client device or the super app on which a mini program is running. | - | |
appName | String | No | Indicates the name of a mini program. Fuzzy matching is used in the query.
| - |
appSlogan | String | No | Indicates the tagline of a mini program. Fuzzy matching is used in the query.
| - |
appStatus | String | No | Indicates the status of a mini program. | "init"/"online" |
keyword | String | No | Indicates the keyword that is used for querying the mini program list. | "appName1" |
Response parameters
Field | Data type | Required | Description | Example |
result | Yes | Indicates the request result, such as status and error codes. | - | |
endIndex | Integer | Yes | Indicates the end position of the current data in the mini program list that match the query. When endIndex is greater than totalCount, there is no data on the next page. Value range: 0 - unlimited | 0 |
totalCount | Integer | Yes | Indicates how many mini programs that match the query. Value range: 0 - unlimited | 57 |
appInfoDetails | Array<DeployAppInfo> | No | Indicates the list of the mini programs. An empty array is returned when the mini program queried by specifying the appName, appSlogan, or relatedEnv parameters does not exist. Maximum size: 50 elements | - |
Result process logic
In the response, the result.resultStatus
field indicates the result of processing a request. The following table describes each result status:
resultStatus | Description |
S | The request to query the mini program list is successful. The corresponding |
U | The status of the request to query the mini program list is unknown. The corresponding |
F | The request to query the mini program list failed. The corresponding |
Error codes
Error codes are usually classified into the following categories:
- Common error codes are common for all mini program OpenAPIs in V2.
- API-specific error codes: This API does not have its dedicated error codes.
Samples
The data flow of sending a request to query the mini program list is illustrated as follows:
- The super app server calls this API to send a request to Mini Program Platform for querying the mini program list.
- Mini Program Platform processes the request.
- Mini Program Platform returns the data to the super app server in JSON format.
Request
{
"orderKey": "APP_NAME",
"orderType": "DESC",
"querySize": 1,
"queryStartIndex": 0,
"deviceInfo": {
"***": "***"
},
"userId": "***",
"relatedEnv": "prod",
"appName": "appName"
}
Response
{
"appInfoDetails": [
{
"appDescription": "test",
"appId": "2102010113769***",
"appName": "test",
"appSlogan": "test",
"categoryDetails": [
{
"categoryId": "1000",
"categoryName": "Others"
}
],
"createTime": "1660133170000",
"deployVersion": "1.0.2.1660133170552",
"developerVersion": "1.0.2",
"iconUrl": "https://oss-local-nightly.marmot-cloud.com/storage/gmpop-test/2021/03/30/b7b8ab3a26e74f96bfb8ae44ceff814c/5b78c3117acaa05f42e194b4e12a96a3.jpg",
"packageSize": 52152,
"publishTime": "1660133171000",
"relatedClientId": "demo",
"relatedEnv": "prod",
"relatedWorkspaceId": "210220900020010606065",
"searchKeywords": [
"3432"
],
"serviceEmail": "test@163.com",
"serviceTel": "+355-232342344",
"releaseStatus": "ONLINE"
}
],
"endIndex": 0,
"result": {
"resultCode": "SUCCESS",
"resultMessage": "Success",
"resultStatus": "S"
},
"totalCount": 57
}