Cloud Management API 1.5

Preferences

A Preference is a user and account-specific setting. Preferences are used in many part of the RightScale platform and can be used for custom purposes if desired.

Actions

index

Lists all preferences.

URLs
GET /api/preferences
HTTP response code
200 OK
Content-type
application/vnd.rightscale.preference;type=collection

Required roles

Parameters

name required type values regexp blank? description
filter no Array * * no See below for valid filter parameters.

Example Responses

Click on a format below to see an example response:

JSON XML
[{
  "created_at": "2023/10/09 11:06:02 +0000",
  "updated_at": "2023/10/09 11:06:02 +0000",
  "links": [
    {"rel":"self","href":"/api/preferences/my:custom:scope:custom_id"}
  ],
  "contents": "my custom string"
},{
  "created_at": "2023/10/09 11:06:02 +0000",
  "updated_at": "2023/10/09 11:06:02 +0000",
  "links": [
    {"rel":"self","href":"/api/preferences/my:custom:scope:custom_id"}
  ],
  "contents": "my custom string"
}]
<?xml version="1.0" encoding="UTF-8"?>
<preferences>
  <preference>
    <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/preferences/my:custom:scope:custom_id"/>
    </links>
    <contents>my custom string</contents>
  </preference>
  <preference>
    <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/preferences/my:custom:scope:custom_id"/>
    </links>
    <contents>my custom string</contents>
  </preference>
</preferences>

show

Shows a single preference.

URLs
GET /api/preferences/:id
HTTP response code
200 OK
Content-type
application/vnd.rightscale.preference

Required roles

Example Responses

Click on a format below to see an example response:

JSON XML
{
  "created_at": "2023/10/09 11:06:02 +0000",
  "updated_at": "2023/10/09 11:06:02 +0000",
  "links": [
    {"rel":"self","href":"/api/preferences/my:custom:scope:custom_id"}
  ],
  "contents": "my custom string"
}
<?xml version="1.0" encoding="UTF-8"?>
<preference>
  <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/preferences/my:custom:scope:custom_id"/>
  </links>
  <contents>my custom string</contents>
</preference>

update

If 'id' is known, updates preference with given contents. Otherwise, creates new preference. Note: If create, will return '201 Created' and the location of the new preference.

URLs
PUT /api/preferences/:id
HTTP response code
204 No Content

Required roles

Parameters

name required type values regexp blank? description
preference yes Hash * * no
preference[contents] yes String * * no The updated contents for the Preference.

destroy

Deletes the given preference.

URLs
DELETE /api/preferences/:id
HTTP response code
204 No Content

Required roles