Waiting for engine...
Skip to main content

useFetchEnvironments()

useFetchEnvironments(

integrationPackId: string
,
includeEnvironments?: EnvironmentType
,
environmentId?: null \\| string
):
{ environments, isLoading, error }

Fetches environments from the Boomi API using classification (PROD/TEST/ALL) or a specific environment ID. When available, enriches environments with Atom attachments and computes an isActive flag (true if all attached Atoms are ONLINE).

Throws

If required context (Boomi SDK, apiAccountId) or parameters are missing.

Parameters

integrationPackId

The ID of the integration pack for which environments are being fetched.

includeEnvironments

Optional environment classification filter ("PROD", "TEST", "ALL").

environmentId

null | string

Returns

{ environments: any[]; isLoading: boolean; error: null | string; }

An object containing the fetched environments with metadata, loading state, and any error.

environments
any

isLoading
boolean

error
string

On this Page