---
type: api
title: Upsert an asset criticality record
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v9/operation/operation-createassetcriticalityrecord
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/v9/operation/operation-createassetcriticalityrecord
products:
  - Kibana
---

# Upsert an asset criticality record

deprecated

- Server: `https://{kibana_url}`

## Paths

- `POST` `/api/asset_criticality`
- `POST` `/s/{space_id}/api/asset_criticality`

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

**Deprecated in 9.4.0.** Use the Entity Store APIs to assign asset criticality to an entity.

Create or update an asset criticality record for a specific entity.

If a record already exists for the specified entity, that record is overwritten with the specified value. If a record doesn't exist for the specified entity, a new record is created.

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Request body

`application/json`

- `id_field` (enum) — required
  Values: `host.name`, `user.name`, `service.name`, `entity.id`
- `id_value` (string) — required
  The ID value of the asset.
- `criticality_level` (enum) — required
  The criticality level of the asset.
  Values: `low_impact`, `medium_impact`, `high_impact`, `extreme_impact`
- `refresh` (enum) — optional
  If 'wait_for' the request will wait for the index refresh.
  Values: `wait_for`

## Responses

#### `200`

Successful response

`application/json`

- `id_field` (enum)
  Values: `host.name`, `user.name`, `service.name`, `entity.id`
- `id_value` (string)
  The ID value of the asset.
- `criticality_level` (enum)
  The criticality level of the asset.
  Values: `low_impact`, `medium_impact`, `high_impact`, `extreme_impact`
- `asset` (object)
  - `criticality` (enum)
    The criticality level of the asset.
    Values: `low_impact`, `medium_impact`, `high_impact`, `extreme_impact`
- `entity` (object)
  - `asset` (object)
    - `criticality` (enum)
      The criticality level of the asset.
      Values: `low_impact`, `medium_impact`, `high_impact`, `extreme_impact`
  - `id` (string)
- `host` (object)
  - `asset` (object)
    - `criticality` (enum)
      The criticality level of the asset.
      Values: `low_impact`, `medium_impact`, `high_impact`, `extreme_impact`
  - `name` (string)
- `service` (object)
  - `asset` (object)
    - `criticality` (enum)
      The criticality level of the asset.
      Values: `low_impact`, `medium_impact`, `high_impact`, `extreme_impact`
  - `name` (string)
- `user` (object)
  - `asset` (object)
    - `criticality` (enum)
      The criticality level of the asset.
      Values: `low_impact`, `medium_impact`, `high_impact`, `extreme_impact`
  - `name` (string)
- `@timestamp` (string · format: date-time)
  The time the record was created or updated.
#### `400`

Invalid request

## Code examples

#### Console

```console
POST kbn:/api/asset_criticality
{
  "criticality_level": "high_impact",
  "id_field": "host.name",
  "id_value": "my_host"
}
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/asset_criticality" \
  -H "Authorization: ApiKey ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "criticality_level": "high_impact",
    "id_field": "host.name",
    "id_value": "my_host"
  }'
```

