Skip to content

Accounts

Lars Westermann edited this page Feb 14, 2020 · 3 revisions

/api/v1/accounts?search=

GET

Search for accounts

Request Parameter

  • search?: <<search string>>

Response body

[
    {
        <<Account>>,
        "id_search": "account.id with highlighting",
        "name_search": "account.name with highlighting",
        "mail_search": "account.mail with highlighting",
        "username_search": "account.username with highlighting",
        "account_number_search": "account.account_number with highlighting",
        "permission_search": "account.permission with highlighting"
    }
]

PUT

Create a new account

Request Parameter

<<Account>>

Response body

{
    "id": "00000000-0000-0000-0000-000000000000"
}

/api/v1/account/{account_id}

Get account by id

GET

Request Parameter

  • account_id: 00000000-0000-0000-0000-000000000000

Response body

<<Account>>

POST

Update an account

Request Parameter

  • account_id: 00000000-0000-0000-0000-000000000000
<<Account>>

DELETE

Delete an account

Request Parameter

  • account_id: 00000000-0000-0000-0000-000000000000

/api/v1/account/{account_id}/barcode

PUT

Set a barcode

Request Parameter

  • account_id: 00000000-0000-0000-0000-000000000000
{
    "barcode": "00000000"
}

DELETE

Remove a barcode

Request Parameter

  • account_id: 00000000-0000-0000-0000-000000000000

/api/v1/account/{account_id}/nfc

PUT

Set a nfc tag

Request Parameter

  • account_id: 00000000-0000-0000-0000-000000000000
{
    "nfc": "id",
    "writeable": true
}

DELETE

Remove a nfc tag

Request Parameter

  • account_id: 00000000-0000-0000-0000-000000000000