@@ -136,7 +136,59 @@ Get version of the Pod: the git commit and cargo version that it was built from.
}
```
Create the account in the POD, note the `owner` and `database` key requirements.
Create the Database in the POD, note the `owner` and `database` key requirements.
# Account Registration
### POST /v4/account/register
```json
{
"login":"valid email",
"password":"string
}
```
This is the first step of POD Account registration. A mail shall be send to `login` address with the
unique code that needs to be provided in `v4/account/verify` endpoint
### POST /v4/account/verify
```json
{
"login":"valid email",
"code":"1234"
}
```
This is the second step of POD Account registration. The `code` is a string of 4 digits from the mail. If verification is successful it is possible to derive the POD keys using `/account/derive_pod_keys`
# Account login
### POST /v4/account/derive_pod_keys
```json
{
"login":"valid email",
"password":"string"
}
```
This is the first step of logging into the POD. The `login` and `password` must match values from first step of registration. The response contains dedicated `pod_key` and `owner_key`. That can be used later in `/v4/account/open_pod`
Example response:
```json
{
"ownerKey":"securely generated hex string of length 64 characters",
"databaseKey":"securely generated hex string of length 64 characters"
}
```
### POST /v4/account/open_pod
```json
{
"ownerKey":"securely generated hex string of length 64 characters",
"databaseKey":"securely generated hex string of length 64 characters"
}
```
Create the Database in the POD, note the `owner` and `database` key requirements.
If database already exits nothing is changed. After this call it is possible to interact with the POD database (create items, etc).