Business Hour
This is the documentation for the Business Hours Conditional Factor Config API in ManageEngine ID360.
Attribute
{
"id": "20000000001",
"display_name": "Office Hours",
"ca_policies_usage_count": 5,
"last_modified_time": "2023-10-01T12:00:00Z",
"business_hours_bitmap": "1111100000000000",
"timezone": "Asia/Kolkata"
}
List All Business Hours
List all conditional factor configurations for business hours.
OAuth Scope : id360.conditional_factor_config.read,id360.conditional_factor_config.all
Query Parameters
eg: id,name,description,is_enabled,assignment,access_type,endpoint_settings,advanced_settings
eg: 50
eg: name eq "Policy 01"
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours")
.get()
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/api/v1/protection/conditionalfactor-configs/businesshours", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditionalfactor-configs/businesshours",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
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.end();
curl --request GET \
--url https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"data": [
{
"id": "20000000001",
"display_name": "Office Hours",
"ca_policies_usage_count": 5,
"last_modified_time": "2023-10-01T12:00:00Z",
"business_hours_bitmap": "1111100000000000",
"timezone": "Asia/Kolkata"
},
{
"id": "20000000002",
"display_name": "Remote Support Hours",
"ca_policies_usage_count": 3,
"last_modified_time": "2023-10-01T12:00:00Z",
"business_hours_bitmap": "0000011111000000",
"timezone": "America/New_York"
}
],
"meta": {
"start_index": 1,
"limit": 100,
"total_no_of_objects": 3
}
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Create Business Hours
Create a conditional factor configuration for business hours.
OAuth Scope : id360.conditional_factor_config.create,id360.conditional_factor_config.all
Arguments
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours"
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://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours")
.post(body)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("POST", "/api/v1/protection/conditionalfactor-configs/businesshours", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditionalfactor-configs/businesshours",
"headers": {
"Accept": "application/json",
"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://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'
{
"display_name": "Office Hours",
"business_hours_bitmap": "1111100000000000",
"timezone": "Asia/Kolkata"
}
{
"id": "20000000001",
"display_name": "Office Hours",
"ca_policies_usage_count": 5,
"last_modified_time": "2023-10-01T12:00:00Z",
"business_hours_bitmap": "1111100000000000",
"timezone": "Asia/Kolkata"
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Bulk Delete Business Hours
Bulk delete conditional factor configurations for business hours.
OAuth Scope : id360.conditional_factor_config.delete,id360.conditional_factor_config.all
Query Parameters
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours?ids=2000000000001,2000000000002"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours?ids=2000000000001%2C2000000000002")
.delete(null)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours?ids=2000000000001%2C2000000000002', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/api/v1/protection/conditionalfactor-configs/businesshours?ids=2000000000001%2C2000000000002", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditionalfactor-configs/businesshours?ids=2000000000001%2C2000000000002",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
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.end();
curl --request DELETE \
--url 'https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours?ids=2000000000001%2C2000000000002' \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
[
{
"resource_id": "2000000000001",
"status": 204
},
{
"resource_id": "2000000000002",
"status": 404,
"error": {
"code": "*****",
"title": "Conditional Factor Config Not Found",
"detail": "The conditional factor configuration with the specified ID does not exist."
}
}
]
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Get Business Hours by ID
Retrieve a conditional factor configuration for business hours by its ID.
OAuth Scope : id360.conditional_factor_config.read,id360.conditional_factor_config.all
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001")
.get()
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
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.end();
curl --request GET \
--url https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001 \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"id": "20000000001",
"display_name": "Office Hours",
"ca_policies_usage_count": 5,
"last_modified_time": "2023-10-01T12:00:00Z",
"business_hours_bitmap": "1111100000000000",
"timezone": "Asia/Kolkata"
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "*****",
"title": "Conditional Factor Config Not Found",
"detail": "The business hour configuration with the specified ID does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Update Business Hours by ID
Update a conditional factor configuration for business hours by its ID.
OAuth Scope : id360.conditional_factor_config.update,id360.conditional_factor_config.all
Arguments
parameters_data='{"display_name":"Office Hours","business_hours_bitmap":"1111100000000000","timezone":"Asia/Kolkata"}';
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001"
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, "{\"display_name\":\"Office Hours\",\"business_hours_bitmap\":\"1111100000000000\",\"timezone\":\"Asia/Kolkata\"}");
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001")
.patch(body)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'PATCH',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f',
'content-type': 'application/json'
},
body: '{"display_name":"Office Hours","business_hours_bitmap":"1111100000000000","timezone":"Asia/Kolkata"}'
};
fetch('https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
payload = "{\"display_name\":\"Office Hours\",\"business_hours_bitmap\":\"1111100000000000\",\"timezone\":\"Asia/Kolkata\"}"
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f",
'content-type': "application/json"
}
conn.request("PATCH", "/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "PATCH",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001",
"headers": {
"Accept": "application/json",
"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({
display_name: 'Office Hours',
business_hours_bitmap: '1111100000000000',
timezone: 'Asia/Kolkata'
}));
req.end();
curl --request PATCH \
--url https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001 \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \
--header 'content-type: application/json' \
--data '{"display_name":"Office Hours","business_hours_bitmap":"1111100000000000","timezone":"Asia/Kolkata"}'
{
"display_name": "Office Hours",
"business_hours_bitmap": "1111100000000000",
"timezone": "Asia/Kolkata"
}
{
"id": "20000000001",
"display_name": "Office Hours",
"ca_policies_usage_count": 5,
"last_modified_time": "2023-10-01T12:00:00Z",
"business_hours_bitmap": "1111100000000000",
"timezone": "Asia/Kolkata"
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "*****",
"title": "Conditional Factor Config Not Found",
"detail": "The business hour configuration with the specified ID does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
Delete Business Hours by ID
Delete a conditional factor configuration for business hours by its ID.
OAuth Scope : id360.conditional_factor_config.delete,id360.conditional_factor_config.all
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001"
type: DELETE
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001")
.delete(null)
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'DELETE',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("DELETE", "/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "DELETE",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
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.end();
curl --request DELETE \
--url https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001 \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "*****",
"title": "Conditional Factor Config Not Found",
"detail": "The business hour configuration with the specified ID does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}
List Conditional Access Policies for a business hour
List all conditional access policies associated with a specific business hour configuration.
OAuth Scope : id360.conditional_factor_config.read,id360.conditional_factor_config.all
Query Parameters
eg: 50
eg: name eq "Policy 01"
headers_data = Map();
headers_data.put("Accept", "application/json");
headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f");
response = invokeUrl
[
url: "https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001/conditional-access-policies"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001/conditional-access-policies")
.get()
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
}
};
fetch('https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001/conditional-access-policies', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("id360.manageengine.com")
headers = {
'Accept': "application/json",
'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
conn.request("GET", "/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001/conditional-access-policies", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "id360.manageengine.com",
"port": null,
"path": "/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001/conditional-access-policies",
"headers": {
"Accept": "application/json",
"Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"
}
};
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.end();
curl --request GET \
--url https://id360.manageengine.com/api/v1/protection/conditionalfactor-configs/businesshours/2000000000001/conditional-access-policies \
--header 'Accept: application/json' \
--header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'
{
"data": [
[
{
"id": "2000000000001",
"name": "Policy 01",
"associated_endpoints": [
"Computer Devices",
"VPN & Radius Endpoints"
]
},
{
"id": "2000000000002",
"name": "Policy 02",
"associated_endpoints": [
"All Endpoints"
]
},
{
"id": "2000000000003",
"name": "Policy 03",
"associated_endpoints": [
"Computer Devices"
]
}
]
],
"meta": {
"start_index": 1,
"limit": 100,
"total_no_of_objects": 3
}
}
{
"error": {
"code": "00000101",
"title": "Unauthorized",
"detail": "The OAuth token is invalid."
}
}
{
"error": {
"code": "*****",
"title": "Conditional Factor Config Not Found",
"detail": "The business hour configuration with the specified ID does not exist."
}
}
{
"error": {
"code": "00000000",
"title": "Internal Server Error",
"detail": "An unexpected internal error has occurred on the server. Please try again later."
}
}