nerves_hub_user_api v0.6.0 NervesHubUserAPI.OrgUser

Manage OrgUsers on NervesHub

Path: /orgs/:org_name/users

Link to this section Summary

Functions

Add a user to the org with a role.

List all users for an org.

Remove a user from the org.

Update an existing org user's role.

Link to this section Types

Link to this type

role()
role() :: :admin | :delete | :write | :read

Link to this section Functions

Link to this function

add(org_name, username, role, auth)
add(String.t(), String.t(), NervesHubUserAPI.role(), NervesHubUserAPI.Auth.t()) ::
  {:error, any()} | {:ok, any()}

Add a user to the org with a role.

Verb: POST Path: /orgs/:org_name/users

Link to this function

list(org_name, auth)
list(String.t(), NervesHubUserAPI.Auth.t()) :: {:error, any()} | {:ok, any()}

List all users for an org.

Verb: GET Path: /orgs/:org_name/users

Link to this function

remove(org_name, username, auth)
remove(String.t(), String.t(), NervesHubUserAPI.Auth.t()) ::
  {:error, any()} | {:ok, any()}

Remove a user from the org.

Verb: DELETE Path: /orgs/:org_name/users/:username

Link to this function

update(org_name, username, role, auth)
update(
  String.t(),
  String.t(),
  NervesHubUserAPI.role(),
  NervesHubUserAPI.Auth.t()
) :: {:error, any()} | {:ok, any()}

Update an existing org user's role.

Verb: PUT Path: /orgs/:org_name/users/:username