View Source NervesHubUserAPI.ProductUser (nerves_hub_user_api v0.9.0)

Manage ProductUsers on NervesHub

Path: /orgs/:org_name/products/:product_name/users

Link to this section Summary

Link to this section Functions

Link to this function

add(org_name, username, role, auth)

View Source
Link to this function

add(org_name, product_name, username, role, auth)

View Source
@spec add(
  String.t(),
  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/product/:product_name/users

Link to this function

list(org_name, product_name, auth)

View Source
@spec list(String.t(), String.t(), NervesHubUserAPI.Auth.t()) ::
  {:error, any()} | {:ok, any()}

List all users for a product.

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

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

remove(org_name, product_name, username, auth)

View Source
@spec remove(String.t(), String.t(), String.t(), NervesHubUserAPI.Auth.t()) ::
  {:error, any()} | {:ok, any()}

Remove a user from the product.

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

Link to this function

update(org_name, product_name, username, role, auth)

View Source
@spec update(
  String.t(),
  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/product/:product_name/users/:username