REST deployment window events
Deployment window events are individual occurrences of the deployment window series for a specific environment.
GET /v1/deployment_window/events/[id]
Returns the deployment window event by ID.
Common attributes
- id — Numerical unique ID for a deployment window event
- 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. See the table below for the items and their associated items.
Item | Associated items |
|---|---|
events | environment, occurrence, series |
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:
PUT /v1/deployment_window/events/[id]
Updates an existing deployment window with values from the posted data.
Editable attributes
- state — String value for the current state of the deployment window event. When you change the state attribute, the reason attribute is required. The following values are allowed for the state attribute:
- created — The default state for the created deployment window event
- suspended — The deployment window event state for used for suspending the deployment window event
- resumed — The deployment window event state for used for resuming the the deployment window event after the suspension
- moved — The deployment window event state for used moving the deployment window event
- reason — String value for the reason of the status change. This attribute is required if you change the state attribute
- start_at — String value in the date and time format for the deployment window event start. If you can change the start_at value, change the state attribute to moved and enter a value for the reason attribute
- finish_at — String value in the date and time format for the deployment window event finish. If you can change the start_at value, change the state attribute to moved and enter a value for the reason attribute
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. See the table below for the items and their associated items.
Item | Associated items |
|---|---|
events | environment, occurrence, series |
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:
Filter example:
Sample output
The following JSON is a sample output from GET /v1/deployment_windows/events/12:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "3ce446175438137b6a914c322e17dac8"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: bec5332ee6968fab5e2cc8f9d7e79fb6
X-Runtime: 1.154000
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
Date: Tue, 15 Apr 2014 14:50:09 GMT
{
"created_at": "2014-04-11T07:44:33-04:00",
"finish_at": "2014-04-24T10:30:00-04:00",
"id": 12,
"reason": null,
"start_at": "2014-04-24T08:00:00-04:00",
"state": "created",
"updated_at": "2014-04-11T07:44:33-04:00",
"environment": {
"id": 3,
"name": "QA environment closed"
},
"occurrence": {
"finish_at": "2014-04-24T10:30:00-04:00",
"id": 12,
"position": 10,
"start_at": "2014-04-24T08:00:00-04:00"
},
"series": {
"behavior": "allow",
"id": 3,
"name": "Allow DW Test series"
}
}
The following XML is a sample output from {{code language="none"}}
GET /v1/deployment_windows/events/12
{{/code}}:
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge
ETag: "1ddc103bdbdda86ce3c3112058221a08"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 093ddc6f62581546d3051bedb0251426
X-Runtime: 0.427000
Content-Type: application/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Tue, 15 Apr 2014 14:50:09 GMT
<?xml version="1.0" encoding="UTF-8"?>
<event>
<created-at type="datetime">2014-04-11T07:44:33-04:00</created-at>
<finish-at type="datetime">2014-04-24T10:30:00-04:00</finish-at>
<id type="integer">12</id>
<reason nil="true"/>
<start-at type="datetime">2014-04-24T08:00:00-04:00</start-at>
<state>created</state>
<updated-at type="datetime">2014-04-11T07:44:33-04:00</updated-at>
<environment>
<id type="integer">3</id>
<name>QA environment closed</name>
</environment>
<occurrence>
<finish-at type="datetime">2014-04-24T10:30:00-04:00</finish-at>
<id type="integer">12</id>
<position type="integer">10</position>
<start-at type="datetime">2014-04-24T08:00:00-04:00</start-at>
</occurrence>
<series>
<behavior>allow</behavior>
<id type="integer">3</id>
<name>Allow DW Test series</name>
</series>
</event>