View Source NervesHubUserAPI.CACertificate (nerves_hub_user_api v0.9.0)

CA certificates

Path: /orgs/:org_name/ca_certificates

Link to this section Summary

Functions

Adds a new CA certificate to NervesHub. The certificate passed should be pem encoded binary and not a path to the cert file.

Removes the CA certificate with the specified serial number from NervesHub.

List all ca certificates for an organization

Link to this section Functions

Link to this function

create(org_name, cert_pem, auth, description \\ nil)

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

Adds a new CA certificate to NervesHub. The certificate passed should be pem encoded binary and not a path to the cert file.

Verb: POST Path: /orgs/:org_name/ca_certificates

Link to this function

delete(org_name, serial, auth)

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

Removes the CA certificate with the specified serial number from NervesHub.

Verb: DELETE Path: /orgs/:org_name/ca_certificates/:serial

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

List all ca certificates for an organization

Verb: GET Path: /orgs/:org_name/ca_certificates