---
type: api
title: Run the risk scoring engine
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-scheduleriskenginenow
resource: https://www.elastic.co/elastic/docs-builder/docs/4641/api/doc/kibana/v8/operation/operation-scheduleriskenginenow
products:
  - Kibana
---

# Run the risk scoring engine

Authentication: required

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

## Paths

- `POST` `/api/risk_score/engine/schedule_now`
- `POST` `/s/{space_id}/api/risk_score/engine/schedule_now`

#### Path parameters

- `space_id` (string) — optional
  An identifier for the space. If `space_id` is not provided in the URL, the default space is used. Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

## Description

Schedule the risk scoring engine to run as soon as possible. You can use this to recalculate entity risk scores after updating their asset criticality.

## Request body

`application/json`


## Responses

#### `200`

Successful response

`application/json`

- `success` (boolean)
#### `400`

Task manager is unavailable

`application/json`

- `message` (string)
- `status_code` (integer · min: 400)
#### `default`

Unexpected error

`application/json`

- `full_error` (string)
- `message` (string)
## Code examples

#### Console

```console
POST kbn:/api/risk_score/engine/schedule_now
```

#### curl

```curl
curl -X POST "${KIBANA_URL}/api/risk_score/engine/schedule_now" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### 200

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "success": false
}
```

#### 400

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "message": "string",
  "status_code": 0
}
```

#### default

`application/json`

Generated from the API spec. Values are representative. Unions use the first variant; deeply nested or large bodies may omit fields.

```json
{
  "full_error": "string",
  "message": "string"
}
```

