/api/v1/clients: your clients (the organizations you provide APIs to),
pending invites and accepted ones.
A client is %{"id", "name", "status" => "pending" | "accepted", "accepted_at", "managed", "claimed_at", "client_organization", "inserted_at", "updated_at"}, plus "invite_code" while it is pending
(write keys only: whoever redeems it becomes this client, so treat it as a
secret). get/2 and create/3 add "contacts" and "pre_assignments".
What a client holds is EndPointBlank.Management.ClientPackages and
EndPointBlank.Management.ClientGrants; a managed client's own
applications, environments and credentials are reached through
EndPointBlank.Management.for_managed_client/2.
Summary
Functions
Invites a client, or creates a managed one. Counts against your plan's
client limit ("plan_limit", HTTP 402).
Removes a client: %{"id", "deleted" => true}. With your last accepted
invite for that organization, also takes away every package and grant it
holds from you. An unclaimed managed client that still has credentials is
refused with "managed_client_has_credentials".
One client.
One page of your clients. Options: limit:, after:.
Every client, a page at a time. Raises EndPointBlank.Management.Error.
Updates client id (PATCH /api/v1/clients/:id). attrs
Functions
@spec create(EndPointBlank.Management.t(), map() | keyword(), keyword()) :: EndPointBlank.Management.result(map())
Invites a client, or creates a managed one. Counts against your plan's
client limit ("plan_limit", HTTP 402).
attrs:
name(required)contacts-- your contacts to share with the client:[%{email:, first_name:, last_name:, title:, phone_number:}]packages-- API packages to assign when the client accepts:[%{api_package_id:, environment_id:}]grants-- direct grants to make when it accepts:[%{target_application_id:, target_endpoint_id:, environment_id:}]managed--truecreates the client's organization now, for you to run until your customer claims it. Not together withpackagesorgrants("invalid_managed"): assign those afterwards.owner_email-- withmanaged: true, the email address of the person at your customer who will own the managed client. Change it later withupdate/3.
Options: idempotency_key:.
@spec delete(EndPointBlank.Management.t(), String.t()) :: EndPointBlank.Management.result(map())
Removes a client: %{"id", "deleted" => true}. With your last accepted
invite for that organization, also takes away every package and grant it
holds from you. An unclaimed managed client that still has credentials is
refused with "managed_client_has_credentials".
@spec get(EndPointBlank.Management.t(), String.t()) :: EndPointBlank.Management.result(map())
One client.
@spec list( EndPointBlank.Management.t(), keyword() ) :: EndPointBlank.Management.result(EndPointBlank.Management.Page.t())
One page of your clients. Options: limit:, after:.
@spec stream( EndPointBlank.Management.t(), keyword() ) :: Enumerable.t()
Every client, a page at a time. Raises EndPointBlank.Management.Error.
@spec update(EndPointBlank.Management.t(), String.t(), map() | keyword()) :: EndPointBlank.Management.result(map())
Updates client id (PATCH /api/v1/clients/:id). attrs:
owner_email-- the email address of the person at your customer who will own a managed client.