Legacy API Docs. These docs are for Virtool 4.3.3.

Settings

Get

Get a complete representation of the administrative settings.

GET
/api/settings

Example

GET /api/settings

Response

Status: 200 OK

{
  "allowed_source_types": ["clone", "culture", "genotype", "isolate", "strain"],
  "cert_path": "",
  "create_sample_inst": 3,
  "create_sample_mem": 5,
  "create_sample_proc": 24,
  "create_subtraction_inst": 2,
  "create_subtraction_mem": 4,
  "create_subtraction_proc": 2,
  "data_path": "data",
  "db_host": "localhost",
  "db_name": "virtool",
  "db_port": 27017,
  "dummy_inst": 5,
  "dummy_mem": 1,
  "dummy_proc": 1,
  "enable_api": false,
  "github_token": null,
  "github_username": null,
  "internal_control_id": "",
  "key_path": "",
  "mem": 12,
  "minimum_password_length": 8,
  "nuvs_inst": 6,
  "nuvs_mem": 16,
  "nuvs_proc": 6,
  "pathoscope_bowtie_inst": 6,
  "pathoscope_bowtie_mem": 4,
  "pathoscope_bowtie_proc": 6,
  "proc": 7,
  "proxy_address": "",
  "proxy_enable": false,
  "proxy_password": "",
  "proxy_trust": false,
  "proxy_username": "",
  "rebuild_index_inst": 1,
  "rebuild_index_mem": 4,
  "rebuild_index_proc": 2,
  "restrict_source_types": true,
  "sample_all_read": true,
  "sample_all_write": false,
  "sample_group": "none",
  "sample_group_read": true,
  "sample_group_write": false,
  "sample_unique_names": true,
  "server_host": "localhost",
  "server_port": 9950,
  "software_channel": "stable",
  "use_internal_control": false,
  "use_ssl": false,
  "watch_path": "watch"
}

Update

Role Administrator

Create a new group. New groups have no permissions. Requestors must have the modify_users permission.

PATCH
/api/settings

Input

NameTypeDefault
allowed_source_typesarray["isolate", "strain"]
create_sample_instint3
create_sample_memint4
create_sample_procint4
create_subtraction_instint2
create_subtraction_memint4
create_subtraction_procint2
data_pathstringdata
db_hoststringlocalhost
db_namestringvirtool
db_portint27107
enable_apiboolfalse
github_tokenbool""
github_usernamebool""
internal_control_idbool""
memboolmaximum system memory
minimum_password_lengthbool8
nuvs_instbool6
nuvs_membool16
nuvs_procbool6
pathoscope_bowtie_instint6
pathoscope_bowtie_memint16
pathoscope_bowtie_procint6
procintmaxmium system processor count
proxy_addressstring""
proxy_enableboolfalse
proxy_passwordstring""
proxy_trustboolfalse
proxy_usernamestring""
rebuild_index_instint1
rebuild_index_memint4
rebuild_index_procint2
restrict_source_typesinttrue
sample_all_readbooltrue
sample_all_writeboolfalse
sample_groupstringnone
sample_group_readbooltrue
sample_group_writeboolfalse
sample_unique_namesbooltrue
server_hoststringlocalhost
server_portint9950
software_channelstringstable
use_internal_controlboolfalse
watch_pathstringwatch

Example

POST /api/settings

{
  "nuvs_mem": 18
}

Response

Status: 200 OK

{
  "allowed_source_types": ["clone", "culture", "genotype", "isolate", "strain"],
  "cert_path": "",
  "create_sample_inst": 3,
  "create_sample_mem": 5,
  "create_sample_proc": 24,
  "create_subtraction_inst": 2,
  "create_subtraction_mem": 4,
  "create_subtraction_proc": 2,
  "data_path": "data",
  "db_host": "localhost",
  "db_name": "virtool",
  "db_port": 27017,
  "dummy_inst": 5,
  "dummy_mem": 1,
  "dummy_proc": 1,
  "enable_api": false,
  "github_token": null,
  "github_username": null,
  "internal_control_id": "",
  "key_path": "",
  "mem": 12,
  "minimum_password_length": 8,
  "nuvs_inst": 6,
  "nuvs_mem": 18,
  "nuvs_proc": 6,
  "pathoscope_bowtie_inst": 6,
  "pathoscope_bowtie_mem": 4,
  "pathoscope_bowtie_proc": 6,
  "proc": 7,
  "proxy_address": "",
  "proxy_enable": false,
  "proxy_password": "",
  "proxy_trust": false,
  "proxy_username": "",
  "rebuild_index_inst": 1,
  "rebuild_index_mem": 4,
  "rebuild_index_proc": 2,
  "restrict_source_types": true,
  "sample_all_read": true,
  "sample_all_write": false,
  "sample_group": "none",
  "sample_group_read": true,
  "sample_group_write": false,
  "sample_unique_names": true,
  "server_host": "localhost",
  "server_port": 9950,
  "software_channel": "stable",
  "use_internal_control": false,
  "use_ssl": false,
  "watch_path": "watch"
}

Errors

StatusMessageReason
400Exceeds system processor countprovided proc value is greater than the system processor count
400Exceeds system memoryprovided mem value is greater than the available system memory
403Not permittedclient does not have the ‘modify_settings` permission
409Less than a task-specific proc limitprovided proc is less than a task-specific processor limit setting
409Less than a task-specific mem limitprovided mem is less than a task-specific mempry limit setting
409Exceeds proc resource limita provided task-specific limit is greater than the proc limit setting
409Exceeds mem resource limita provided task-specific limit is greater than the mem limit setting