View Source NervesHubCLI.API.OrgUser (nerves_hub_cli v2.0.1)

Manage OrgUsers on NervesHub

Path: /orgs/:org_name/users

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.

Types

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

Functions

Link to this function

add(org_name, username, role, auth)

View Source
@spec add(String.t(), String.t(), NervesHubCLI.API.role(), NervesHubCLI.API.Auth.t()) ::
  {:error, any()} | {:ok, any()}

Add a user to the org with a role.

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

@spec list(String.t(), NervesHubCLI.API.Auth.t()) :: {:error, any()} | {:ok, any()}

List all users for an org.

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

@spec path(String.t()) :: String.t()
Link to this function

remove(org_name, username, auth)

View Source
@spec remove(String.t(), String.t(), NervesHubCLI.API.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)

View Source
@spec update(
  String.t(),
  String.t(),
  NervesHubCLI.API.role(),
  NervesHubCLI.API.Auth.t()
) ::
  {:error, any()} | {:ok, any()}

Update an existing org user's role.

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