Policies Service

Create Policy

Creates a new data policy.

post/dataplans/policies/v1

Request

  • Base URL: https://api.eu1.coralogix.com/mgmt/openapi/5
  • URL: https://api.eu1.coralogix.com/mgmt/openapi/5/dataplans/policies/v1
  • Auth: API key in header Authorization

Request body

OR
OR

Example request

{
  "description": "My Policy Description",
  "name": "My Policy",
  "priorityOverride": {
    "quotaBased": {
      "usageTiers": [
        {
          "daily_quota_percentage": 80,
          "priority": "PRIORITY_TYPE_HIGH"
        }
      ]
    }
  },
  "spanRules": {
    "tagRules": [
      {
        "tagName": "tags.environment",
        "tagValue": "tag_value"
      }
    ]
  },
  "targets": [
    {
      "archive_retention": {
        "id": "archive_retention_id"
      },
      "dataset": "dataset1",
      "name": "My Target",
      "priority": "PRIORITY_TYPE_HIGH"
    }
  ]
}

Response

Example response

{
  "policy": {
    "companyId": 1234,
    "createdAt": "2021-01-01T00:00:00.000Z",
    "description": "My Policy Description",
    "enabled": true,
    "id": "3dc02998-0b50-4ea8-b68a-4779d716fa1f",
    "name": "My Policy",
    "order": 1,
    "priorityOverride": {
      "quotaBased": {
        "usageTiers": [
          {
            "daily_quota_percentage": 80,
            "priority": "PRIORITY_TYPE_HIGH"
          }
        ]
      }
    },
    "spanRules": {
      "tagRules": [
        {
          "tagName": "tags.environment",
          "tagValue": "tag_value"
        }
      ]
    },
    "targets": [
      {
        "name": "My Target",
        "dataset": "dataset1",
        "priority": "PRIORITY_TYPE_HIGH",
        "archive_retention": {
          "id": "archive_retention_id"
        }
      }
    ],
    "updatedAt": "2021-01-01T00:00:00.000Z"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.