Add method to change contact alias to REST API

Needed for https://code.briarproject.org/briar/briar-gtk/-/issues/14 and
https://code.briarproject.org/briar/python-briar-wrapper/-/issues/6.

Fixes #1781
This commit is contained in:
Nico Alt
2020-10-13 23:33:26 +02:00
parent b88f012880
commit 44f6f5d416
5 changed files with 97 additions and 3 deletions

View File

@@ -183,6 +183,18 @@ Note that it's also possible to add contacts nearby via Bluetooth/Wifi or
introductions. In these cases contacts omit the `pendingContact` state and
directly become `contact`s.
### Changing alias of a contact
`PUT /v1/contacts/{contactId}/alias`
The alias should be posted as a JSON object:
```json
{
"alias": "A nickname for the new contact"
}
```
### Removing a contact
`DELETE /v1/contacts/{contactId}`