EndPointBlank.Management.ClientGrants (end_point_blank_elixir v0.12.0)

Copy Markdown View Source

/api/v1/clients/:client_id/grants: the grants a client holds from you directly (not through an API package), or is set up to get when it accepts.

A grant is %{"id", "client_organization_id", "target_application_id", "target_endpoint_id", "all_endpoints", "environment_id", "also_granted_by_api_package_ids", "synced_at", "status", "refusal", "inserted_at", "updated_at"}.

Summary

Functions

Grants a client one endpoint of your application, or all of them. attrs: target_application_id and environment_id (required), target_endpoint_id (omit for every endpoint). Options: idempotency_key:.

Revokes a direct grant: %{"id", "deleted" => true, "still_granted_by_package"}. When "still_granted_by_package" is true the client keeps the access through an API package.

One page of a client's direct grants. Options: limit:, after:.

Functions

create(client, client_id, attrs, opts \\ [])

Grants a client one endpoint of your application, or all of them. attrs: target_application_id and environment_id (required), target_endpoint_id (omit for every endpoint). Options: idempotency_key:.

delete(client, client_id, id)

Revokes a direct grant: %{"id", "deleted" => true, "still_granted_by_package"}. When "still_granted_by_package" is true the client keeps the access through an API package.

list(client, client_id, opts \\ [])

One page of a client's direct grants. Options: limit:, after:.

stream(client, client_id, opts \\ [])

Every direct grant of a client. Raises EndPointBlank.Management.Error.