We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
Application DistributionAppGallery Connect (HarmonyOS 5 or Later)Open Capabilities of AppGallery ConnectAppGallery Connect APIProvisioning API ReferenceQuerying the Profile List

Querying the Profile List

Function

This API is used to query profiles you have requested.

Prototype

Protocol

HTTPS GET

Direction

Your server -> Huawei server

URL

https://connect-api.cloud.huawei.com/api/publish/v3/provision/list

Data Format

Request: Content-Type: application/json

Response: Content-Type: application/json

Request Parameters

Header

NOTE

This API supports both the API client and OAuth client modes. For details about their differences, please refer to Obtaining Authorization from the Server.

Service Account mode

Expand

Parameter

Mandatory

Type

Description

Authorization

Yes

String

Authorization information in Authorization: Bearer ${JWT} format. Here JWT is the authentication token obtained when you obtain authorization using the Service Account mode.

appId

Yes

String(32)

App ID. For details about how to obtain the app ID, please refer to Viewing App Information.

provisionId

No

String

Profile ID.

API client mode

Expand

Parameter

Mandatory

Type

Description

client_id

Yes

String

Client ID. For details about how to obtain the value, please refer to Creating an API Client.

Authorization

Yes

String

Authorization information in Authorization: Bearer ${access_token} format. In the format, access_token is obtained in Obtaining a Token.

appId

Yes

String(32)

App ID. For details about how to obtain the app ID, please refer to Viewing App Information.

provisionId

No

String

Profile ID.

OAuth client mode

Expand

Parameter

Mandatory

Type

Description

teamId

Yes

String(64)

ID of the team that you belong to.

oauth2Token

Yes

String

Authorization information. Pass the access token obtained via the API for obtaining an access token.

appId

Yes

String(32)

App ID. For details about how to obtain the app ID, please refer to Viewing App Information.

provisionId

No

String

Profile ID.

Query

Expand

Parameter

Mandatory

Type

Description

fromRecCount

No

Integer(32)

Start page number.

Default value: 1

maxReqCount

No

Integer(32)

Number of records returned on each page.

Value range: 1 to 100

Default value: 10

Request Example

Collapse
Word wrap
Dark theme
Copy code
  1. GET /api/publish/v3/provision/list?fromRecCount=1&maxReqCount=100 HTTP/1.1
  2. Host: connect-api.cloud.huawei.com
  3. client_id: 41******68
  4. Content-Type: application/json
  5. Authorization: Bearer ******
  6. appId: 691****117
  7. provisionId: 1443****504

Response Parameters

Expand

Parameter

Mandatory

Type

Description

ret

Yes

ConnectRet

Result code and description.

totalCount

No

Integer(32)

Total number of records.

provisionList

No

List<ProvisionInfo>

Profile information.

Response Example

Collapse
Word wrap
Dark theme
Copy code
  1. {
  2. "ret": {
  3. "code": 0,
  4. "msg": "success"
  5. },
  6. "totalCount": 0,
  7. "provisionList": [
  8. {
  9. "id": "14***************04",
  10. "provisionName": "testProvision",
  11. "provisionType": 1,
  12. "certName": "0614-debug",
  13. "deviceList": [
  14. {
  15. "id": "14***************80",
  16. "deviceName": "de******me",
  17. "udid": "111111111222****************************************333333444444",
  18. "deviceType": 1,
  19. "createTime": "2024-06-14 11:55:28.676"
  20. }
  21. ],
  22. "aclPermissionList": [
  23. ""
  24. ],
  25. "aclPermissionAuditState": 0,
  26. "provisionDownloadUrl": "https://****/CN/2024061412/1718367940748-6ef9436f-6cd0-4b65-a1df-62174c795b40.p7b?X-Amz-Algorithm=****",
  27. "updateTime": 1718363106749,
  28. "expireTime": 1844598288000,
  29. "appId": "69****117"
  30. }
  31. ]
  32. }

Call Example

Java sample code:

Collapse
Word wrap
Dark theme
Copy code
  1. public static JSONObject getProvisionList(String domain, String clientId, String token, String appId,
  2. String provisionId, Integer fromRecCount, Integer maxReqCount) {
  3. HttpGet get = new HttpGet(
  4. domain + "/publish/v3/provision/list?fromRecCount=" + fromRecCount + "&maxReqCount=" + maxReqCount);
  5. get.setHeader("Authorization", "Bearer " + token);
  6. get.setHeader("client_id", clientId);
  7. get.setHeader("appId", appId);
  8. get.setHeader("provisionId", provisionId);
  9. try {
  10. CloseableHttpClient httpClient = HttpClients.createDefault();
  11. CloseableHttpResponse httpResponse = httpClient.execute(get);
  12. int statusCode = httpResponse.getStatusLine().getStatusCode();
  13. if (statusCode == HttpStatus.SC_OK) {
  14. BufferedReader br = new BufferedReader(
  15. new InputStreamReader(httpResponse.getEntity().getContent(), Consts.UTF_8));
  16. String result = br.readLine();
  17. return JSON.parseObject(result);
  18. }
  19. } catch (Exception ignored) {
  20. }
  21. return null;
  22. }
Search in Distribute Apps
Enter a keyword.