No description available
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/policies:bulkCreate';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"policyRequests":[{"name":"My Policy","description":"My Policy Description","priority":"PRIORITY_TYPE_UNSPECIFIED","applicationRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"subsystemRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"archiveRetention":{"id":"string"},"logRules":{"severities":["SEVERITY_UNSPECIFIED"]},"spanRules":{"serviceRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"actionRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"tagRules":[{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","tagName":"tag_name","tagValue":"tag_value"}]}}]}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"createResponses": [
{
"policy": {
"id": "policy_id",
"companyId": 1234,
"name": "My Policy",
"description": "My Policy Description",
"priority": "PRIORITY_TYPE_UNSPECIFIED",
"deleted": false,
"enabled": true,
"order": 1,
"applicationRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"subsystemRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"logRules": {
"severities": [
"SEVERITY_UNSPECIFIED"
]
},
"spanRules": {
"serviceRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"actionRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"tagRules": [
{
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"tagName": "tag_name",
"tagValue": "tag_value"
}
]
},
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z",
"archiveRetention": {
"id": "<string>"
}
}
}
]
}
API key authentication
This data structure is used to create multiple policies atomically.
A successful response.
This data structure is obtained when creating multiple policies atomically.
Was this page helpful?
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/policies:bulkCreate';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"policyRequests":[{"name":"My Policy","description":"My Policy Description","priority":"PRIORITY_TYPE_UNSPECIFIED","applicationRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"subsystemRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"archiveRetention":{"id":"string"},"logRules":{"severities":["SEVERITY_UNSPECIFIED"]},"spanRules":{"serviceRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"actionRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"tagRules":[{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","tagName":"tag_name","tagValue":"tag_value"}]}}]}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"createResponses": [
{
"policy": {
"id": "policy_id",
"companyId": 1234,
"name": "My Policy",
"description": "My Policy Description",
"priority": "PRIORITY_TYPE_UNSPECIFIED",
"deleted": false,
"enabled": true,
"order": 1,
"applicationRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"subsystemRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"logRules": {
"severities": [
"SEVERITY_UNSPECIFIED"
]
},
"spanRules": {
"serviceRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"actionRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"tagRules": [
{
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"tagName": "tag_name",
"tagValue": "tag_value"
}
]
},
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z",
"archiveRetention": {
"id": "<string>"
}
}
}
]
}
No description available
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/policies:bulkCreate';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"policyRequests":[{"name":"My Policy","description":"My Policy Description","priority":"PRIORITY_TYPE_UNSPECIFIED","applicationRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"subsystemRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"archiveRetention":{"id":"string"},"logRules":{"severities":["SEVERITY_UNSPECIFIED"]},"spanRules":{"serviceRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"actionRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"tagRules":[{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","tagName":"tag_name","tagValue":"tag_value"}]}}]}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"createResponses": [
{
"policy": {
"id": "policy_id",
"companyId": 1234,
"name": "My Policy",
"description": "My Policy Description",
"priority": "PRIORITY_TYPE_UNSPECIFIED",
"deleted": false,
"enabled": true,
"order": 1,
"applicationRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"subsystemRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"logRules": {
"severities": [
"SEVERITY_UNSPECIFIED"
]
},
"spanRules": {
"serviceRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"actionRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"tagRules": [
{
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"tagName": "tag_name",
"tagValue": "tag_value"
}
]
},
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z",
"archiveRetention": {
"id": "<string>"
}
}
}
]
}
API key authentication
This data structure is used to create multiple policies atomically.
A successful response.
This data structure is obtained when creating multiple policies atomically.
Was this page helpful?
const fetch = require('node-fetch');
let url = 'https://api.coralogix.com/mgmt/openapi/v1/policies:bulkCreate';
let options = {
method: 'POST',
headers: {Authorization: 'Bearer <API_KEY>', 'content-type': 'application/json'},
body: '{"policyRequests":[{"name":"My Policy","description":"My Policy Description","priority":"PRIORITY_TYPE_UNSPECIFIED","applicationRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"subsystemRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"archiveRetention":{"id":"string"},"logRules":{"severities":["SEVERITY_UNSPECIFIED"]},"spanRules":{"serviceRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"actionRule":{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","name":"string"},"tagRules":[{"ruleTypeId":"RULE_TYPE_ID_UNSPECIFIED","tagName":"tag_name","tagValue":"tag_value"}]}}]}'
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
{
"createResponses": [
{
"policy": {
"id": "policy_id",
"companyId": 1234,
"name": "My Policy",
"description": "My Policy Description",
"priority": "PRIORITY_TYPE_UNSPECIFIED",
"deleted": false,
"enabled": true,
"order": 1,
"applicationRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"subsystemRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"logRules": {
"severities": [
"SEVERITY_UNSPECIFIED"
]
},
"spanRules": {
"serviceRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"actionRule": {
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"name": "<string>"
},
"tagRules": [
{
"ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED",
"tagName": "tag_name",
"tagValue": "tag_value"
}
]
},
"createdAt": "2021-01-01T00:00:00.000Z",
"updatedAt": "2021-01-01T00:00:00.000Z",
"archiveRetention": {
"id": "<string>"
}
}
}
]
}