EndPointBlank.Management.ClientPackages (end_point_blank_elixir v0.12.0)

Copy Markdown View Source

/api/v1/clients/:client_id/packages: the API packages a client holds from you, or, for a client that has not accepted its invite yet, is set up to get when it does.

An assignment is %{"id", "api_package_id", "api_package_name", "environment_id", "status" => "active" | "pending" | "refused", "refusal", "inserted_at", "updated_at"}.

Summary

Functions

Assigns an API package to a client. attrs: api_package_id and environment_id (required). Refused with "already_assigned", or "nothing_published_in_environment" when the package would give the client no grant there. Options: idempotency_key:.

Un-assigns a package: %{"id", "deleted" => true}.

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

Moves assignment id to another environment. attrs: environment_id.

Functions

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

Assigns an API package to a client. attrs: api_package_id and environment_id (required). Refused with "already_assigned", or "nothing_published_in_environment" when the package would give the client no grant there. Options: idempotency_key:.

delete(client, client_id, id)

Un-assigns a package: %{"id", "deleted" => true}.

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

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

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

Every assignment of a client. Raises EndPointBlank.Management.Error.

update(client, client_id, id, attrs)

Moves assignment id to another environment. attrs: environment_id.