REST installed components
An installed component is an instance of a component that is unique to an environment and an application.
GET /v1/installed_components
Returns all installed components
Filters
- app_id — Integer value of the application ID
- app_name — String value of the application associated with an installed component
- component_id — Integer value of the component ID
- component_name — String value of the component name
- environment_id — Integer value of the environment ID
- environment_name — String value of the application name associated with an installed compnent
- server_group_name — String value of the application name associated with an installed component
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:
An example of a filter:
GET /v1/installed_components/[id]
Returns an installed component 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
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:
POST /v1/installed_components
Creates a new installed component from posted data
Required attributes
- app_name — String name of the application
- component_name — String name of the parent component object
- environment_name — String name of the environment object
- application_component_id — Integer ID of application component model (see special finders to avoid creating this object manually)
- application_environment_id — Integer ID of application_environment model (see special finders to avoid creating this object manually)
Optional Finder Methods
- server_names — String or array of string names of the servers
- server_aspect_names — String or array of string names of the server aspects
- server_aspect_group_names — String or array of string names of the server aspect groups
- server_group_name — String name of the single associated server group (through default server group ID)
Special property setter
- properties_with_values — Hash of key value pairs, such as "{ 'server_url' : 'localhost', 'user_name' : 'admin' }"
Optional attributes
- default_server_group_id — Integer ID of the default server group
- location — String field storing the physical or virtual location of the installed component
- version — String field showing the current version of the installed component
- reference_id — Integer field linking the installed component to another installed component
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 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:
http://[rails_host]/v1/installed_components?token=[api_token]
Example of setting a property value on creation:
PUT /v1/installed_components/[id]
Updates an existing installed component with values from a posted document
Finder methods
- app_name — String name of the application
- component_name — String name of the parent component object
- environment_name — String name of the environment object
- application_component_id — Integer ID of application component model (see special finders to avoid creating this object manually)
- application_environment_id — Integer ID of application_environment model (see special finders to avoid creating this object manually)
- server_names — String or array of string names of the servers
- server_aspect_names — String or array of string names of the server aspects
- server_aspect_group_names —String or array of string names of the server aspect groups
- server_group_name — String name of the single associated server group (through default server group ID)
Special property setter
- properties_with_values — Hash of key value pairs such as "{ 'server_url' : 'localhost', 'user_name' : 'admin' }"
Optional attributes
- default_server_group_id — Integer ID of the default server group
- location — String field storing the physical or virtual location of the installed component
- version — String field showing the current version of the installed component
- reference_id — Integer field linking the installed component to another installed component
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 record to update is not found
- 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:
Example of setting a property value for an existing installed component:
DELETE /v1/installed_components/[id]
Makes an installed component inactive. Sets the active parameter for the installed component 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/installed_components:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "f13c3aba0bb381129d453c401598d8cd"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: c78a824a4f563093c415866e95c5734a
X-Runtime: 0.774000
Content-Type: application/json;charset=utf-8
Content-Length: 6998
Date: Tue, 23 Oct 2012 19:11:06 GMT
[{
"id": 7,
"location": null,
"reference_id": null,
"version": null,
"application_component": {
"id": 4,
"updated_at": "2011-04-29T00:13:14-04:00",
"app": {
"app_version": "2.0.4",
"id": 1,
"name": "SR_|_SmartRelease"
},
"component": {
"id": 4,
"name": "SS_MySQL"
}
},
"application_environment": {
"id": 1,
"updated_at": "2011-04-29T00:12:28-04:00",
"environment": {
"id": 1,
"name": "aws_cloud"
}
}
}, {
"id": 8,
"location": null,
"reference_id": null,
"version": null,
"application_component": {
"id": 4,
"updated_at": "2011-04-29T00:13:14-04:00",
"app": {
"app_version": "2.0.4",
"id": 1,
"name": "SR_|_SmartRelease"
},
"component": {
"id": 4,
"name": "SS_MySQL"
}
},
"application_environment": {
"id": 2,
"updated_at": "2011-04-29T00:12:28-04:00",
"environment": {
"id": 2,
"name": "production"
}
}
}]
The following XML is a sample output from GET /v1/installed_components/1:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "707c21d9d2a2800d95f5656ef03734ac"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: f690345c419eee9ee0b6ffec577ecda0
X-Runtime: 0.652000
Content-Type: application/xml;charset=utf-8
Content-Length: 1140
Date: Tue, 23 Oct 2012 19:12:54 GMT
<?xml version="1.0" encoding="UTF-8"?>
<installed-component>
<id type="integer">1</id>
<location nil="true"></location>
<reference-id type="integer" nil="true"></reference-id>
<version nil="true"></version>
<application-component>
<id type="integer">1</id>
<updated-at type="datetime">2011-04-29T00:13:14-04:00</updated-at>
<app>
<app-version>2.0.4</app-version>
<id type="integer">1</id>
<name>SR_|_SmartRelease</name>
</app>
<component>
<id type="integer">1</id>
<name>AppContainer</name>
</component>
</application-component>
<application-environment>
<id type="integer">1</id>
<updated-at type="datetime">2011-04-29T00:12:28-04:00</updated-at>
<environment>
<id type="integer">1</id>
<name>aws_cloud</name>
</environment>
</application-environment>
<associated-current-property-values type="array"/>
<associated-property-values type="array"/>
<steps type="array"/>
<version-tags type="array"/>
<servers type="array"/>
<server-aspect-groups type="array"/>
<server-aspects-through-groups type="array"/>
</installed-component>
Related topic