getPlatformApps method

Future<DeclaredResp?> getPlatformApps({
  1. String? org,
})

Answers what this organisation has declared, joined with what the delivery plane has done about it.

Answers what this organisation has declared, joined with what the delivery plane has done about it. The join is best-effort BY DESIGN and says so when it is missing: the declarations ARE the answer to "what have I deployed", so refusing the whole board because the cluster is unreadable would lose the half that is readable. What must never happen is a silent null — an unreadable plane is reported as cd.unavailable carrying the reason, never as an app with no reconciliation.

Parameters:

  • String org: Org names the organisation whose declarations to read, defaulting to the caller's own. Only a SuperAdmin may name one that is not theirs; anyone else naming a foreign org is refused, so this widens nothing by itself.

Implementation

Future<DeclaredResp?> getPlatformApps({ String? org, }) async {
  final response = await getPlatformAppsWithHttpInfo( org: org, );
  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) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeclaredResp',) as DeclaredResp;

  }
  return null;
}