This is the default response format. This means that if you leave out the mode object from the request body, the response will automatically be returned in this format. So, to receive responses in JSON format, you can either leave the mode object out of the request or you can specify it like this: Code Block |
---|
"mode": {
"type":"json"
} |
The JSON response will include the following fields: Field name | Type | Description |
---|
msg/error
| string
| This describes the error in the case that the request was not successful. This field will be named msg or error depending on the type of error returned. The corresponding error code will be shown in the status field. Check the possible codes and corresponding messages below. | status
| integer
| Numeric value that specifies the error code. When it shows 0 , it means no error occurred. These are the possible error codes that you may get. The corresponding error descriptions will be displayed in the msg/error field. Also, when you get a 400 status code and the error Bad parameters , the object field will include more information about the specific error returned, as in the following example: Code Block |
---|
{
"error": "Bad parameters",
"status": 400,
"timestamp": 1584033078759,
"cid": "XXXX",
"object": [
"405: Date from not valid or not found"
]
} |
| object
| object
| This object contains the query result. The format of the object's content depends on the query data. | cid
| string
| An ID value to uniquely identify yourself across multiple systems. | timestamp
| string
| Indicates the moment when a certain event occurred. |
Example Here is a response in JSON format that occurred without error. Code Block |
---|
{
"status": 0,
"cid": "ue7bt8PFMN",
"timestamp": 1528308389081,
"msg": "",
"object": [
{
"eventdate": "2016-10-24 06:35:00.000",
"host": "aws-apiodata-euw1-52-49-216-97",
"memory_heap_used": "3.049341704E9",
"memory_non_heap_used": "1.21090632E8"
},
{
"eventdate": "2016-10-24 06:36:00.000",
"host": "aws-apiodata-euw1-52-49-216-97",
"memory_heap_used": "3.04991028E9",
"memory_non_heap_used": "1.21090632E8"
},
{
"eventdate": "2016-10-24 06:37:00.000",
"host": "aws-apiodata-euw1-52-49-216-97",
"memory_heap_used": "3.050472496E9",
"memory_non_heap_used": "1.21090632E8"
},
………
} |
Rw expand |
---|
title | Response type JSON/compact |
---|
|
To receive responses in JSON/compact format, specify the mode object in your request like this: Code Block |
---|
"mode": {
"type":"json/compact"
} |
The JSON/compact response will include the following fields: Field name | Description |
---|
type
| The data type of the value returned. This will be one of: | index
| An integer value that indicates the position of the field's value in the arrays returned in the object.d object. |
Field name | Description |
---|
name
| Name of the field. | type
| The data type of the value returned. This will be one of: |
Example Here is an example of a response in JSON/compact format that occurred without error: Code Block |
---|
{
"m": {
"eventdate": {
"type": "timestamp",
"index": 0
},
"level": {
"type": "str",
"index": 1
},
"srcPort": {
"type": "int4",
"index": 2
}
},
"metadata": [
{
"name": "eventdate",
"type": "timestamp"
},
{
"name": "level",
"type": "str"
},
{
"name": "srcPort",
"type": "int4"
}
],
"d": [
[
1519989828006,
"INFO",
51870
],
[
1519989828392,
"INFO",
51868
],
[
1519989830837,
"INFO",
55514
]
]
} |
Rw expand |
---|
title | Response type JSON/simple |
---|
|
To receive responses in JSON/simple format, specify the mode object in your request like this: Code Block |
---|
"mode": {
"type":"json/simple"
} |
The response is a stream of JSON objects of the values that the query generates with the structure below. When the query does not generate more information, the connection is closed by the server. In case no date to value is requested, the connections are kept alive. Example Code Block |
---|
{"eventdate":1488369600000,"domain":"none","userEmail":"","country":null,"count":3}
{"eventdate":1488369600000,"domain":"user1@devo.com","userEmail":"0:0:0:0:0:0:0:1","country":null,"count":18}
{"eventdate":1488369600000,"domain":"none","userEmail":"user2@devo.com","country":null,"count":7}
{"eventdate":1488373200000,"domain":"user3@devo.com","userEmail":"127.0.0.1","country":null,"count":10}
{"eventdate":1488373200000,"domain":"user4@devo.com","userEmail":"0:0:0:0:0:0:0:1","country":null,"count":28}
{"eventdate":1488373200000,"domain":"dom","userEmail":"user5@devo.com","country":null,"count":15}
... |
Rw expand |
---|
title | Response type JSON/simple/compact |
---|
|
To receive responses in JSON/simple/compact format, specify the mode object in your request like this: Code Block |
---|
"mode": {
"type":"json/simple/compact"
} |
The response is a stream of JSON objects with the following structure: Field name | Description |
---|
type
| The data type of the value returned. This will be one of: | index
| An integer value that indicates the position of the field's value in the arrays returned in the object.d object. |
Field name | Description |
---|
name
| Name of the field. | type
| The data type of the value returned. This will be one of: |
When the query does not generate more information, the connection is closed by the server. In case no date to value is requested, the connections are kept alive. Info |
---|
Progress data in timestamp You can receive a timestamp indicating the progress data as an entry p in your response, if the progressInfo parameter is set to true in the request. |
Example Code Block |
---|
{
"m":{
"eventdate":{
"type":"timestamp",
"index":0
},
"level":{
"type":"str",
"index":1
},
"srcPort":{
"type":"int4",
"index":2
}
},
"metadata":[
{
"name": "eventdate",
"type": "timestamp"
},
{
"name": "level",
"type": "str"
},
{
"name": "srcPort",
"type": "int4"
}
]
}
{
"d":[
1519989516834,
"INFO",
49756
]
}
{
"d":[
1519989516874,
"INFO",
51472
]
}
{
"d":[
1519989517774,
"INFO",
49108
]
}
{
"p":[
1519989537574
]
}
{"d":[
1519989538794,
"INFO",
49108
]
} |
Rw expand |
---|
title | Response type MsgPack |
---|
|
To receive responses in MsgPack format, specify the mode object in your request like this: Code Block |
---|
"mode": {
"type":"msgpack"
} |
The response format is the same as a JSON object, but encoded using MsgPack, an efficient binary serialization format. See the msgpack website for more information. To receive responses in CSV format, specify the mode object in your request like this: Code Block |
---|
"mode": {
"type":"csv"
} |
The system will return the information in CSV (Comma Separated Values) format. The following is a simple example of a CSV response. Example eventdate,domain,userEmail,country,count
2017-03-01 12:00:00.000,none,,,3
2017-03-01 12:00:00.000,user1@devo.com,0:0:0:0:0:0:0:1,,18
2017-03-01 12:00:00.000,none,user2@devo.com,,7
2017-03-01 13:00:00.000,user3@devo.com,127.0.0.1,,10
2017-03-01 13:00:00.000,user4@devo.com,0:0:0:0:0:0:0:1,,28
2017-03-01 13:00:00.000,dom,user5@devo.com,,15
|
---|
To receive responses in TSV format, specify the mode object in your request like this: Code Block |
---|
"mode": {
"type":"tsv"
} |
The system will return the information in CSV (Comma Separated Values) format. The following is a simple example of a TSV response. Example eventdate domain userEmail country count
2017-03-01 12:00:00.000 none 3
2017-03-01 12:00:00.000 user1@devo.com 0:0:0:0:0:0:0:1 18
2017-03-01 12:00:00.000 none user2@devo.com 7
2017-03-01 13:00:00.000 user3@devo.com 127.0.0.1 10
2017-03-01 13:00:00.000 user4@devo.com 0:0:0:0:0:0:0:1 28
2017-03-01 13:00:00.000 dom user5@devo.com 15
|
---|
To receive responses in XLS format, specify the mode object in your request like this: Code Block |
---|
"mode": {
"type":"xls"
} |
The system sends the query results in a Microsoft Excel format file. |