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

Manage NervesHub devices

Path: /orgs/:org_name/products/:product_name/devices

Summary

Functions

Link to this function

auth(org_name, product_name, cert_pem, auth)

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

Check authentication status for device certificate.

Verb: POST Path: /orgs/:org_name/products/:product_name/devices/auth

Link to this function

cert_list(org_name, product_name, device_identifier, auth)

View Source
This function is deprecated. use NervesHubCLI.API.DeviceCertificate.list/4 instead.
Link to this function

create(org_name, product_name, identifier, description, tags, auth)

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

Create a new device.

Verb: POST Path: /orgs/:org_name/products/:product_name/devices

Link to this function

delete(org_name, product_name, device_identifier, auth)

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

Delete an existing device.

Verb: DELETE Path: /orgs/:org_name/products/:product_name/devices/:device_identifer

Link to this function

list(org_name, product_name, auth)

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

List all devices.

Verb: GET Path: /orgs/:org_name/products/:product_name/devices

Link to this function

update(org_name, product_name, device_identifier, params, auth)

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

Update an existing device.

Verb: PUT Path: /orgs/:org_name/products/:product_name/devices/:device_identifier