Skip to content

Auditlogs

Auditlogs provides a function to search and browse operation logs and login logs.

This API is provided by the management console.Please refer to common components for the access point host.

Note

The retention period for operation log and login log is 90 days. Logs older than this cannot be viewed.

List

Auditlogs/list provides an operation to search and browse operation logs/login logs.

Request

/transaction/v2/auditlogs/list.[json|xml]

Access control

Item Value
Role API group admistrator
Authorisation none

Parameter

Parameter Required Data type Description
api_user Yes ASCII Specifies the ID used for user authentication.
api_key Yes ASCII Specifies the secret key used for user authentication.
type Yes ASCII Specifies the acqusition log type.
- Login log: login
- operation Log: operation
account No ASCII Search the log of accounts that partially match the specified string.
start_date No DATE Specifies the search start date as (yyyy-mm-dd format) to perform a period search.The search start date is included in the search period.
- condition: start_date must be equal to end_date or specify a past date. The search period can be specified up to 1 month (31 days).
- default: The date the API was implemented
end_date No DATE Specifies the search end date (yyyy-mm-dd format) to perform a period search. Search end date is included in the search period.
- default: The date the API was implemented
p No INTEGER Specifies the page position to refer to.
- Default:0
r No INTEGER Specifies the number of records to be displayed on one page.
- default:10
- max:100

Response

Login Log

If login is specified in the request parameter type, the login log will be returned in the following format.

{
"loginlogs": [
    {
    "account": "user@hennge.com",
    "code": "1",
    "created": "2019-06-12 12:10:55",
    "ipaddress": "10.0.24.10",
    "reason": "Password authentication failed",
    "result": "failed"
    },
    {
    "account": "user@hennge.com",
    "code": "0",
    "created": "2019-06-12 12:11:46",
    "ipaddress": "10.0.2.24",
    "reason": "",
    "result": "success"
    },
    {
    "account": "user@hennge.com",
    "code": "2",
    "created": "2019-06-12 12:31:05",
    "ipaddress": "",
    "reason": "",
    "result": "logout"
    },
    ...
]
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<loginlogs>
<loginlog>
    <created>2019-06-12 12:10:55</created>
    <account>user@hennge.com</account>
    <ipaddress>10.0.24.10</ipaddress>
    <code>1</code>
    <result>failure</result>
    <reason>Password authentication failed</reason>
</loginlog>
<loginlog>
    <created>2019-06-12 12:11:46</created>
    <account>user@hennge.com</account>
    <ipaddress>10.0.24.10</ipaddress>
    <code>0</code>
    <result>success</result>
    <reason></reason>
</loginlog>
<loginlog>
    <created>2019-06-12 12:31:05</created>
    <account>user@hennge.com</account>
    <ipaddress></ipaddress>
    <code>2</code>
    <result>logout</result>
    <reason></reason>
</loginlog>
....
</loginlogs>
Property Description
created Date and time login log was recorded (YYYY-MM-DD HH:mm:ss format).
account User account that logged in or logged out.
ipaddress Connection source IP address at login.
code Login log type code.
- 0: success
- 1: failure
- 2: log out.
result Display name of code. Success, failure, or logout.
reason Error reason when login fails.

Operation Log

If the operation is specified in the request parameter type, the operation log is returned in the following format.

{
"operationlogs": [
    {
    "account": "apiadmin@hennge.com",
    "created": "2019-05-07 14:58:51",
    "function": "error details",
    "name": "API group administrator",
    "operation": "sandbox downloaded"
    },
    {
    "account": "user@hennge.com",
    "created": "2019-05-28 16:40:08",
    "function": "server configuration",
    "name": "group administrator",
    "operation": "sandbox/20190528-001 was reflected."
    },
    {
    "account": "user@hennge.com",
    "created": "2019-06-06 18:48:12",
    "function": "connection IP settings",
    "name": "group administrator",
    "operation": "CMC02071:10.0.2.24 was registered"
    },
    ...
]
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<operationlogs>
<operationlog>
    <created>2019-05-07 14:58:51</created>
    <account>apiadmin@hennge.com</account>
    <name>API group administrator</name>
    <function>error details</function>
    <operation>sandbox downloaded。</operation>
</operationlog>
<operationlog>
    <created>2019-05-28 16:40:08</created>
    <account>user@hennge.com</account>
    <name>group administrator</name>
    <function>server configuration</function>
    <operation>sandbox/20190528-001 was reflected</operation>
</operationlog>
<operationlog>
    <created>2019-06-06 18:48:12</created>
    <account>user@hennge.com</account>
    <name>group admistrator</name>
    <function>Connection IP settings</function>
    <operation>CMC02071:10.0.2.24 was registered</operation>
</operationlog>
....
</operationlogs>
Property Description
created Date and time operation log was recorded (YYYY-MM-DD HH:mm:ss format).
account User account that performed the operation
name User name that performed the operation
function Operated function
operation Operation contents

Error message

Field Error code Message (en) メッセージ (ja)
type 14-001 The specified {0} type is not defined. 指定されたタイプ {0} は定義されていません。
start_date,end_date 14-002 Future date cannot be specified. 将来の日付は指定できません。
start_date 14-003 Please input within 31 days to the search duration. 検索対象期間は31日以内で入力してください。
start_date 10-003 The start_date must be earlier than the end_date. 開始日には終了日以前の日付を指定してください。

Request example

curl -X POST -d 'api_user=testuser' -d 'api_key=password' -d 'server_composition=sandbox' -d 'type=login' https://api.smtps.jp/transaction/v2/auditlogs/list.json

Download

Auditlogs/download provides operation that you can search operation logs and login logs and download them in CSV file format.

Request

/transaction/v2/auditlogs/download.[json|xml]

Access control

Items Value
Role API group administrator
Authorization download permission

Parameter

Parameter Required Data type Description
api_user Yes ASCII Specifies the ID used for user authentication.
api_key Yes ASCII Specifies the secret key used for user authentication.
type Yes ASCII Specifies the log acquisition type.
- Login log: login
- operation log: operation
account No ASCII Searches the account log that partially match the specified string.
start_date No DATE Specifies the search start date(yyyy-mm-dd format) to perform a period search.The search start date is included in the search period.
- restrictions: start_date must be equal to end_date or specify a past date. The search period can be specified up to 1 month (31 days),
- default: the day API is implemented
end_date No DATE Specifies the search end date (yyyy-mm-dd format) to perform a period search.Search end date is included in the search period.
- default: the day API is implemented

Response

If the request is successful, specify the application/octet-stream in Content-Type and download zip compressed CSV file.

Download the password-protected encrypted ZIP file If you have set up data encryption.

File Name

auditlogs-yyyyMMdd_HHmmss.zip (example: auditlogs-20190612_175202.zip)

Login log

If login is specified in the request parameter type, the login log will be returned in the following format.

"created","account","ipaddress","code","result","reason"
"2019-06-12 12:10:55","user@hennge.com","10.0.24.10","1","failed","Password authentication failed"
"2019-06-12 12:11:46","user@hennge.com","10.0.2.24","0","success",""
"2019-06-12 12:31:05","user@hennge.com","","2","logout",""
Property Description
created Date and time login log was recorded (YYYY-MM-DD HH:mm:ss format).
account User account that logged in or logged out.
ipaddress Connection source IP address at login.
code Login log type code.
- 0: success
- 1: failure
- 2: log out.
result Display name of code. Success, failure, or logout.
reason Error reason when login fails.

Operation Log

If operation is specified in the request parameter type, the operation log will be returned in the following format.

"created","account","name","function","operation"
"2019-05-07 14:58:51","apiadmin@hennge.com","API group administrator","error details","sandbox is downloaded."
"2019-05-28 16:40:08","user@hennge.com","group administrator","server configuration","sandbox/20190528-001 is reflected"
"2019-06-06 18:48:12","user@hennge.com","group administrator","connection IP settings","CMC02071:10.0.2.24is registered"
Property Description
created Date and time operation log was recorded (YYYY-MM-DD HH:mm:ss format).
account User account that performed the operation
name User name that performed the operation
function Operated function
operation Operation contents

Error Message

Field Error code message (en) メッセージ (ja)
type 14-001 The specified {0} type is not defined. 指定されたタイプ {0} は定義されていません。
start_date,end_date 14-002 Future date cannot be specified. 将来の日付は指定できません。
start_date 14-003 Please input the search period within 31 days. 検索対象期間は31日以内で入力してください。
start_date 10-003 The start_date must be earlier than the end_date. 開始日には終了日以前の日付を指定してください。

Request example

curl -X POST -d 'api_user=testuser' -d 'api_key=password' -d 'server_composition=sandbox' -d 'type=login' https://api.smtps.jp/transaction/v2/auditlogs/download.json > data.zip