AuditEntries
An Audit Entry can be used to track various activities of a resource.
Actions
index
Lists AuditEntries of the account. Due to the potentially large number of audit entries, a start and end date must be provided during an index call to limit the search. The format of the dates must be YYYY/MM/DD HH:MM:SS [+/-]ZZZZ e.g. 2011/07/11 00:00:00 +0000. A maximum of 1000 records will be returned by each index call.
Using the available filters, one can select or group which audit entries to retrieve.
- URLs
- GET /api/audit_entries
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.audit_entry;type=collection
Required roles
- observer||instance||infrastructure
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
end_date | yes | String | * | ^(\d{4})/(\d{2})/(\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4})$ | no | The end date for retrieving audit entries (the format must be the same as start date). The time period between start and end date must be less than 3 months (93 days). |
filter | no | Array | * | * | no | See below for valid filter parameters. |
limit | yes | * | \d+ | no | Limit the audit entries to this number. The limit should >= 1 and <= 1000 | |
start_date | yes | String | * | ^(\d{4})/(\d{2})/(\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4})$ | no | The start date for retrieving audit entries, the format must be YYYY/MM/DD HH:MM:SS [+/-]ZZZZ e.g., 2011/06/25 00:00:00 +0000 |
view | no | String | default | * | no | Specifies how many attributes and/or expanded nested relationships to include. |
Filters
name | partial_match? | description |
---|---|---|
auditee_href | no | The href of the auditee resource to filter on. |
user_email | no | The email of the user (who created/triggered the audit entry) to filter on. |
Example Responses
Click on a format below to see an example response:
JSON XML[{
"links": [
{"rel":"self","href":"/api/audit_entries/7"},
{"rel":"auditee","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND"},
{"rel":"detail","href":"/api/audit_entries/7/detail"}
],
"actions": [
{
"rel": "append"
}
],
"summary": "test summary",
"user_email": "owner_user@rightscale.com",
"updated_at": "2023/10/09 11:06:03 +0000",
"detail_size": 16
},{
"links": [
{"rel":"self","href":"/api/audit_entries/8"},
{"rel":"auditee","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND"},
{"rel":"detail","href":"/api/audit_entries/8/detail"}
],
"actions": [
{
"rel": "append"
}
],
"summary": "test summary",
"user_email": "owner_user@rightscale.com",
"updated_at": "2023/10/09 11:06:03 +0000",
"detail_size": 17
}]
<?xml version="1.0" encoding="UTF-8"?>
<audit_entries>
<audit_entry>
<links>
<link rel="self" href="/api/audit_entries/7"/>
<link rel="auditee" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND"/>
<link rel="detail" href="/api/audit_entries/7/detail"/>
</links>
<actions>
<action rel="append"/>
</actions>
<summary>test summary</summary>
<user_email>owner_user@rightscale.com</user_email>
<updated_at>2023/10/09 11:06:03 +0000</updated_at>
<detail_size>16</detail_size>
</audit_entry>
<audit_entry>
<links>
<link rel="self" href="/api/audit_entries/8"/>
<link rel="auditee" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND"/>
<link rel="detail" href="/api/audit_entries/8/detail"/>
</links>
<actions>
<action rel="append"/>
</actions>
<summary>test summary</summary>
<user_email>owner_user@rightscale.com</user_email>
<updated_at>2023/10/09 11:06:03 +0000</updated_at>
<detail_size>17</detail_size>
</audit_entry>
</audit_entries>
show
Lists the attributes of a given audit entry.
- URLs
- GET /api/audit_entries/:id
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.audit_entry
Required roles
- observer||instance||infrastructure
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
view | no | String | default | * | no | Specifies how many attributes and/or expanded nested relationships to include. |
Example Responses
Click on a format below to see an example response:
JSON XML{
"links": [
{"rel":"self","href":"/api/audit_entries/7"},
{"rel":"auditee","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND"},
{"rel":"detail","href":"/api/audit_entries/7/detail"}
],
"actions": [
{
"rel": "append"
}
],
"summary": "test summary",
"user_email": "owner_user@rightscale.com",
"updated_at": "2023/10/09 11:06:03 +0000",
"detail_size": 16
}
<?xml version="1.0" encoding="UTF-8"?>
<audit_entry>
<links>
<link rel="self" href="/api/audit_entries/7"/>
<link rel="auditee" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND"/>
<link rel="detail" href="/api/audit_entries/7/detail"/>
</links>
<actions>
<action rel="append"/>
</actions>
<summary>test summary</summary>
<user_email>owner_user@rightscale.com</user_email>
<updated_at>2023/10/09 11:06:03 +0000</updated_at>
<detail_size>16</detail_size>
</audit_entry>
create
Creates a new AuditEntry with the given parameters.
- URLs
- POST /api/audit_entries
- HTTP response code
- 201 Created
- Location
- Href of the created AuditEntry
Required roles
- actor||instance||infrastructure
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
audit_entry | yes | Hash | * | * | no | |
audit_entry[auditee_href] | yes | String | * | * | no | The href of the resource that this audit entry should be associated with (e.g. an instance's href). |
audit_entry[detail] | no | String | * | * | yes | The initial details of the audit entry to be created. |
audit_entry[summary] | yes | String | * | ^(.{1,255})$ | no | The summary of the audit entry to be created, maximum length is 255 characters. |
notify | no | String | * | ^(None|Notification|Security|Error)$ | no | The event notification category. Defaults to 'None'. |
user_email | no | String | * | * | no | The email of the user (who created/triggered the audit entry). Only usable with instance role. |
update
Updates the summary of a given AuditEntry.
- URLs
- PUT /api/audit_entries/:id
- HTTP response code
- 204 No Content
Required roles
- actor||instance||infrastructure
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
audit_entry | yes | Hash | * | * | no | |
audit_entry[offset] | no | Integer | * | * | no | The offset where the next details will be appended. Used in ordering of summary updates. |
audit_entry[summary] | yes | String | * | ^(.{1,255})$ | no | The updated summary for the audit entry, maximum length is 255 characters. |
notify | no | String | * | ^(None|Notification|Security|Error)$ | no | The event notification category. Defaults to 'None'. |
append
Updates the summary and appends more details to a given AuditEntry. Each audit entry detail is stored as one chunk, the offset determines the location of that chunk within the overall audit entry details section. For example, if you create an AuditEntry and append "DEF" at offset 10, and later append "ABC" at offset 9, the overall audit entry details will be "ABCDEF". Use the \n character to separate details by new lines.
- URLs
- POST /api/audit_entries/:id/append
- HTTP response code
- 204 No Content
Required roles
- actor||instance||infrastructure
Parameters
name | required | type | values | regexp | blank? | description |
---|---|---|---|---|---|---|
detail | no | String | * | * | yes | The details to be appended to the audit entry record. |
notify | no | String | * | ^(None|Notification|Security|Error)$ | no | The event notification category. Defaults to 'None'. |
offset | no | Integer | * | * | no | The offset where the new details should be appended to in the audit entry's existing details section. Also used in ordering of summary updates. Defaults to end. |
summary | no | String | * | ^(.{1,255})$ | no | The updated summary for the audit entry, maximum length is 255 characters. |
detail
shows the details of a given AuditEntry. Note that the media type of the response is simply text.
- URLs
- GET /api/audit_entries/:id/detail
- HTTP response code
- 200 OK
- Content-type
- application/vnd.rightscale.text
Required roles
- observer||instance||infrastructure