Secure Credentials Vault
The /scv endpoint requires application/json for all operations.
The alias _all is reserved, you cannot create credentials using that alias. It is used in GET /scv/_all to get all credentials.
|
GETs (reading data)
| Resource | Description |
|---|---|
|
Fetches the list of Secure Credentials Vault aliases |
|
Fetches the credential with the given |
|
Fetches the credentials for all aliases (returns a list of credentials). |
PUT (modifying data)
| Resource | Description |
|---|---|
|
Modify a credential with the given |
POSTs (Creating Data)
Resource |
Description |
|
Add a credential to the Secure Credentials Vault |
DELETEs (Removing Data)
| Resource | Description |
|---|---|
|
Delete the credentials with the given |
Examples using cURL
Get a list of all aliases
curl -u admin:admin "http://127.0.0.1:8980/opennms/rest/scv"
Response
["foo"]
Fetch a single alias
curl -u admin:admin "http://127.0.0.1:8980/opennms/rest/scv/foo"
Response
{"alias":"foo","username":"barr","password":"******","attributes":{}}
Fetch all credentials
curl -u admin:admin "http://127.0.0.1:8980/opennms/rest/scv/_all"
Response
[
{"alias":"foo","username":"barr","password":"******","attributes":{}},
{"alias":"foo2","username":"barr2","password":"******","attributes":{}}
]
Create an entry in the vault
curl -u admin:admin -H 'Content-Type: application/json' -d@scv.json http://localhost:8980/opennms/rest/scv
JSON Payload scv.json
{"alias":"biff","username":"biff","password":"quux","attributes":{}}