Credentials
A Credential provides an abstraction for sensitive textual information, such as passphrases or cloud credentials, whose value should be encrypted when stored in the database and not generally shown in the UI or through the API. Credentials may then be used as inputs of type "Cred" in RightScripts or Chef recipes. NOTE: Credential values may be updated through the API, but values cannot be retrieved via the API.
Actions
index
Lists the Credentials available to this account.
- URLs
- GET /api/credentials
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.credential;type=collection
Required roles
- observer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
filter | no | Array | * | * | no | See below for valid filter parameters. |
view | no | String | default, sensitive | * | no | Specifies how many attributes and/or expanded nested relationships to include. |
Filters
name | partial_match? | description |
---|---|---|
description | yes | Description of the Credentials to filter on. |
name | yes | Name of the Credentials to filter on. |
Example Responses
Click on a format below to see an example response for the 'default' view:
JSON XML[{
"name": "CREDENTIAL_1801367412",
"description": null,
"created_at": "2023/10/09 11:06:02 +0000",
"updated_at": "2023/10/09 11:06:02 +0000",
"links": [
{"rel":"self","href":"/api/credentials/43"}
]
},{
"name": "CREDENTIAL_1728086750",
"description": null,
"created_at": "2023/10/09 11:06:03 +0000",
"updated_at": "2023/10/09 11:06:03 +0000",
"links": [
{"rel":"self","href":"/api/credentials/44"}
]
}]
<?xml version="1.0" encoding="UTF-8"?>
<credentials>
<credential>
<name>CREDENTIAL_1801367412</name>
<description/>
<created_at>2023/10/09 11:06:02 +0000</created_at>
<updated_at>2023/10/09 11:06:02 +0000</updated_at>
<links>
<link rel="self" href="/api/credentials/43"/>
</links>
</credential>
<credential>
<name>CREDENTIAL_1728086750</name>
<description/>
<created_at>2023/10/09 11:06:03 +0000</created_at>
<updated_at>2023/10/09 11:06:03 +0000</updated_at>
<links>
<link rel="self" href="/api/credentials/44"/>
</links>
</credential>
</credentials>
Click on a format below to see an example response for the 'sensitive' view:
JSON XML[{
"name": "CREDENTIAL_1801367412",
"description": null,
"created_at": "2023/10/09 11:06:02 +0000",
"updated_at": "2023/10/09 11:06:02 +0000",
"links": [
{"rel":"self","href":"/api/credentials/43"}
],
"value": "value of CREDENTIAL_1801367412"
},{
"name": "CREDENTIAL_1728086750",
"description": null,
"created_at": "2023/10/09 11:06:03 +0000",
"updated_at": "2023/10/09 11:06:03 +0000",
"links": [
{"rel":"self","href":"/api/credentials/44"}
],
"value": "value of CREDENTIAL_1728086750"
}]
<?xml version="1.0" encoding="UTF-8"?>
<credentials>
<credential>
<name>CREDENTIAL_1801367412</name>
<description/>
<created_at>2023/10/09 11:06:02 +0000</created_at>
<updated_at>2023/10/09 11:06:02 +0000</updated_at>
<links>
<link rel="self" href="/api/credentials/43"/>
</links>
<value>value of CREDENTIAL_1801367412</value>
</credential>
<credential>
<name>CREDENTIAL_1728086750</name>
<description/>
<created_at>2023/10/09 11:06:03 +0000</created_at>
<updated_at>2023/10/09 11:06:03 +0000</updated_at>
<links>
<link rel="self" href="/api/credentials/44"/>
</links>
<value>value of CREDENTIAL_1728086750</value>
</credential>
</credentials>
show
Show information about a single Credential. Credential values may be retrieved using the "sensitive" view by users with "admin" or "credential_viewer" role only.
- URLs
- GET /api/credentials/:id
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.credential
Required roles
- observer
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
view | no | String | default, sensitive | * | no | Specifies how many attributes and/or expanded nested relationships to include. |
Example Responses
Click on a format below to see an example response for the 'default' view:
JSON XML{
"name": "CREDENTIAL_1801367412",
"description": null,
"created_at": "2023/10/09 11:06:02 +0000",
"updated_at": "2023/10/09 11:06:02 +0000",
"links": [
{"rel":"self","href":"/api/credentials/43"}
]
}
<?xml version="1.0" encoding="UTF-8"?>
<credential>
<name>CREDENTIAL_1801367412</name>
<description/>
<created_at>2023/10/09 11:06:02 +0000</created_at>
<updated_at>2023/10/09 11:06:02 +0000</updated_at>
<links>
<link rel="self" href="/api/credentials/43"/>
</links>
</credential>
Click on a format below to see an example response for the 'sensitive' view:
JSON XML{
"name": "CREDENTIAL_1801367412",
"description": null,
"created_at": "2023/10/09 11:06:02 +0000",
"updated_at": "2023/10/09 11:06:02 +0000",
"links": [
{"rel":"self","href":"/api/credentials/43"}
],
"value": "value of CREDENTIAL_1801367412"
}
<?xml version="1.0" encoding="UTF-8"?>
<credential>
<name>CREDENTIAL_1801367412</name>
<description/>
<created_at>2023/10/09 11:06:02 +0000</created_at>
<updated_at>2023/10/09 11:06:02 +0000</updated_at>
<links>
<link rel="self" href="/api/credentials/43"/>
</links>
<value>value of CREDENTIAL_1801367412</value>
</credential>
create
Creates a new Credential with the given parameters.
- URLs
- POST /api/credentials
- HTTP response code
- 201 Created
- Location
- Href of the created Credential.
Required roles
- actor
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
credential | yes | Hash | * | * | no | |
credential[description] | no | String | * | * | yes | The description of the Credential to be created. |
credential[name] | yes | String | * | * | no | The name of the Credential to be created. |
credential[value] | yes | String | * | * | no | The value of the Credential to be created. |
update
Updates attributes of a Credential.
- URLs
- PUT /api/credentials/:id
- HTTP response code
- 204 No Content
Required roles
- actor
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
credential | yes | Hash | * | * | no | |
credential[description] | no | String | * | * | yes | The updated description of the Credential. |
credential[name] | no | String | * | * | no | The updated name of the Credential. |
credential[value] | no | String | * | * | no | The updated value of the Credential. |
destroy
Deletes a Credential.
- URLs
- DELETE /api/credentials/:id
- HTTP response code
- 204 No Content
Required roles
- actor