nerves_hub_user_api v0.6.0 NervesHubUserAPI.Device

Manage NervesHub devices

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

Link to this section Summary

Link to this section Functions

Link to this function

auth(org_name, product_name, cert_pem, auth)
auth(String.t(), String.t(), String.t(), NervesHubUserAPI.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)
cert_list(String.t(), String.t(), String.t(), NervesHubUserAPI.Auth.t()) ::
  {:error, any()} | {:ok, any()}

List certificates for a device.

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

Link to this function

cert_sign(org_name, product_name, device_identifier, csr, auth)
cert_sign(
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  NervesHubUserAPI.Auth.t()
) :: {:error, any()} | {:ok, any()}

Sign a new certificate signing request for a device.

Verb: POST Path: /orgs/:org_name/products/:product_name/devices/:device_identifier/certificates/sign

Link to this function

create(org_name, product_name, identifier, description, tags, auth)
create(
  String.t(),
  String.t(),
  String.t(),
  String.t(),
  [String.t()],
  NervesHubUserAPI.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)
delete(String.t(), String.t(), String.t(), NervesHubUserAPI.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)
list(String.t(), String.t(), NervesHubUserAPI.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)
update(String.t(), String.t(), String.t(), map(), NervesHubUserAPI.Auth.t()) ::
  {:error, any()} | {:ok, any()}

Update an existing device.

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