All Products
Document Center

Batch Compute:listApps

Last Updated:May 11, 2018

Method description:

Lists Apps, including public and private Apps.

Call method

  1. ListAppsResponse listApps(String scope) throws ClientException;
  2. ListAppsResponse listApps(String scope, String marker, int maxItemCount) throws ClientException;
  3. ListAppsResponse listApps(ListAppsRequest req) throws ClientException;

Parameter description

Parameter Type Required Description
scope String No Optional values include Public and Private. If the value is Public, public Apps are queried. If the value is Private or not specified, private Apps are queried.
marker String No Marker used for paging query. Default value: null
maxItemCount Number No Maximum number of items queried this time. It must be an integer between 1 and 100. Default value: 50

Response description

  • If the call succeeds, a ListAppsResponse instance is returned. You can use the getItems method to obtain List.

  • For descriptions about App attributes, see Obtain App information.

  • If the call fails, a ClientException is thrown.

Sample code

  1. try{
  2. ListAppsResponse listAppsResponse = client.listApps("Public");
  3. List<App> list = listAppsResponse.getItems();
  4. //The method is successfully called.
  5. }catch(ClientException e){
  6. e.printStackTrace();
  7. //The method fails to be called.
  8. }