account

Get an account

Fetches the details for the account associated with the user agent.

Errors

StatusDescription
401 Requires Authorization

Request

get
/account

Response

    {
  "example": {
    "administrator": false,
    "administrator_role": null,
    "groups": [],
    "handle": "bob",
    "id": "test",
    "last_password_change": "2015-10-06T20:00:00Z",
    "permissions": {
      "cancel_job": false,
      "create_ref": false,
      "create_sample": false,
      "modify_hmm": false,
      "modify_subtraction": false,
      "remove_file": false,
      "remove_job": false,
      "upload_file": false
    },
    "primary_group": "technician",
    "settings": {
      "quick_analyze_workflow": "pathoscope_bowtie",
      "show_ids": true,
      "show_versions": true,
      "skip_quick_analyze_dialog": true
    }
  },
  "status": "200"
}
  

Update an account

Updates the account associated with the user agent.

Provide a password to update the account password. The old_password must also be provided in the request.

The email address is not currently used, but will be in future releases.

Parameters

Name Type Required Description
email string false an email address
old_password string false the old password for verification
password string false the new password

Errors

StatusDescription
400 Invalid input
401 Requires Authorization

Request

patch
/account
    {
  "email": "[email protected]",
  "old_password": "hello_world",
  "password": "foo_bar_1"
}
  

Response

    {
  "example": {
    "administrator": false,
    "administrator_role": null,
    "email": "[email protected]",
    "groups": [],
    "handle": "bob",
    "id": "test",
    "last_password_change": "2015-10-06T20:00:00Z",
    "permissions": {
      "cancel_job": false,
      "create_ref": false,
      "create_sample": false,
      "modify_hmm": false,
      "modify_subtraction": false,
      "remove_file": false,
      "remove_job": false,
      "upload_file": false
    },
    "primary_group": "technician",
    "settings": {
      "quick_analyze_workflow": "pathoscope_bowtie",
      "show_ids": true,
      "show_versions": true,
      "skip_quick_analyze_dialog": true
    }
  },
  "status": "200"
}
  

Purge API keys

Deletes all API keys registered for the account associated with the user agent.

Errors

StatusDescription
401 Requires authorization

Request

delete
/account/keys

Response

    {
  "status": "204"
}
  

List API keys

Lists all API keys registered on the account associated with the user agent.

Errors

StatusDescription
401 Requires authorization

Request

get
/account/keys

Response

    {
  "status": "200"
}
  

Create an API key

Creates a new API key on the account associated with the user agent.

The new key value is returned in the response. This is the only response from the server that will ever include the key.

Parameters

Name Type Required Description
name string true a non-unique name for the API key
permissions false an object describing the permissions the new key will have. Any unset permissions will default to false

Errors

StatusDescription
400 Invalid input
401 Requires authorization

Request

post
/account/keys
    {
  "name": "Foobar",
  "permissions": {
    "create_sample": true
  }
}
  

Response

    {
  "example": {
    "created_at": "2015-10-06T20:00:00Z",
    "groups": [],
    "id": "foobar_0",
    "key": "raw_key",
    "name": "Foobar",
    "permissions": {
      "cancel_job": false,
      "create_ref": false,
      "create_sample": true,
      "modify_hmm": false,
      "modify_subtraction": false,
      "remove_file": false,
      "remove_job": false,
      "upload_file": false
    }
  },
  "status": "201"
}
  

Delete an API key

Removes an API key by its 'key id'.

Errors

StatusDescription
401 Requires authorization
404 Not found

Request

delete
/account/keys/{key_id}

Response

    {
  "status": "204"
}
  

Get an API key

Fetches the details for an API key registered on the account associated with the user agent.

Errors

StatusDescription
404 Not found

Request

get
/account/keys/{key_id}

Response

    {
  "example": {
    "created_at": "2015-10-06T20:00:00Z",
    "groups": [],
    "id": "foobar_0",
    "name": "Foobar",
    "permissions": {
      "cancel_job": false,
      "create_ref": false,
      "create_sample": true,
      "modify_hmm": false,
      "modify_subtraction": false,
      "remove_file": false,
      "remove_job": false,
      "upload_file": false
    }
  },
  "status": "200"
}
  

Update an API key

Updates the permissions an existing API key registered on the account associated with the user agent.

Parameters

Name Type Required Description
permissions false a permission update comprising an object keyed by permissions with boolean values

Errors

StatusDescription
400 Invalid input
401 Requires Authorization
404 Not found

Request

patch
/account/keys/{key_id}
    {
  "permissions": {
    "modify_subtraction": true
  }
}
  

Response

    {
  "example": {
    "created_at": "2015-10-06T20:00:00Z",
    "groups": [],
    "id": "foobar_0",
    "name": "Foobar",
    "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
    }
  },
  "status": "200"
}
  

Login

Logs in using the passed credentials.

This creates a new session for the user with username. The session ID and token are returned in cookies.

Parameters

Name Type Required Description
password string true account password
remember boolean false value determining whether the session will last for 1 month or 1 hour
username string true account username

Errors

StatusDescription
400 Invalid input

Request

post
/account/login
    {
  "password": "p@ssword123",
  "remember": false,
  "username": "foobar"
}
  

Response

    {
  "example": {
    "reset": false
  },
  "status": "201"
}
  

Logout

Logs out the user by invalidating the session associated with the user agent. A new unauthenticated session ID is returned in cookies.

Request

get
/account/logout

Response

    {
  "status": "204"
}
  

Reset password

Resets the password for the account associated with the requesting session.

Parameters

Name Type Required Description
password string true
reset_code string true

Errors

StatusDescription
400 Invalid input

Request

post
/account/reset
    {
  "password": "p@ssword123",
  "reset_code": "4bcda8b3bcaf5f84cc6e26a3d23a6179f29d356e43c9ced1b6de0d8f4946555e"
}
  

Response

    {
  "example": {
    "login": false,
    "reset": false
  },
  "status": "200"
}
  

Get account settings

Fetches the settings for the account associated with the user agent.

Errors

StatusDescription
401 Requires authorization

Request

get
/account/settings

Response

    {
  "example": {
    "quick_analyze_workflow": "pathoscope_bowtie",
    "show_ids": true,
    "show_versions": true,
    "skip_quick_analyze_dialog": true
  },
  "status": "200"
}
  

Update account settings

Updates the settings of the account associated with the user agent.

Parameters

Name Type Required Description
quick_analyze_workflow false workflow to use for quick analysis
show_ids boolean false show document ids in client where possible
show_versions boolean false show document versions in client where possible
skip_quick_analyze_dialog boolean false don’t show the quick analysis dialog

Errors

StatusDescription
400 Invalid input
401 Requires Authorization

Request

patch
/account/settings
    {
  "show_ids": false
}
  

Response

    {
  "example": {
    "quick_analyze_workflow": "pathoscope_bowtie",
    "show_ids": false,
    "show_versions": true,
    "skip_quick_analyze_dialog": true
  },
  "status": "200"
}