add search by username
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
15
README.md
15
README.md
@@ -80,6 +80,10 @@ WantedBy=multi-user.target
|
||||
```
|
||||
## API Usage
|
||||
|
||||
API calls should return http status code of **200** if successful, or **4xx** if unsuccessful. API calls that are unsuccessful will also include a JSON response with the key `error` and a value of the reason for the failure. Successful API calls will include a `message` key with a value of either success or something more detailed such as "user deletion success"
|
||||
|
||||
API calls that create or modify a record will include the created/updated record in the JSON response.
|
||||
|
||||
### Login
|
||||
**POST** `/api/login`
|
||||
|
||||
@@ -390,14 +394,21 @@ If the secretId is known, that can also be used to query for the secret. In this
|
||||
**GET** `/api/secret/retrieve/name/<searchname>`
|
||||
|
||||
Search for a secret specified by deviceName using a GET request.
|
||||
Must be logged in to execute this command. Only secrets registered with the current user's RoleId can be retrieved.
|
||||
Must be logged in to execute this command. Only secrets in safes that the current user can access can be retrieved.
|
||||
|
||||
#### Search by device category
|
||||
|
||||
**GET** `/api/secret/retrieve/category/<searchname>`
|
||||
|
||||
Search for a secret specified by deviceCategory using a GET request.
|
||||
Must be logged in to execute this command. Only secrets registered with the current user's RoleId can be retrieved.
|
||||
Must be logged in to execute this command. Only secrets in safes that the current user can access can be retrieved.
|
||||
|
||||
#### Search by username
|
||||
|
||||
**GET** `/api/secret/retrieve/user/<searchname>`
|
||||
|
||||
Search for a secret specified by userName using a GET request.
|
||||
Must be logged in to execute this command. Only secrets in safes that the current user can access can be retrieved.
|
||||
|
||||
#### Update Secret
|
||||
**POST** `/api/secret/update`
|
||||
|
Reference in New Issue
Block a user