Account API
V.1: User Documentation
V.1: User Documentation
Equipped with Authentication and secured management of your Account Details, Settings and Clients.
POST register
Sign-up to Higgs and register your account.
Name | Description |
---|---|
key
|
The Account key. |
password
|
The password used to authenticate the account. Higgs stores passwords as a bcrypt encoded hash |
confirmation
|
Password confirmation |
email
|
Primary email of the account holder. |
*alternateEmail
|
Alternative email of the account holder. |
* Optional |
POST /register HTTP/1.1
Host: higgs.online
{key,password,confirmation,email,*alternateEmail}
POST login
Exchange your credentials to Higgs and get a JSON Web Token API pass.
Name | Description |
---|---|
key
|
The Account key. |
password
|
The Account password. |
email
|
The Account email. |
Login is POST-only Service. |
POST /login HTTP/1.1
Host: higgs.online
{key,email,password}
Higgs will respond by providing your Authentication Token in:
This resource object allows clients to access the token via a JSON property key to then store the token as required by the application (such as a Session).
This instructs Browser Agents to store the JWT Token in a Cookie. Higgs will search for Cookie headers in Requests for automatic authentication to higgs.online
requests.
HTTP/1.1 200 OK
Date: Mon, 1 Mar 2016 11:11:11 GMT
Set-Cookie: authToken={token}
{
"@context": "https://higgs.online/context",
"@id": "higgs:Status/{status}",
"hsd:type": "higgs:Status",
"higgs:Status/{status}/code": "{httpCode}",
"higgs:Operation": "{GET|POST|DELETE}",
"higgs:Status/{status}/message": "Authentication successful! Please use the provided token in the Authorization header in all subsequent requests."
"resource": {
"hsd:id": "higgs:account/{key}/authToken",
"hsd:type": "higgs:Relation/accountToken",
"hsd:value": {token}"
}
}
To access Account restricted Resources and Services, put your token in the Authorization
HTTP header using the Bearer scheme.
GET /account/FelixDubé HTTP/1.1
Host: higgs.online
Authorization: Bearer {token}
Alternatively, Higgs will look into the Cookie
header for Web Clients using the authToken
key under higgs.online
.
GET /account/FelixDubé HTTP/1.1
Host: higgs.online
Cookie: authToken={token}
POST password-recovery
Recover forgotten passwords.
Name | Description |
---|---|
key
|
The Account key. |
email
|
The Account email. |
POST /password-recovery HTTP/1.1
Host: higgs.online
{key,email}
POST password-reset
Update your credentials.
Name | Description |
---|---|
key
|
The Account key. |
oldPassword
|
The current password saved to the account. |
tempPassword
|
The password sent to your email via the /password-reset Service.
|
confirmation
|
The new password to replace the old one with. |
newPasswordConfirm
|
New password confirmation |
email
|
Primary email of the account holder. |
POST /password-reset HTTP/1.1
Host: https://higgs.online
{key,email,oldPassword,[newPassword|tempPassword],confirmation,email}
HTTP/1.1 200 OK
Date: Mon, 1 Mar 2016 11:11:11 GMT
{
"@context": "https://higgs.online/context",
"@id": "higgs:Status/{status}",
"hsd:type": "higgs:Status",
"higgs:Status/{status}/code": "{httpCode}",
"higgs:Operation": "{GET|POST|DELETE}",
"higgs:Status/{status}/message": "Your password has been successfully changed! You can now login.",
"higgs:resource": {
"@id": "higgs:account/{key}",
"uuid": "h1335-0is0-1337-86cf-559ffe04a9c6",
"key": "jay",
"@type": "developer",
"email": "jason.reinert@pillrcompany.com",
"status": "active",
"dateTimeCreated": "2017-09-15 14:51:09",
"lastModified": "2017-09-15 14:51:21"
}
}
GET|POST|DELETE account/{key}
Account Details provides information about an Account owner. You can access your own Account, as well as any Account you have been given access to by the owner.
Name | Type | Description |
---|---|---|
key
|
string |
The account key to access. |
label
|
string |
A short label for the Account. |
comment
|
string |
A short description of the Account. |
email
|
email |
The primary email of the Account. |
alternateEmail
|
email |
An alternative email of the Account. |
Name | HTTP Method | Available |
CREATE | POST |
|
READ | GET |
|
UPDATE | POST |
|
DELETE | DELETE |
POST /account/{key} HTTP/1.1
Host: higgs.online
{label,comment,email,alternateEmail}
GET|POST account-settings
Account Settings allows users to configure their settings and preferences; such as timezone, language, region, color preferences, etc.
Name | Type | Description |
timezone
|
{region}/{city} string
|
The timezone of preference. See List of tz database time zones. |
language
|
2 character string | Language of preference. See ISO 639 Language codes |
country
|
2 character string | Country of preference. 2 character code, see Country Codes List |
currency
|
3 character Currency Code | Currency of preference. See International Currencies and Currency Codes |
logo
|
Link | A link to the Account logo. |
Name | Method | Available |
---|---|---|
CREATE | -- | -- |
READ | GET |
|
UPDATE | POST |
|
DELETE | -- | -- |
POST /account-settings HTTP/1.1
Host: higgs.online
{timezone,language,country,currency,logo}
GET|POST|DELETE client/{key}
Clients are other Accounts you have given access to your API Backend.
Name | Description |
create
|
CREATE permission for the client. |
read
|
READ permission for the client. |
update
|
UPDATE permission for the client. |
delete
|
DELETE permission for the client. |
status
|
Enumerated value of either: 'active', 'suspended' |
Name | HTTP Method | Available |
---|---|---|
CREATE | POST |
|
READ | GET |
|
UPDATE | -- | -- |
DELETE | -- | -- |
GET|POST /client/{key} HTTP/1.1
Host: higgs.online