Reports
The Reports API is used to retrieve report profiles and data, as well as to create, update, and delete custom reports.
Get report profiles
This API retrieves the details of report profiles. It supports filtering by module name, category name, group name, and report ID.
⚠️ Note: By default, results are sorted in ascending order by module name, followed by category name, group name, and report ID.
OAuth Scope : logs360cloud.reports.READ
Arguments
Maximum: 20 module names
Maximum: 20 category names
Maximum: 20 group names
Maximum: 20 report ids
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("account_id", "18XXXXX4");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://log360cloud.manageengine.com/api/v2/report/profiles"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://log360cloud.manageengine.com/api/v2/report/profiles")
.post(body)
.addHeader("account_id", "18XXXXX4")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
account_id: '18XXXXX4',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://log360cloud.manageengine.com/api/v2/report/profiles', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("log360cloud.manageengine.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'account_id': "18XXXXX4",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/v2/report/profiles", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "log360cloud.manageengine.com",
"port": null,
"path": "/api/v2/report/profiles",
"headers": {
"account_id": "18XXXXX4",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url https://log360cloud.manageengine.com/api/v2/report/profiles \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'account_id: 18XXXXX4' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"module_name": [
"Servers and Workstation"
],
"category_name": [
"Windows"
],
"group_name": [
"Windows Events"
],
"report_id": [
3000000115657
],
"from": 1,
"limit": 1000
}
{
"data": {
"module": [
{
"name": "Servers And Workstation",
"id": 3000000023759,
"category": [
{
"name": "Windows",
"id": 3000000101335,
"group": [
{
"reports": [
{
"annotation": "Showing reports for : All Events",
"report_id": 3000000115657,
"unique_key": "Windows_All_Events",
"report_criteria": "(HOSTTYPE = 'windows')",
"report_type": "normal",
"report_name": "All Events"
}
],
"name": "Windows Events"
}
]
}
]
}
]
},
"meta": {
"total": 1
}
}
{
"code": "00000101",
"title": "Unauthorized",
"detail": "Invalid OAuth Token"
}
{
"error": {
"code": "100003",
"detail": "Invalid or missing mandatory parameters."
}
}
Get report data
This api used to get report data by specifying its unique report ID which can be obtained via the report profiles API.This can be used to search over the first 500000 logs for tabular report.
OAuth Scope : logs360cloud.reports.READ
Arguments
The value must be ≥ 1970-01-01T00:00:00Z. Time zone offsets are supported.
The value must be ≥ 1970-01-01T00:00:00Z. Time zone offsets are supported.
Maximum: 500 log source IDs
Maximum: 500 log source group IDs
Path Parameters
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("account_id", "18XXXXX4");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://log360cloud.manageengine.com/api/v2/report/data/300000002100"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://log360cloud.manageengine.com/api/v2/report/data/300000002100")
.post(body)
.addHeader("account_id", "18XXXXX4")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
account_id: '18XXXXX4',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://log360cloud.manageengine.com/api/v2/report/data/300000002100', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("log360cloud.manageengine.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'account_id': "18XXXXX4",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/v2/report/data/300000002100", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "log360cloud.manageengine.com",
"port": null,
"path": "/api/v2/report/data/300000002100",
"headers": {
"account_id": "18XXXXX4",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url https://log360cloud.manageengine.com/api/v2/report/data/300000002100 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'account_id: 18XXXXX4' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"start_time": "2025-03-27T14:30:00Z",
"end_time": "2025-03-28T14:30:00Z",
"log_source_ids": [
30000000251315,
3000000286357
],
"log_source_group_ids": [
3000000012292,
3000000013071
],
"from": 1,
"limit": 1000
}
{
"response": {
"Time": "2025-02-10 13:44:30",
"Display Name": "TestMachine",
"Severity": "information",
"Log Source": "mitre",
"User Name": "test user",
"Event Id": "1234"
},
"meta": {
"start_index": 200,
"limit": 1,
"total_count": 1
}
}
{
"code": "00000101",
"title": "Unauthorized",
"detail": "Invalid OAuth Token"
}
{
"error": {
"code": "100003",
"detail": "Invalid or missing mandatory parameters."
}
}
Create Custom Report
This API creates a new custom report by specifying the report name and type.
OAuth Scope : logs360cloud.reports.CREATE
Arguments
Allowed values are tabular, summary, pivot, multi and custom_widget.
Maximum: 500 log source group IDs
Maximum: 500 log source IDs
Meta fields are not allowed. Allowed fields can be retrieved using the log fields API
Criteria should follow this pattern:
  (field_name comparator 'value')
where,
  '()' - represents a group
  'comparator' - represents '=', '!=', 'contains',etc.
Example:
- (SEVERITY = 'Emergency,Critical' and HOSTTYPE = 'Windows') or (SEVERITY = 'Warning,Error' and HOSTTYPE = 'Windows')
- (HOSTTYPE contains 'Windo')
Allowed values are default, dateOfMonth, monthOfYear and dayOfWeek which are used for Time field.
Allowed values are default, dateOfMonth, monthOfYear and dayOfWeek which are used for Time field.
Allowed values are default, dateOfMonth, monthOfYear and dayOfWeek which are used for Time field.
Default value is "Top 5". If column_values param is used, "Custom" will be the default value.
Allowed values are Custom, Top 5, Least 5.
Allowed values are Count, Count Distinct, Average, Sum, First Value, Last Value.
For sum and average, only metric fields are allowed. Metric fields can be retrieved from the log-fields API
Maximum: 10 report IDs
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("account_id", "18XXXXX4");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://log360cloud.manageengine.com/api/v2/report"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://log360cloud.manageengine.com/api/v2/report")
.post(body)
.addHeader("account_id", "18XXXXX4")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
account_id: '18XXXXX4',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://log360cloud.manageengine.com/api/v2/report', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("log360cloud.manageengine.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'account_id': "18XXXXX4",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/v2/report", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "log360cloud.manageengine.com",
"port": null,
"path": "/api/v2/report",
"headers": {
"account_id": "18XXXXX4",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request POST \
--url https://log360cloud.manageengine.com/api/v2/report \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'account_id: 18XXXXX4' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"report_name": "Test report",
"report_group": "Test Group",
"report_type": "tabular",
"log_source_group_ids": [
3000000012292,
3000000013071
],
"log_source_ids": [
30000000251315,
3000000286357
],
"report_criteria": "(HOSTTYPE = 'windows')",
"summary_fields": [
{
"field_name": "severity",
"field_unit": ""
}
],
"pivot_fields": {
"row": {
"field_name": "time",
"field_unit": "Default"
},
"column": {
"field_name": "username",
"field_unit": "",
"type": "Custom",
"column_values": [
"user1",
"user2",
"user3"
]
}
},
"aggregation_fields": {
"agg_type": "First Value",
"field_name": "severity"
},
"report_ids": [
3000000012290,
3000000013070
],
"widget_id": 3000000012460
}
{
"report_id": "3000000405109"
}
{
"code": "00000101",
"title": "Unauthorized",
"detail": "Invalid OAuth Token"
}
{
"error": {
"code": "100003",
"detail": "Invalid or missing mandatory parameters."
}
}
Delete custom report
This API deletes one or more custom reports by specifying their unique report IDs
OAuth Scope : logs360cloud.reports.DELETE
Arguments
Headers
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("account_id", "18XXXXX4");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://log360cloud.manageengine.com/api/v2/report"
type: DELETE
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://log360cloud.manageengine.com/api/v2/report")
.delete(body)
.addHeader("account_id", "18XXXXX4")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
account_id: '18XXXXX4',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://log360cloud.manageengine.com/api/v2/report', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("log360cloud.manageengine.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'account_id': "18XXXXX4",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("DELETE", "/api/v2/report", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "log360cloud.manageengine.com",
"port": null,
"path": "/api/v2/report",
"headers": {
"account_id": "18XXXXX4",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
curl --request DELETE \
--url https://log360cloud.manageengine.com/api/v2/report \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'account_id: 18XXXXX4' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"report_ids": [
3000000012290,
3000000013070
]
}
{
"data": {
"title": "success"
}
}
{
"code": "00000101",
"title": "Unauthorized",
"detail": "Invalid OAuth Token"
}
{
"error": {
"code": "100003",
"detail": "Invalid or missing mandatory parameters."
}
}
Update custom report
This API updates an existing custom report by specifying its unique report ID which can be obtained via the report profiles API.
OAuth Scope : logs360cloud.reports.UPDATE
Arguments
Allowed values are tabular, summary, pivot, multi and custom_widget.
Maximum: 500 log source group IDs
Maximum: 500 log source IDs
Meta fields are not allowed. Allowed fields can be retrieved using the log fields API
Criteria should follow this pattern:
  (field_name comparator 'value')
where,
  '()' - represents a group
  'comparator' - represents '=', '!=', 'contains',etc.
Example:
- (SEVERITY = 'Emergency,Critical' and HOSTTYPE = 'Windows') or (SEVERITY = 'Warning,Error' and HOSTTYPE = 'Windows')
- (HOSTTYPE contains 'Windo')
Allowed values are default, dateOfMonth, monthOfYear and dayOfWeek which are used for Time field.
Allowed values are default, dateOfMonth, monthOfYear and dayOfWeek which are used for Time field.
Allowed values are default, dateOfMonth, monthOfYear and dayOfWeek which are used for Time field.
Default value is "Top 5". If column_values param is used, "Custom" will be the default value.
Allowed values are Custom, Top 5, Least 5.
Allowed values are Count, Count Distinct, Average, Sum, First Value, Last Value.
For sum and average, only metric fields are allowed. Metric fields can be retrieved from the log-fields API
Maximum: 10 report IDs
Path Parameters
Headers
parameters_data='{"report_name":"Test report","report_group":"Test Group","report_type":"tabular","log_source_group_ids":[3000000012292,3000000013071],"log_source_ids":[30000000251315,3000000286357],"report_criteria":"(HOSTTYPE = 'windows')","summary_fields":[{"field_name":"severity","field_unit":""}],"pivot_fields":{"row":{"field_name":"time","field_unit":"Default"},"column":{"field_name":"username","field_unit":"","type":"Custom","column_values":["user1","user2","user3"]}},"aggregation_fields":{"agg_type":"First Value","field_name":"severity"},"report_ids":[3000000012290,3000000013070],"widget_id":3000000012460}';
headers_data = Map();
headers_data.put("account_id", "18XXXXX4");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://log360cloud.manageengine.com/api/v2/report/300000002100"
type: PATCH
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"report_name\":\"Test report\",\"report_group\":\"Test Group\",\"report_type\":\"tabular\",\"log_source_group_ids\":[3000000012292,3000000013071],\"log_source_ids\":[30000000251315,3000000286357],\"report_criteria\":\"(HOSTTYPE = 'windows')\",\"summary_fields\":[{\"field_name\":\"severity\",\"field_unit\":\"\"}],\"pivot_fields\":{\"row\":{\"field_name\":\"time\",\"field_unit\":\"Default\"},\"column\":{\"field_name\":\"username\",\"field_unit\":\"\",\"type\":\"Custom\",\"column_values\":[\"user1\",\"user2\",\"user3\"]}},\"aggregation_fields\":{\"agg_type\":\"First Value\",\"field_name\":\"severity\"},\"report_ids\":[3000000012290,3000000013070],\"widget_id\":3000000012460}");
Request request = new Request.Builder()
.url("https://log360cloud.manageengine.com/api/v2/report/300000002100")
.patch(body)
.addHeader("account_id", "18XXXXX4")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PATCH',
headers: {
account_id: '18XXXXX4',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"report_name":"Test report","report_group":"Test Group","report_type":"tabular","log_source_group_ids":[3000000012292,3000000013071],"log_source_ids":[30000000251315,3000000286357],"report_criteria":"(HOSTTYPE = \'windows\')","summary_fields":[{"field_name":"severity","field_unit":""}],"pivot_fields":{"row":{"field_name":"time","field_unit":"Default"},"column":{"field_name":"username","field_unit":"","type":"Custom","column_values":["user1","user2","user3"]}},"aggregation_fields":{"agg_type":"First Value","field_name":"severity"},"report_ids":[3000000012290,3000000013070],"widget_id":3000000012460}'
};
fetch('https://log360cloud.manageengine.com/api/v2/report/300000002100', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("log360cloud.manageengine.com")
payload = "{\"report_name\":\"Test report\",\"report_group\":\"Test Group\",\"report_type\":\"tabular\",\"log_source_group_ids\":[3000000012292,3000000013071],\"log_source_ids\":[30000000251315,3000000286357],\"report_criteria\":\"(HOSTTYPE = 'windows')\",\"summary_fields\":[{\"field_name\":\"severity\",\"field_unit\":\"\"}],\"pivot_fields\":{\"row\":{\"field_name\":\"time\",\"field_unit\":\"Default\"},\"column\":{\"field_name\":\"username\",\"field_unit\":\"\",\"type\":\"Custom\",\"column_values\":[\"user1\",\"user2\",\"user3\"]}},\"aggregation_fields\":{\"agg_type\":\"First Value\",\"field_name\":\"severity\"},\"report_ids\":[3000000012290,3000000013070],\"widget_id\":3000000012460}"
headers = {
'account_id': "18XXXXX4",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PATCH", "/api/v2/report/300000002100", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PATCH",
"hostname": "log360cloud.manageengine.com",
"port": null,
"path": "/api/v2/report/300000002100",
"headers": {
"account_id": "18XXXXX4",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
report_name: 'Test report',
report_group: 'Test Group',
report_type: 'tabular',
log_source_group_ids: [3000000012292, 3000000013071],
log_source_ids: [30000000251315, 3000000286357],
report_criteria: '(HOSTTYPE = \'windows\')',
summary_fields: [{field_name: 'severity', field_unit: ''}],
pivot_fields: {
row: {field_name: 'time', field_unit: 'Default'},
column: {
field_name: 'username',
field_unit: '',
type: 'Custom',
column_values: ['user1', 'user2', 'user3']
}
},
aggregation_fields: {agg_type: 'First Value', field_name: 'severity'},
report_ids: [3000000012290, 3000000013070],
widget_id: 3000000012460
}));
req.end();
curl --request PATCH \
--url https://log360cloud.manageengine.com/api/v2/report/300000002100 \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'account_id: 18XXXXX4' \
--header 'content-type: application/json' \
--data '{"report_name":"Test report","report_group":"Test Group","report_type":"tabular","log_source_group_ids":[3000000012292,3000000013071],"log_source_ids":[30000000251315,3000000286357],"report_criteria":"(HOSTTYPE = '\''windows'\'')","summary_fields":[{"field_name":"severity","field_unit":""}],"pivot_fields":{"row":{"field_name":"time","field_unit":"Default"},"column":{"field_name":"username","field_unit":"","type":"Custom","column_values":["user1","user2","user3"]}},"aggregation_fields":{"agg_type":"First Value","field_name":"severity"},"report_ids":[3000000012290,3000000013070],"widget_id":3000000012460}'
{
"report_name": "Test report",
"report_group": "Test Group",
"report_type": "tabular",
"log_source_group_ids": [
3000000012292,
3000000013071
],
"log_source_ids": [
30000000251315,
3000000286357
],
"report_criteria": "(HOSTTYPE = 'windows')",
"summary_fields": [
{
"field_name": "severity",
"field_unit": ""
}
],
"pivot_fields": {
"row": {
"field_name": "time",
"field_unit": "Default"
},
"column": {
"field_name": "username",
"field_unit": "",
"type": "Custom",
"column_values": [
"user1",
"user2",
"user3"
]
}
},
"aggregation_fields": {
"agg_type": "First Value",
"field_name": "severity"
},
"report_ids": [
3000000012290,
3000000013070
],
"widget_id": 3000000012460
}
{
"report_id": "3000000405109"
}
{
"code": "00000101",
"title": "Unauthorized",
"detail": "Invalid OAuth Token"
}
{
"error": {
"code": "100003",
"detail": "Invalid or missing mandatory parameters."
}
}