REST properties
Properties are named variables that can be assigned property values (polymorphic) for themselves (default values), Installed Components, Application Components, Requests, Servers, Server Aspects, and Server Levels.
GET /v1/properties
Returns all properties.
Filters
- active — Boolean value for active properties only (default is true, showing active only by default)
- app_name — String for the application name
- component_name — String for the component name
- current_value — String for the value among current property values (that is, deleted_at = null)
- deleted_value — String for the value among deleted property values (that is, deleted_at != null)
- inactive — Boolean value for inactive properties (when used with active = false, can be used to show just inactive properties)
- name — String for property name
- server_level_name — String for the server level name
- server_name — String for the server name
- work_task — String for the work task name
- include_except—Comma-separated strings of the top-level associated items to exclude from the response. You can remove only top-level associated items from the response and these associated items should be a collection (zero to many) of other objects (not a simple property—string, numeric, boolean, and so on). For example, you can remove components from an application but you cannot remove route gates (it is not a top-level associated item) or app_version (it is a simple property). If you provide an incorrect associated item name (for example, the associated item does not exist, is not at the top level, or is a property), the name is ignored. See the table below for the items and their associated items.
- alone—Boolean value to return only the item or the associated items as well along with the item. If set to false (default), item and associated item details are returned; if set to true, only item details are returned. See the table below for the items and their associated items.
Item | Associated items |
---|---|
properties | current_property_values, deleted_property_values, work_tasks, components, packages, server_levels, servers, apps |
Common attributes
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid
- ERROR 404 Not Found — Occurs when no records are found
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
Filters examples:
GET /v1/properties/[id]
Returns a property by ID.
Common attributes
- id — Numerical unique ID for record
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Filters
- include_except—Comma-separated strings of the top-level associated items to exclude from the response. You can remove only top-level associated items from the response and these associated items should be a collection (zero to many) of other objects (not a simple property—string, numeric, boolean, and so on). For example, you can remove components from an application but you cannot remove route gates (it is not a top-level associated item) or app_version (it is a simple property). If you provide an incorrect associated item name (for example, the associated item does not exist, is not at the top level, or is a property), the name is ignored. See the table below for the items and their associated items.
- alone—Boolean value to return only the item or the associated items as well along with the item. If set to false (default), item and associated item details are returned; if set to true, only item details are returned. See the table below for the items and their associated items.
Item | Associated items |
---|---|
properties | current_property_values, deleted_property_values, work_tasks, components, packages, server_levels, servers, apps |
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid
- ERROR 404 Not found — Occurs when record to show is not found
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
Filter example:
POST /v1/properties
Creates a new property from posted data.
Required attributes
- name — String name (required)
Optional attributes
- default_value — String default value for a property
- is_private — Boolean value for whether the display of property values should be obscured with **** (defaults to nil or false)
- app_ids — Array of integer IDs for applications
- component_ids — Array of integer IDs for components (required for installed components to show values)
- server_ids — Array of integer IDs for servers
- server_level_ids — Array of integer IDs for server levels
- work_task_ids — Array of integer IDs for work tasks
Special finders
- property_values_with_holders — Array of hashes for setting property values with the following required keys:
- value — String value of the property (required)
- value_holder_type — String class name of allowed holders (required, can be Property, Server, ServerAspect, ServerLevel, ApplicationComponent, InstalledComponent)
- value_holder_id — Integer ID of the value holder (required)
Common Attributes
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Filters
- include_except—Comma-separated strings of the top-level associated items to exclude from the response. You can remove only top-level associated items from the response and these associated items should be a collection (zero to many) of other objects (not a simple property—string, numeric, boolean, and so on). For example, you can remove components from an application but you cannot remove route gates (it is not a top-level associated item) or app_version (it is a simple property). If you provide an incorrect associated item name (for example, the associated item does not exist, is not at the top level, or is a property), the name is ignored. See the table below for the items and their associated items.
- alone—Boolean value to return only the item or the associated items as well along with the item. If set to false (default), item and associated item details are returned; if set to true, only item details are returned. See the table below for the items and their associated items.
Item | Associated items |
---|---|
properties | current_property_values, deleted_property_values, work_tasks, components, packages, server_levels, servers, apps |
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid
- ERROR 422 Unprocessable entity — Occurs when validation fails, objects and errors are returned
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
An example of creating a property value, associating it with a component, and setting values of a known matching set of installed components:
Filter example:
PUT /v1/properties/[id]
Updates an existing property with values from a posted document
Editable attributes
- app_ids — Array of integer IDs for applications
- component_ids — Array of integer IDs for components (required for installed components to show values)
- default_value — String default value for a property
- is_private — Boolean value for whether the display of property values should be obscured with **** (defaults to nil or false)
- name — String name (required)
- package_ids — Assigns a package to the property
- server_ids — Array of integer IDs for servers
- server_level_ids — Array of integer IDs for server levels
- work_task_ids — Array of integer IDs for work tasks
Special Finders
- property_values_with_holders— Array of hashes for setting property values with the following required keys:
- value — String value of the property (required)
- value_holder_type — String class name of allowed holders (required, can be Property, Server, ServerAspect, ServerLevel, ApplicationComponent, InstalledComponent)
- value_holder_id — Integer ID of the value holder (required)
Common Attributes
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Filters
- include_except—Comma-separated strings of the top-level associated items to exclude from the response. You can remove only top-level associated items from the response and these associated items should be a collection (zero to many) of other objects (not a simple property—string, numeric, boolean, and so on). For example, you can remove components from an application but you cannot remove route gates (it is not a top-level associated item) or app_version (it is a simple property). If you provide an incorrect associated item name (for example, the associated item does not exist, is not at the top level, or is a property), the name is ignored. See the table below for the items and their associated items.
- alone—Boolean value to return only the item or the associated items as well along with the item. If set to false (default), item and associated item details are returned; if set to true, only item details are returned. See the table below for the items and their associated items.
Item | Associated items |
---|---|
properties | current_property_values, deleted_property_values, work_tasks, components, packages, server_levels, servers, apps |
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid
- ERROR 404 Not found — Occurs when record to update is not found
- ERROR 422 Unprocessable entity — Occurs when validation fails and objects and errors are returned
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
An example of finding properties for a package:
An example of setting a property value with holder:
Filter example:
New in 5.0.04PUT /v1/properties/[id]/toggle_lock
Locks and unlocks property values of the component property.
Required attributes
- app_id — Integer ID of application
- component_id — Integer ID of component of application component
- locked — Boolean value for whether the property values should be locked or not
Filters
- include_except—Comma-separated strings of the top-level associated items to exclude from the response. You can remove only top-level associated items from the response and these associated items should be a collection (zero to many) of other objects (not a simple property—string, numeric, boolean, and so on). For example, you can remove components from an application but you cannot remove route gates (it is not a top-level associated item) or app_version (it is a simple property). If you provide an incorrect associated item name (for example, the associated item does not exist, is not at the top level, or is a property), the name is ignored. See the table below for the items and their associated items.
alone—Boolean value to return only the item or the associated items as well along with the item. If set to false (default), item and associated item details are returned; if set to true, only item details are returned. See the table below for the items and their associated items.
Item
Associated items
properties
current_property_values, deleted_property_values, work_tasks, components, packages, server_levels, servers, apps
An example of locking property values of the component property:
An example of unlocking property values of the component property:
Filter example:
DELETE /v1/properties/[id]
Makes a property inactive. Sets the active parameter for the property to false.
Common attributes
- id — Numerical unique ID for record
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid
- ERROR 404 Not found — Occurs when no records are found
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
Sample output
The following JSON is a sample output from GET /v1/properties/26:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "45fc395380a559628a48a66e61b297c0"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 8d5508efe00975b2717eed48c1a09480
X-Runtime: 0.152000
Content-Type: application/json;charset=utf-8
Content-Length: 674
Date: Wed, 05 Sep 2012 18:52:52 GMT
[{
"archive_number": null,
"archived_at": null,
"created_at": "2012-09-05T13:53:25-04:00",
"created_by_id": 1,
"id": 26,
"is_text": true,
"name": "Rename Sample List Again",
"updated_at": "2012-09-05T14:12:26-04:00",
"required?": false,
"list_items": [{
"archive_number": null,
"archived_at": null,
"created_at": "2012-09-05T13:53:25-04:00",
"id": 181,
"last_modified_by_id": null,
"updated_at": "2012-09-05T14:12:26-04:00",
"value_num": null,
"value_text": "Renamed Sample List Item 1"
}, {
"archive_number": null,
"archived_at": null,
"created_at": "2012-09-05T13:53:25-04:00",
"id": 182,
"last_modified_by_id": null,
"updated_at": "2012-09-05T14:12:26-04:00",
"value_num": null,
"value_text": "Renamed Sample List Item 2"
}]
}]
The following XML is a sample output from GET /v1/properties/1:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "67f3fac7087d1d6d3075cf1741dddebf"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 4b95bb6e755176bf5b5beaa01b166f57
X-Runtime: 0.541000
Content-Type: application/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Thu, 06 Sep 2012 02:08:37 GMT
<?xml version="1.0" encoding="UTF-8"?>
<property>
<active type="boolean">true</active>
<created-at type="datetime">2012-09-05T16:48:23-04:00</created-at>
<default-value>localhost</default-value>
<id type="integer">1</id>
<is-private type="boolean">false</is-private>
<name>Test Property 1</name>
<updated-at type="datetime">2012-09-05T16:48:23-04:00</updated-at>
<current-property-values type="array">
<current-property-value type="PropertyValue">
<created-at type="datetime">2012-09-05T21:55:36-04:00</created-at>
<deleted-at type="datetime" nil="true"></deleted-at>
<id type="integer">24</id>
<value>local.rest2</value>
<value-holder-id type="integer">2</value-holder-id>
<value-holder-type>InstalledComponent</value-holder-type>
</current-property-value>
<current-property-value type="PropertyValue">
<created-at type="datetime">2012-09-05T21:55:36-04:00</created-at>
<deleted-at type="datetime" nil="true"></deleted-at>
<id type="integer">23</id>
<value>local.rest2</value>
<value-holder-id type="integer">3</value-holder-id>
<value-holder-type>InstalledComponent</value-holder-type>
</current-property-value>
<current-property-value type="PropertyValue">
<created-at type="datetime">2012-09-05T21:55:35-04:00</created-at>
<deleted-at type="datetime" nil="true"></deleted-at>
<id type="integer">22</id>
<value>localhost</value>
<value-holder-id type="integer">1</value-holder-id>
<value-holder-type>Property</value-holder-type>
</current-property-value>
<current-property-value type="PropertyValue">
<created-at type="datetime">2012-09-05T21:33:29-04:00</created-at>
<deleted-at type="datetime" nil="true"></deleted-at>
<id type="integer">21</id>
<value>local.rest</value>
<value-holder-id type="integer">9</value-holder-id>
<value-holder-type>InstalledComponent</value-holder-type>
</current-property-value>
<current-property-value type="PropertyValue">
<created-at type="datetime">2012-09-05T17:24:18-04:00</created-at>
<deleted-at type="datetime" nil="true"></deleted-at>
<id type="integer">5</id>
<value>production_host</value>
<value-holder-id type="integer">4</value-holder-id>
<value-holder-type>InstalledComponent</value-holder-type>
</current-property-value>
</current-property-values>
<deleted-property-values type="array">
<deleted-property-value type="PropertyValue">
<created-at type="datetime">2012-09-05T21:33:29-04:00</created-at>
<deleted-at type="datetime">2012-09-05T21:55:35-04:00</deleted-at>
<id type="integer">20</id>
<value>localhost</value>
<value-holder-id type="integer">1</value-holder-id>
<value-holder-type>Property</value-holder-type>
</deleted-property-value>
<deleted-property-value type="PropertyValue">
<created-at type="datetime">2012-09-05T21:33:13-04:00</created-at>
<deleted-at type="datetime">2012-09-05T21:33:29-04:00</deleted-at>
<id type="integer">19</id>
<value>localhost</value>
<value-holder-id type="integer">1</value-holder-id>
<value-holder-type>Property</value-holder-type>
</deleted-property-value>
<deleted-property-value type="PropertyValue">
<created-at type="datetime">2012-09-05T17:24:17-04:00</created-at>
<deleted-at type="datetime">2012-09-05T21:19:12-04:00</deleted-at>
<id type="integer">4</id>
<value>aws_cloud_host</value>
<value-holder-id type="integer">3</value-holder-id>
<value-holder-type>InstalledComponent</value-holder-type>
</deleted-property-value>
<deleted-property-value type="PropertyValue">
<created-at type="datetime">2012-09-05T16:48:24-04:00</created-at>
<deleted-at type="datetime">2012-09-05T16:50:03-04:00</deleted-at>
<id type="integer">1</id>
<value>localhost</value>
<value-holder-id type="integer">1</value-holder-id>
<value-holder-type>Property</value-holder-type>
</deleted-property-value>
</deleted-property-values>
<work-tasks type="array"/>
<components type="array">
<component>
<id type="integer">1</id>
<name>AppContainer</name>
</component>
<component>
<id type="integer">2</id>
<name>SS_Apache</name>
</component>
<component>
<id type="integer">3</id>
<name>SS_Passenger</name>
</component>
<component>
<id type="integer">4</id>
<name>SS_MySQL</name>
</component>
<component>
<id type="integer">5</id>
<name>SS_RailsApp</name>
</component>
</components>
<server-levels type="array">
<server-level>
<id type="integer">1</id>
<name>Test Server Level</name>
</server-level>
</server-levels>
<servers type="array">
<server>
<id type="integer">1</id>
<name>Test Server 1</name>
</server>
</servers>
<apps type="array"/>
</property>
Related topic