#
View Source Ash.Api.Info (ash v2.14.2)

Introspection tools for Ash.Api

# Link to this section Summary

## Functions

allow(api)

The allow MFA for an api

allow_unregistered?(api)

Whether or not the api allows unregistered resources to be used with it

authorize(api)

When authorization should happen for a given api

depend_on_resources(api)

Gets the resources of an Api module. Can be used at compile time.

description(api)

The description of the api

find_manage_relationships_with_identity_not_configured(otp_app)
registry(api)

The resource registry for an api

require_actor?(api)

Whether or not the actor is always required for an api

resource(api, resource)

Returns `{:ok, resource}` if the resource can be used by the api, or `{:error, error}`.

resources(api)

Gets the resources of an Api module. DO NOT USE AT COMPILE TIME.

short_name(api)

The short name for an api

span_name(api, resource, action)

The span_name for an api and resource combination

telemetry_event_name(api, name)

Names a telemetry event for a given api/resource combo

timeout(api)

The execution timeout for an api

trace_name(api)

The trace name for an api

# Link to this section Functions

Link to this function

# allow(api)

View Source

    @spec allow(Ash.Api.t() | Spark.Dsl.t()) :: mfa() | nil

The allow MFA for an api

Link to this function

# allow_unregistered?(api)

View Source

    @spec allow_unregistered?(Ash.Api.t() | Spark.Dsl.t()) :: atom() | nil

Whether or not the api allows unregistered resources to be used with it

Link to this function

# authorize(api)

View Source

    @spec authorize(Ash.Api.t()) :: :when_requested | :always | :by_default

When authorization should happen for a given api

Link to this macro

# depend_on_resources(api)

View Source (macro)

    @spec depend_on_resources(Macro.t()) :: Macro.t()

Gets the resources of an Api module. Can be used at compile time.

Liberal use of this can greatly increase compile times, or even cause compiler deadlocks. Use with care.

Link to this function

# description(api)

View Source

    @spec description(Spark.Dsl.t() | Ash.Api.t()) :: String.t() | nil

The description of the api

Link to this function

# find_manage_relationships_with_identity_not_configured(otp_app)

View Source
Link to this function

# registry(api)

View Source

    @spec registry(Ash.Api.t()) :: atom() | nil

The resource registry for an api

Link to this function

# require_actor?(api)

View Source

    @spec require_actor?(Ash.Api.t()) :: boolean()

Whether or not the actor is always required for an api

Link to this function

# resource(api, resource)

View Source

    @spec resource(Ash.Api.t() | Spark.Dsl.t(), Ash.Resource.t()) ::
      {:ok, Ash.Resource.t()} | {:error, Ash.Error.t()}

Returns `{:ok, resource}` if the resource can be used by the api, or `{:error, error}`.

Link to this function

# resources(api)

View Source

    @spec resources(Ash.Api.t()) :: [Ash.Resource.t()]

Gets the resources of an Api module. DO NOT USE AT COMPILE TIME.

If you need the resource list at compile time, use `depend_on_resources/1`

Link to this function

# short_name(api)

View Source

    @spec short_name(Ash.Api.t()) :: atom()

The short name for an api

Link to this function

# span_name(api, resource, action)

View Source

    @spec span_name(Ash.Api.t(), Ash.Resource.t(), action :: atom() | binary()) ::
      String.t()

The span_name for an api and resource combination

Link to this function

# telemetry_event_name(api, name)

View Source

    @spec telemetry_event_name(Ash.Api.t(), atom() | [atom()]) :: [atom()]

Names a telemetry event for a given api/resource combo

Link to this function

# timeout(api)

View Source

    @spec timeout(Ash.Api.t()) :: nil | :infinity | integer()

The execution timeout for an api

Link to this function

# trace_name(api)

View Source

    @spec trace_name(Ash.Api.t()) :: String.t()

The trace name for an api