Users

This document describes the endpoints used for managing users on NervesHub through the User API.

Register

POST https://api.nerves-hub.org/users/register

This endpoint allows you to register for a new account.

Request Body

NameTypeDescription

password*

string

The password for the new account

username*

string

The username of the account

email*

string

The email address used for the account

{
    "username": "user1234",
    "email": "user@domain.com"
}

Authenticate

POST https://api.nerves-hub.org/users/auth

Validate authentication of your account with your email and password.

Request Body

NameTypeDescription

password*

string

The password of the account

email*

string

The email address of the account

{
    "username": "user1234",
    "email": "user@domain.com"
}

Sign certificate

POST https://api.nerves-hub.org/users/sign

Authenticate using your account email and password and then sign a user certificate signing request to generate a valid user certificate. Almost all endpoints in the User API are protected using client SSL using the certificate returned from this request.

Request Body

NameTypeDescription

csr*

string

A PEM encoded user certificate signing request

email*

string

The email address of the account

password*

string

The password of the account

description*

string

A description to use for the certificate

{
  "cert": "--BEGIN CERTIFICATE--"
}

GET https://api.nerves-hub.org/users/me

Show user

Return information about the user for a provided user certificate.Requires: client side SSL user certificate

Found user from valid user certificate

{
    "username": "user1234",
    "email": "user@domain.com"
}
{
    "errors": "reason"
}

Last updated