Bulk Upsert Asset Criticality Records

POST /api/asset_criticality/bulk

Bulk upsert up to 1000 asset criticality records, creating or updating them as needed.

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

Body

  • records array[object] Required

    At least 1 but not more than 1000 elements.

    Hide records attributes Show records attributes object
    • id_field string Required

      Values are host.name or user.name.

    • id_value string Required

      The ID value of the asset.

    • criticality_level string Required

      The criticality level of the asset.

      Values are low_impact, medium_impact, high_impact, or extreme_impact.

Responses

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

    Bulk upload successful

    Hide response attributes Show response attributes object
    • errors array[object] Required
      Hide errors attributes Show errors attributes object
    • stats object Required

      Additional properties are allowed.

      Hide stats attributes Show stats attributes object
  • File too large

POST /api/asset_criticality/bulk
curl \
 -X POST https://localhost:5601/api/asset_criticality/bulk \
 -H "Content-Type: application/json; Elastic-Api-Version=2023-10-31"
Request example
{
  "records": [
    {
      "id_field": "host.name",
      "id_value": "host-1",
      "criticality_level": "low_impact"
    },
    {
      "id_field": "host.name",
      "id_value": "host-2",
      "criticality_level": "medium_impact"
    }
  ]
}
Response examples (200)
{
  "stats": {
    "total": 2,
    "failed": 1,
    "successful": 1
  },
  "errors": [
    {
      "index": 0,
      "message": "Invalid ID field"
    }
  ]
}