Account
These endpoints allow management of the user account associated with the current session or API key.
Unauthorized clients will receive 401 Unauthorized for calls to all account endpoints.
Get
Get the complete respresentation for the account associated with the current session or API key.
Example
GET /api/account
Response
Status: 200 OK
{ "administrator": true, "groups": [], "identicon": "6be6d0a72a16cb633144ec03cdaef77804c6f94770184f83e0899fe6bdcb77ee", "settings": { "skip_quick_analyze_dialog": true, "show_ids": false, "show_versions": false, "quick_analyze_algorithm": "pathoscope_bowtie" }, "permissions": { "cancel_job": true, "create_ref": true, "create_sample": true, "modify_hmm": true, "modify_subtraction": true, "remove_file": true, "remove_job": true, "upload_file": true }, "primary_group": "", "last_password_change": "2018-04-27T22:49:11.654000Z", "email": "[email protected]", "id": "igboyes" }
Errors
Status | Message | Reason |
---|---|---|
401 | Requires authorization | request is not associated with an authorized session or API key |
Update
Change the email address associated with the account associated with the current session or API key.
Input
Name | Type | Required | Description |
---|---|---|---|
string | false | an email address | |
old_password | string | false | the old password for verification |
new_password | string | false | the new password |
Example
PATCH /api/account
{
"email": "[email protected]"
}
Response
Status:
{ "administrator": true, "groups": [], "identicon": "6be6d0a72a16cb633144ec03cdaef77804c6f94770184f83e0899fe6bdcb77ee", "settings": { "skip_quick_analyze_dialog": true, "show_ids": false, "show_versions": false, "quick_analyze_algorithm": "pathoscope_bowtie" }, "permissions": { "cancel_job": true, "create_ref": true, "create_sample": true, "modify_hmm": true, "modify_subtraction": true, "remove_file": true, "remove_job": true, "upload_file": true }, "primary_group": "", "last_password_change": "2018-04-27T22:49:11.654000Z", "email": "[email protected]", "id": "igboyes" }
Errors
Status | Message | Reason |
---|---|---|
400 | Invalid old password | supplied old password is invalid |
401 | Requires authorization | request is not associated with an authorized session or API key |
422 | Invalid input | email address is invalid or password fields are missing or invalid |
401 | Requires authorization | request is not associated with an authorized session or API key |
Get Settings
Get the settings for the account associated with the current session or API key.
Example
GET /api/account/settings
Response
Status: 200 OK
{ "skip_quick_analyze_dialog": true, "show_ids": false, "show_versions": false, "quick_analyze_algorithm": "pathoscope_bowtie" }
Errors
Status | Message | Reason |
---|---|---|
401 | Requires authorization | request is not associated with an authorized session or API key |
Edit Settings
Update the settings for the account associated with the current session or API key. All fields are optional.
Input
Name | Type | Description |
---|---|---|
quick_analyze_algorithm | string | algorithm to use for quick analysis |
skip_quick_analyze_dialog | boolean | don’t show the quick analysis dialog |
show_ids | boolean | show document ids in client in where possible |
show_versions | boolean | show document versions in client where possible |
Example
PATCH /api/account/settings
{
"show_ids": true
}
Response
Status: 200 OK
{ "skip_quick_analyze_dialog": true, "show_ids": true, "show_versions": false, "quick_analyze_algorithm": "pathoscope_bowtie" }
Errors
Status | Message | Reason |
---|---|---|
401 | Requires authorization | request is not associated with an authorized session or API key |
422 | Invalid input | invalid settings key or value |
List API Keys
List all API keys for the active account. The keys themselves are not returned.
Example
GET /api/account/keys
Response
Status: 200 OK
[ { "id": "test_0", "name": "Test", "administrator": true, "groups": [], "permissions": { "cancel_job": true, "create_ref": true, "create_sample": true, "modify_hmm": true, "modify_subtraction": true, "remove_file": true, "remove_job": true, "upload_file": true }, "created_at": "2018-05-01T19:47:03.334000Z" } ]
Errors
Status | Message | Reason |
---|---|---|
401 | Requires authorization | request is not associated with an authorized session or API key |
Update API Key
Change the permissions of an existing API key.
Input
Name | Type | Required | Description |
---|---|---|---|
administrator | boolean | false | sets administrative rights on the API key |
permissions | object | false | an object describing updates to the key’s permissions |
Example
PATCH /api/account/keys/test%202_0
{
"administrator": true,
"permissions": {
"modify_subtraction": true
}
}
Response
Status: 200 OK
{ "id": "test 2_0", "name": "Test 2", "administrator": true, "groups": [], "permissions": { "cancel_job": false, "create_ref": false, "create_sample": true, "modify_hmm": false, "modify_subtraction": true, "remove_file": false, "remove_job": false, "upload_file": false }, "created_at": "2018-05-01T21:34:21.271000Z" }
Errors
Status | Message | Reason |
---|---|---|
401 | Requires authorization | request is not associated with an authorized session or API key |
404 | Not found | API key identified by :id does not exist |
422 | Invalid input | missing or invalid permissions object |
Delete API Key
Delete an existing API key.
Example
DELETE /api/account/keys/test_1
Response
Status: 204 No content
Errors
Status | Message | Reason |
---|---|---|
401 | Requires authorization | request is not associated with an authorized session or API key |
404 | Not found | API key identified by :id does not exist |
Logout
Logout by invalidating the current session. It will have no effect for connections authenticated with an API key.
Response
Status: 204 No content
Errors
None