Skip to main content
Atomic Batch Create Policy
curl --request POST \
  --url https://api.coralogix.com/mgmt/openapi/latest/dataplans/policies/v1/bulkCreate \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "policyRequests": [
    {
      "name": "My Policy",
      "priority": "PRIORITY_TYPE_UNSPECIFIED",
      "applicationRule": {
        "name": "<string>",
        "ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED"
      },
      "archiveRetention": {
        "id": "<string>"
      },
      "description": "My Policy Description",
      "disabled": true,
      "logRules": {
        "severities": [
          "SEVERITY_UNSPECIFIED"
        ]
      },
      "placement": {
        "first": {}
      },
      "subsystemRule": {
        "name": "<string>",
        "ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED"
      }
    }
  ]
}
'
{
  "createResponses": [
    {
      "policy": {
        "companyId": 1234,
        "deleted": false,
        "enabled": true,
        "id": "policy_id",
        "name": "My Policy",
        "order": 1,
        "priority": "PRIORITY_TYPE_UNSPECIFIED",
        "applicationRule": {
          "name": "<string>",
          "ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED"
        },
        "archiveRetention": {
          "id": "<string>"
        },
        "createdAt": "2021-01-01T00:00:00.000Z",
        "description": "My Policy Description",
        "logRules": {
          "severities": [
            "SEVERITY_UNSPECIFIED"
          ]
        },
        "subsystemRule": {
          "name": "<string>",
          "ruleTypeId": "RULE_TYPE_ID_UNSPECIFIED"
        },
        "updatedAt": "2021-01-01T00:00:00.000Z"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json

This data structure is used to create multiple policies atomically.

policyRequests
Create Policy Request · object[]
required

This data structue is used to create a new policy.

Response

This data structure is obtained when creating multiple policies atomically.

createResponses
Create Policy Response · object[]
required