Accounts¶
This section describes the RESTful API for managing accounts. Accounts are used to authenticate with Notary and manage the system.
List Accounts¶
This path returns the list of accounts.
Method |
Path |
---|---|
|
|
Parameters¶
None
Sample Response¶
{
"result": [
{
"id": 1,
"username": "admin",
"permissions": 1
}
]
}
Create an Account¶
This path creates a new account. The first account can be created without authentication.
Method |
Path |
---|---|
|
|
Parameters¶
username
(string): The username of the account.password
(string): The password of the account.
Sample Response¶
{
"result": {
"message": "success",
"id": 1
}
}
Change Password for an Account¶
This path updates an existing account.
Method |
Path |
---|---|
|
|
Parameters¶
password
(string): The new password of the account.
Sample Response¶
{
"result": {
"message": "success"
}
}
Get an Account¶
This path returns the details of a specific account.
Method |
Path |
---|---|
|
|
Parameters¶
None
Sample Response¶
{
"result": {
"id": 2,
"username": "pizza.com",
"permissions": 0
}
}
Delete an Account¶
This path deletes an account.
Method |
Path |
---|---|
|
|
Parameters¶
None
Sample Response¶
{
"result": {
"message": "success"
}
}