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)

Secure Credentials Vault API GET functions
Resource Description

/scv

Fetches the list of Secure Credentials Vault aliases

/scv/{alias}

Fetches the credential with the given alias.

/scv/_all

Fetches the credentials for all aliases (returns a list of credentials).

PUT (modifying data)

Secure Credentials Vault API PUT function
Resource Description

/scv/{alias}

Modify a credential with the given alias.

POSTs (Creating Data)

Secure Credentials Vault API POST function

Resource

Description

/scv

Add a credential to the Secure Credentials Vault

DELETEs (Removing Data)

Secure Credentials Vault API DELETE function
Resource Description

/scv/{alias}

Delete the credentials with the given alias

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":{}}