This document is new for the Knox cloud services 26.10 UAT.
On this tab
The Knox Configure v2 APIs provide functionalities to manage applications available to your enrolled devices. This tutorial shows you how to retrieve applications, retrieve application details, upload a public application, upload an in-house application, generate an application download URL, and delete applications.
Prerequisites
Ensure that you have the necessary permissions to manage applications and obtain an authentication token. For more information, see Get started. Include your access token in the Authorization: Bearer <access_token> header of every request. Access tokens expire after 30 minutes.
Retrieve applications
-
To retrieve a list of all applications in your tenant, make a GET request to the /kc/v2/applications endpoint. This operation requires the
kc.application:viewscope. -
In the request, you can make use of the following optional query parameters:
- applicationIds — A list of up to 20 application IDs to filter by.
- name — Search by application name. Partial string matches are allowed.
- source — The source of the application. Possible values are
InHouseandGooglePlayStore. - packageName — Package name of the app to be retrieved.
- sortBy — The value that results are sorted by. Possible values are
createTime,updateTime, andpackageVersion. - sortOrder — The order by which results are returned. Possible values are
ascendinganddescending. - pageNum — Page number to retrieve. The indexing count starts at 0.
- pageSize — Number of applications to return at once. The default value is 25.
For example, the following request retrieves all applications from the Google Play Store, sorted by updateTime in descending order:
GET /kc/v2/applications?source=GooglePlayStore&sortBy=updateTime&sortOrder=descending&pageNum=0&pageSize=25
You can modify the query parameters to reflect the specific applications you want to retrieve. For detailed response schema, see GET /kc/v2/applications.
Retrieve application details
-
To retrieve detailed information about a specific application, including its version history, file size, MD5 checksum, thumbnail URL, and processing status, make a POST request to the /kc/v2/applications/getDetail endpoint. This operation requires the
kc.application:viewscope. -
In the request body, provide either of the following parameters:
- applicationId — The ID of the application to be retrieved. Either
applicationIdorpackageNamemust be provided. - packageName — Package name of the app to be retrieved. Either
applicationIdorpackageNamemust be provided.
- applicationId — The ID of the application to be retrieved. Either
For example, the following request body retrieves the details of the application with ID 120067:
{
"applicationId": "120067"
}
You can adjust the identifier based on the application you want to inspect. For detailed response schema, see POST /kc/v2/applications/getDetail.
Upload a public application
-
To upload one or more public applications from the Google Play Store, make a POST request to the /kc/v2/applications/googleplayApplications endpoint. This operation requires the
kc.application:managescope. -
In the request body, provide an
appsarray, where each item has the following parameters:- description — Description of the app in the Google Play Store.
- url — URL of the app in the Google Play Store.
For example, the following request body uploads a single public application:
{
"apps": [
{
"description": "Samsung health",
"url": "https://play.google.com/store/apps/details?id=com.sec.android.app.shealth"
}
]
}
The response reports each app’s outcome separately, with a successResponse array (containing the new applicationId for each successfully uploaded app) and an errorResponse array (containing the error code and message for each app that failed), so you can upload a batch of apps and handle partial failures individually. For detailed response schema, see POST /kc/v2/applications/googleplayApplications.
Upload an in-house application
-
To upload an in-house application, make a POST request to the /kc/v2/applications/inhouseApplications endpoint using
multipart/form-data. This operation requires thekc.application:managescope. -
In the request, provide the following parameters:
- file — The APK file of the app to be uploaded to the server. This is a required parameter in the
multipart/form-databody. The filename of the app is used as its name in Knox Configure. - description — Description of the in-house app to be uploaded. This is an optional query parameter.
- file — The APK file of the app to be uploaded to the server. This is a required parameter in the
The response includes the new applicationId and a status field, which is one of InProgress (the app is being processed), Deployable (the app is ready for deployment), or Failed. For detailed response schema, see POST /kc/v2/applications/inhouseApplications.
Generate an application download URL
-
To generate a temporary download URL for an application, make a POST request to the /kc/v2/applications/{applicationId}/downloadUrl endpoint. This operation requires the
kc.application:managescope. -
In the request, specify the
applicationIdas a path parameter.
For example, the following request generates a download URL for the application with ID 120067:
POST /kc/v2/applications/120067/downloadUrl
You can adjust the application ID based on the application you want a download URL for. For detailed response schema, see POST /kc/v2/applications/{applicationId}/downloadUrl.
Delete applications
-
To delete one or more applications from your tenant, make a DELETE request to the /kc/v2/applications endpoint. This operation requires the
kc.application:managescope. -
In the request, you can use the following query parameters:
- applicationIds — A list of application IDs of apps to be deleted. If
packageNameis also provided, the application IDs must be under that package name. - packageName — Package name of the app to be deleted.
- applicationIds — A list of application IDs of apps to be deleted. If
For example, the following request deletes the applications with IDs 120067 and 120068:
DELETE /kc/v2/applications?applicationIds=120067&applicationIds=120068
If some applications fail to be deleted, the response returns a 207 status with a failedApplicationIds list identifying which ones. For detailed response schema, see DELETE /kc/v2/applications.
Ensure that you check the code and message in the response for any errors and handle them appropriately for your app. See Error codes for the full list of Knox Configure error codes. For detailed specification, see Knox Configure API reference.
Is this page helpful?
Thank you for your feedback!