getPlatformProjectsByProjectApps method

Future<List<AppView>?> getPlatformProjectsByProjectApps(
  1. String project
)

Returns the applications in one project, with what the cluster says about them.

Returns the applications in one project, with what the cluster says about them. It lists the caller org's applications under one project. Each row carries the stored record and, for an app that is live or deploying, the LIVE phase and health read from its operator Service CR; an app with sealed env also carries its secret-sync state. Those cluster reads are best-effort — an unreachable cluster leaves those fields empty and never blocks the listing. The project must exist in IAM for this org, or the answer is 404; the default project is implicit and always accepted, because it is part of what an org IS. Requires a validated principal; 403 without one.

Parameters:

  • String project (required): Project is the project's name, from the path.

Implementation

Future<List<AppView>?> getPlatformProjectsByProjectApps(String project,) async {
  final response = await getPlatformProjectsByProjectAppsWithHttpInfo(project,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    final responseBody = await _decodeBodyBytes(response);
    return (await apiClient.deserializeAsync(responseBody, 'List<AppView>') as List)
      .cast<AppView>()
      .toList(growable: false);

  }
  return null;
}