REST API¶
Note
You need token to access REST API. Receiving a token is described in tab with additional information.
Journal API¶
This provides an API for accessing cloud activity log
Logging service aos-journal-api
¶
Service provides history of all actions on OpenStack objects.
It provides the ability to get detailed information about all user actions on objects.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | path | string | Log entry ID. |
object_id (Optional) | path | string | Object ID. |
object_type (Optional) | path | string | Object type. |
action (Optional) | path | string | Action name. |
status (Optional) | path | string | Action status. |
event_time (Optional) | path | string | Date and time of the action. |
action_arguments | path | string | Action arguments. |
response_code (Optional) | path | string | Response code. |
message (Optional) | path | string | Additional comment on action. |
user_id (Optional) | path | string | User ID. |
user_name (Optional) | path | string | Username. |
domain_id (Optional) | query | string | Domain ID to which the user belongs. |
request_id (Optional) | query | string | Request ID. |
filter_project_id (Optional) | query | string | Project ID. It is used to filter actions on the specified project and on project’s instances. |
filter_domain_id (Optional) | query | string | Domain ID. It is used to filter actions on the specified domain and actions performed by user belonging to the specified domain. |
offset (Optional) | query | string | Position number for receiving data. |
limit (Optional) | query | string | Limiting amount of data received. |
Parameters supporting modifiers are id
, object_id
, object_type
, action
, status
, event_time
, action_arguments
, response_code
, message
, user_id
, user_name
, domain_id
, request_id
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9360/v1/journal/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | ID. |
action | body | string | Action name. |
action_arguments (Optional) | body | string | JSON arguments to use when performing an action. For example: '{"user": "admin"}' . |
event_time (Optional) | body | string | Date and time of action. |
message (Optional) | body | string | Additional comment on action. |
object_id | body | integer | Object ID. |
object_type (Optional) | query | string | Object type. |
request_id (Optional) | body | string | Request ID. |
parent_request_id (Optional) | body | string | Parent request ID. |
response_code (Optional) | body | string | Response code. |
status | body | string | Action status. |
user_id (Optional) | query | string | User ID. |
user_name | body | string | Username. |
domain_id (Optional) | body | string | Domain ID. |
Sample result in JSON format:
{
"journal": [
{
"action": "dashboard.user.login",
"action_arguments": null,
"event_time": "2018-03-22T07:25:31",
"id": 47,
"message": "User \"admin\" was successfully logged in.",
"object_id": "2fee08b2c0ee4ca9ad2907c922c92261",
"object_type": "project",
"parent_request_id": null,
"request_id": "624fa546-e50b-4b7c-82be-8ed496de31a7",
"response_code": null,
"status": "success",
"user_id": "5e48b18b-844d-477c-ab8d-6789a5382a14",
"user_name": "admin",
"domain_id": "46790262d1de48228a53c8887a932f48"
}
]
}
It provides the ability to get the number of user actions on objects.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
id (Optional) | path | string | Log entry ID. |
object_id (Optional) | path | string | Object ID. |
object_type (Optional) | path | string | Object type. |
action (Optional) | path | string | Action name. |
status (Optional) | path | string | Action status. |
event_time (Optional) | path | string | Date and time of the action. |
action_arguments | path | string | Action arguments. |
response_code (Optional) | path | string | Response code. |
message (Optional) | path | string | Additional comment on action. |
user_id (Optional) | path | string | User ID. |
user_name (Optional) | path | string | Username. |
domain_id (Optional) | query | string | Domain ID to which the user belongs. |
request_id (Optional) | query | string | Request ID. |
filter_project_id (Optional) | query | string | Project ID. It is used to filter actions on the specified project and on project’s instances. |
filter_domain_id (Optional) | query | string | Domain ID. It is used to filter actions on the specified domain and actions performed by user belonging to the specified domain. |
Parameters supporting modifiers are id
, object_id
, object_type
, action
, status
, event_time
, action_arguments
, response_code
, message
, user_id
, user_name
, domain_id
, request_id
.
Request example:¶
curl -X GET -H "X-Auth-Token: $token" -H "Content-Type: application/json" http://controller:9360/v1/journal/count | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
count | body | string | Number of records. |
Sample result in JSON format:
{
"count": 1
}
It allows to save record of user actions over objects.
Request¶
Request parameters:¶
Name | In | Type | Description |
---|---|---|---|
tenant_id | path | string | Project ID in which the user is authorized. |
object_id | body | integer | Object ID. |
object_type (Optional) | query | string | Object type. |
action | body | string | Action name. |
status | body | string | Action status. |
message (Optional) | body | string | Additional comment on action. |
user_id (Optional) | query | string | User ID. |
user_name | body | string | Username. |
request_id (Optional) | body | string | Request ID. |
parent_request_id (Optional) | body | string | Parent request ID. |
action_arguments (Optional) | body | string | JSON arguments to use when performing an action. For example: '{"user": "admin"}' . |
domain_id (Optional) | body | string | Domain ID. |
Request example:¶
curl -X POST -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d '{"journal": {"object_id": "4", "object_type": "node", "action": "node_control.power_on", "status": "Success"}}' http://controller:9360/v1/journal/ | python -m json.tool
Response¶
Response parameters:¶
Name | In | Type | Description |
---|---|---|---|
id | body | integer | ID. |
action | body | string | Action name. |
action_arguments (Optional) | body | string | JSON arguments to use when performing an action. For example: '{"user": "admin"}' . |
event_time (Optional) | body | string | Date and time of action. |
message (Optional) | body | string | Additional comment on action. |
object_id | body | integer | Object ID. |
object_type (Optional) | query | string | Object type. |
request_id (Optional) | body | string | Request ID. |
parent_request_id (Optional) | body | string | Parent request ID. |
response_code (Optional) | body | string | Response code. |
status | body | string | Action status. |
user_id (Optional) | query | string | User ID. |
user_name | body | string | Username. |
domain_id (Optional) | body | string | Domain ID. |
Sample result in JSON format:
{
"journal": {
"action": "node_control.power_on",
"action_arguments": null,
"event_time": "2018-03-22T07:25:31",
"id": 47,
"message": null,
"object_id": "2",
"object_type": "node",
"parent_request_id": null,
"request_id": "624fa546-e50b-4b7c-82be-8ed496de31a7",
"response_code": null,
"status": "success",
"user_id": "5e48b18b-844d-477c-ab8d-6789a5382a14",
"user_name": "admin",
"domain_id": "46790262d1de48228a53c8887a932f48"
}
}