2.26.2 Collecting, into a CSV file, a list of events
This request collects, into a CSV file, a list of events.
Execution permission
Admin, Modify
API version
v1
Request format
POST http[s]://host:port/Analytics/version/services/Events/actions/getEventDataCSV/invoke
Request body
The structure of the request body and the object attributes are as follows:{
"name":"...",
"href":"...",
"method":"...",
"type":"...",
"parameters":[{
"hqlFilter":"...",
"hqlSort":"...",
"page":"...",
"pageSize":"..."
},
:
]
}
Action (Type: Action)
|
Attribute |
Type |
Description |
|---|---|---|
|
name |
string |
Name of the execute an operation. |
|
href |
string |
URL of the execute an operation. |
|
method |
string |
Name of the method. |
|
type |
string |
Data format of the object. |
|
parameters |
ListGetParam[] |
A list of ListGetParam objects necessary to execute an operation. For details about ListGetParam, see the table below. |
parameters (Type: ListGetParam)
|
Attribute |
Type |
Description |
|---|---|---|
|
hqlFilter |
string |
filter |
|
hqlSort |
string |
Sort information |
|
page |
integer |
page number |
|
pageSize |
integer |
Size of The page |
Response body
The structure of the response body and the object attributes are as follows:{
"instanceID":"...",
"created":"...",
"updated":"...",
"completed":"...",
"state":"...",
"affectedResource":["...", ...],
"result":[{
"data":"..."
},
:
]
}
Job (Type: Job)
|
Attribute |
Type |
Description |
|---|---|---|
|
instanceID |
string |
Indicates the ID of the Instance. |
|
created |
string |
Indicates the date the object is generated in ISO 8601 format. |
|
updated |
string |
Indicates the time the object is updated in ISO 8601 format. The same value as for "created" is set. |
|
completed |
string |
Indicates the time the processing completed in ISO 8601 format. The same value as for "created" is set. |
|
state |
string |
One of the following values is set: "failed": The operation did not terminate normally. "success": The operation terminated normally. |
|
affectedResource |
string[] |
Indicates the URL of the API resource created or updated as a result of the operation. If no resources exist, this parameter is empty. |
|
result |
CsvData[] |
A list of CsvData objects. For details about CsvData, see the table below. |
result (Type: CsvData)
|
Attribute |
Type |
Description |
|---|---|---|
|
data |
string |
The CSV data is stored. |
Status codes
|
Status code |
Reason phrase |
Description |
|---|---|---|
|
200 |
OK |
Success. |
|
400 |
Bad Request |
A format of request body is invalid. |
|
401 |
Unauthorized |
No login privilege. |
|
403 |
Forbidden |
No execute privilege. |
|
412 |
Precondition Failed |
The server is not available. |
|
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header]
POST /Analytics/v1/services/Events/actions/getEventDataCSV/invoke HTTP/1.1
Host: JP1OAServer:22015
User-Agent: curl/7.63.0
Accept: application/json
Accept-Language: ja
Content-Type: application/json
Authorization: Basic c3lzdGVtOm1hbmFnZXI=
Content-Length: 292
[Request Body]
{
"name" : "getEventDataCSV",
"href" : "http://JP1OAServer:22015/Analytics/v1/services/Events/actions/getEventDataCSV/invoke",
"method" : "POST",
"type" : "application/json",
"parameters" : [ {
"hqlFilter" : "",
"hqlSort" : "dateTime DESC",
"page" : 1,
"pageSize" : 100
} ]
}
[Response Header]
HTTP/1.1 200 OK
Date: Thu, 12 Sep 2019 04:40:05 GMT
Server: Cosminexus HTTP Server
Cache-Control: no-cache
WWW-Authenticate: HSSO 352df2998a8291f9ee75bb5f4c4ecd6a03581_ZAlDSFUHGHp9UB8WcRQLdA==_V0810
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Content-Type: application/json
[Response Body]
{
"instanceID" : "83458bae-a082-4333-8628-73f2efd35436",
"created" : "2019-09-12T13:40:05.248+09:00",
"updated" : "2019-09-12T13:40:09.585+09:00",
"completed" : "2019-09-12T13:40:09.585+09:00",
"state" : "success",
"affectedResource" : [ ],
"result" : [ {
"data" : "#JP1/Operations Analytics,115000,UTF-8 (BOM)\n#Event Information\n#2019-09-12T13:40:09.585+0900\n#Event ID,.........."
} ]
}