.. _statusvalues: Method: Obtain capabilities and permission bits ----------------------------------------------- Description ~~~~~~~~~~~ Obtain list of :ref:`all available capabilities (user) and permission (vaults) bits`. Examples ~~~~~~~~ 1. A user with the capability (status) set to the value 132, has the following capabilities: :: Active bit (bit 7, value 128) Admin bit (bit 2, value 4) 128 + 4 = 132 If the user would get the Audit bit (bit 3, value 8), the users new capability would be: 132 + 8 = 140 2. An auditor with access only to the audit log, would have the Audit and the Active bit (A user without the Active bit cannot logon to StoredSafe): :: Active bit (bit 7, value 128) Audit bit (bit 3, value 8) 8 + 128 = 136 Making it possible for the user to **only** log on and examine the audit log. (Unless an existing StoredSafe user decides to share a vault with the auditor) URL Syntax ~~~~~~~~~~ /api/{version}/utils/statusvalues HTTP Method ~~~~~~~~~~~ GET Successful HTTP Response ~~~~~~~~~~~~~~~~~~~~~~~~ 200 Parameters ~~~~~~~~~~ +----------------+------------------+----------------+--------+-----------+------------------+ | Parameter name | Description | Parameter type | Type | Mandatory | Comment | +================+==================+================+========+===========+==================+ | X-Http-Token | StoredSafe token | HTTP Header | String | :sup:`1)` | Preferred method | +----------------+------------------+----------------+--------+-----------+------------------+ | token | StoredSafe token | URL-parameter | String | :sup:`1)` | Legacy method | +----------------+------------------+----------------+--------+-----------+------------------+ .. note:: :sup:`1)` One of the methods is required. Response Attributes ~~~~~~~~~~~~~~~~~~~ +--------------------------------------------+-------------------------------------------------+---------+ | Attribute | Description | Type | +============================================+=================================================+=========+ | CALLINFO.errorcodes | Number of errors | Integer | +--------------------------------------------+-------------------------------------------------+---------+ | CALLINFO.errors | Number of errors | Integer | +--------------------------------------------+-------------------------------------------------+---------+ | CALLINFO.general | Information | Array | +--------------------------------------------+-------------------------------------------------+---------+ | CALLINFO.handler | Handler used | String | +--------------------------------------------+-------------------------------------------------+---------+ | CALLINFO.status | SUCCESS or FAIL | String | +--------------------------------------------+-------------------------------------------------+---------+ | CALLINFO.statusbits.userbits.(capability) | Statusbits (users) | Integer | +--------------------------------------------+-------------------------------------------------+---------+ | CALLINFO.statusbits.vaultbits.(permission) | Statusbits (vaults) | Integer | +--------------------------------------------+-------------------------------------------------+---------+ | CALLINFO.token | StoredSafe token to be used in subsequent calls | String | +--------------------------------------------+-------------------------------------------------+---------+ | DATA | Supplied data in API-call | String | +--------------------------------------------+-------------------------------------------------+---------+ | HEADERS.(headers) | HTTP Headers | String | +--------------------------------------------+-------------------------------------------------+---------+ | PARAMS | Route parameters (empty) | Array | +--------------------------------------------+-------------------------------------------------+---------+ | ERRORCODES | Error code and text (Only present if errors) | Object | +--------------------------------------------+-------------------------------------------------+---------+ | ERRORS | Error code and text (Only present if errors) | Array | +--------------------------------------------+-------------------------------------------------+---------+ Examples ~~~~~~~~ Obtain list of all available capabilities (user) and permission (vaults) bits. **Request** :: GET /api/1.0/utils/statusvalues x-http-token: your_storedsafe_token **Response** :: HTTP/2 200 content-type: application/json; charset=UTF-8 { "CALLINFO": { "errorcodes": 0, "errors": 0, "general": [], "handler": "UtilsHandler", "status": "SUCCESS", "statusbits": { "userbits": { "Active": 7, "Admin": 2, "Alarm": 4, "Audit": 3, "Changepass": 6, "Escrow": 8, "Read": 0, "Write": 1 }, "vaultbits": { "Admin": 2, "Read": 0, "Write": 1 } }, "token": "rotated_storedsafe_token" }, "DATA": { "token": "your_storedsafe_token" }, "HEADERS": { "Accept": "*/*", "Host": "safe.domain.cc", "User-Agent": "curl/7.64.1", "X-Http-Token": "your_storedsafe_token" }, "PARAMS": [] }