Apply a bulk action to anonymization fields

POST /api/security_ai_assistant/anonymization_fields/_bulk_action

Apply a bulk action to multiple anonymization fields. The bulk action is applied to all anonymization fields that match the filter or to the list of anonymization fields by their IDs.

application/json; Elastic-Api-Version=2023-10-31

Body

  • create array[object]
    Hide create attributes Show create attributes object
  • delete object

    Additional properties are allowed.

    Hide delete attributes Show delete attributes object
    • ids array[string]

      Array of anonymization fields IDs

      At least 1 element.

    • query string

      Query to filter anonymization fields

  • update array[object]
    Hide update attributes Show update attributes object

Responses

  • 200 application/json; Elastic-Api-Version=2023-10-31

    Indicates a successful call.

    Hide response attributes Show response attributes object
  • 400 application/json; Elastic-Api-Version=2023-10-31

    Generic Error

    Hide response attributes Show response attributes object
POST /api/security_ai_assistant/anonymization_fields/_bulk_action
curl \
 -X POST https://localhost:5601/api/security_ai_assistant/anonymization_fields/_bulk_action \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31"
Request examples
{
  "create": [
    {
      "allowed": true,
      "anonymized": true,
      "field": "string"
    }
  ],
  "delete": {
    "ids": [
      "string"
    ],
    "query": "string"
  },
  "update": [
    {
      "allowed": true,
      "anonymized": true,
      "id": "string"
    }
  ]
}
Response examples (200)
{
  "anonymization_fields_count": 42,
  "attributes": {
    "errors": [
      {
        "anonymization_fields": [
          {
            "id": "string",
            "name": "string"
          }
        ],
        "err_code": "string",
        "message": "string",
        "status_code": 42
      }
    ],
    "results": {
      "created": [
        {
          "allowed": true,
          "anonymized": true,
          "createdAt": "string",
          "createdBy": "string",
          "field": "string",
          "id": "string",
          "namespace": "string",
          "timestamp": "string",
          "updatedAt": "string",
          "updatedBy": "string"
        }
      ],
      "deleted": [
        "string"
      ],
      "skipped": [
        {
          "id": "string",
          "name": "string",
          "skip_reason": "ANONYMIZATION_FIELD_NOT_MODIFIED"
        }
      ],
      "updated": [
        {
          "allowed": true,
          "anonymized": true,
          "createdAt": "string",
          "createdBy": "string",
          "field": "string",
          "id": "string",
          "namespace": "string",
          "timestamp": "string",
          "updatedAt": "string",
          "updatedBy": "string"
        }
      ]
    },
    "summary": {
      "failed": 42,
      "skipped": 42,
      "succeeded": 42,
      "total": 42
    }
  },
  "message": "string",
  "status_code": 42,
  "success": true
}
Response examples (400)
{
  "error": "string",
  "message": "string",
  "statusCode": 42.0
}