Interface IEnvironmentsApi

Hierarchy

  • IEnvironmentsApi

Implemented by

Methods

  • Clones data (creates a copy) from a source specified environment into a different target environment in the same project. The target environment can be a new environment or an existing environment. For existing environments, the user must specify a conflict strategy - meaning what the system should do in case a copied object conflicts with an existing object (with the same key) in the target environment. The system can overwrite all the conflicting objects, or fail (and cancel the copy) when encountering the first conflict.

    Parameters

    • projectKey: string

      The project key.

    • environmentKey: string

      The environment key.

    • copyParams: EnvironmentCopy

      The parameters for copying the environment.

    Returns Promise<EnvironmentRead>

    A promise that resolves to an EnvironmentRead object representing the copied environment.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Deletes an environment.

    Parameters

    • projectKey: string

      The project key.

    • environmentKey: string

      The environment key.

    Returns Promise<void>

    A promise that resolves when the environment is successfully deleted.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Gets an environment by project key and environment key.

    Parameters

    • projectKey: string

      The project key.

    • environmentKey: string

      The environment key.

    Returns Promise<EnvironmentRead>

    A promise that resolves to an EnvironmentRead object representing the retrieved environment.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Retrieves the API key that grants access for an environment (and only the requested environment). Must be requested with an organization-level api key.

    Parameters

    • projectKey: string

      The project key.

    • environmentKey: string

      The environment key.

    Returns Promise<APIKeyRead>

    A promise that resolves to an APIKeyRead object containing the API key and its metadata.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Gets an environment by project ID and environment ID. Alias for the get method.

    Parameters

    • projectId: string

      The project ID.

    • environmentId: string

      The environment ID.

    Returns Promise<EnvironmentRead>

    A promise that resolves to an EnvironmentRead object representing the retrieved environment.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Gets an environment by project key and environment key. Alias for the get method.

    Parameters

    • projectKey: string

      The project key.

    • environmentKey: string

      The environment key.

    Returns Promise<EnvironmentRead>

    A promise that resolves to an EnvironmentRead object representing the retrieved environment.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Retrieves statistics and metadata for an environment.

    Parameters

    • projectKey: string

      The project key.

    • environmentKey: string

      The environment key.

    Returns Promise<EnvironmentStats>

    A promise that resolves to an EnvironmentStats object representing the statistics data.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

  • Updates an existing environment.

    Parameters

    • projectKey: string

      The project key.

    • environmentKey: string

      The environment key.

    • environmentData: EnvironmentUpdate

      The data for updating the environment.

    Returns Promise<EnvironmentRead>

    A promise that resolves to an EnvironmentRead object representing the updated environment.

    Throws

    PermitApiError If the API returns an error HTTP status code.

    Throws

    PermitContextError If the configured ApiContext does not match the required endpoint context.

Generated using TypeDoc