---
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/4371/api/doc/kibana/v9/operation/operation-scheduleriskenginenow
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-scheduleriskenginenow
products:
  - Kibana
---

# Run the risk scoring engine

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

## Paths

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

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

## Description

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

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`

Type: `object`


## 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 /api/risk_score/engine/schedule_now
{}
```

#### curl

```curl
curl -X POST "https://{kibana_url}/api/risk_score/engine/schedule_now" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Response Examples

#### Successful schedule response

```json
{
  "success": true
}
```

#### Task manager is unavailable

```json
{
  "message": "Task Manager is unavailable, but is required by the risk engine. Please enable the taskManager plugin and try again.",
  "status_code": 400
}
```

#### Schedule now failed

```json
{
  "full_error": "{}",
  "message": "Internal server error"
}
```

