# Scoring Run Event

POST

Sent when a batch of output scoring settles, however it was triggered.

## Authorizations

* **[bearerAuth](/docs/v2/rest-api#bearerauth)**
* **[oauth2](/docs/v2/rest-api#oauth2)**

## Request Bodyrequired

_ScoringRunWebhookEvent_

Delivered when a scoring run settles.

Also raised for the automatic scoring that follows a generation, in which case `data`carries the `inference_id` of the generation whose outputs were judged.

object

**id**

required

_Id_

Unique event id, repeated in the webhook-id header.

string

**type**

required

_WebhookEventType_

Scoring\_run.completed or scoring\_run.failed.

string

Allowed values: inference.completed inference.failed inference.cancelled training.succeeded training.failed scoring\_run.completed scoring\_run.failed workflow\_run.succeeded workflow\_run.failed workflow\_run.cancelled

**created\_at**

required

_Created At_

When the event was raised (RFC 3339).

string

**data**

required

_GetScoringRunOutput_

Identical to the body of GET on the scoring run.

object

**scoring\_run\_id**

required

_Scoring Run Id_

Unique identifier for this scoring run.

string format: uuid

**status**

required

_ScoringRunStatus_

Current status: pending, complete, or failed.

string

Allowed values: pending complete failed

**inference\_id**

_Inference Id_

The generation whose outputs this run judged, when it was started automatically.

string format: uuid

nullable

**poll\_interval\_seconds**

_Poll Interval Seconds_

Suggested polling interval in seconds. Present while pending.

integer

nullable

**requested\_pair\_count**

required

_Requested Pair Count_

How many (file, rule) pairs the run set out to judge.

integer

**completed\_pair\_count**

required

_Completed Pair Count_

How many produced a verdict. Lower than requested means some pairs went unjudged.

integer

**file\_ids**

_File Ids_

The files the run was asked to judge.

Array<string>

default: 

**rule\_ids**

_Rule Ids_

The rules the run judged against.

Array<string>

default: 

**scores**

_Scores_

The verdicts recorded. Present once the run is complete.

Array<object>

nullable

_ScoringRunFileScore_object

**file\_id**

required

_File Id_

The file this verdict is about.

string format: uuid

**rule\_id**

required

_Rule Id_

The scoring rule that produced it.

string format: uuid

**rule\_name**

required

_Rule Name_

The rule’s name as it stood when the verdict was recorded.

string

**score**

required

_Score_

Score in \[0, 100\] against that rule.

integer

**rationale**

_Rationale_

The judge’s reasoning, in its own words.

string

""

**finished\_at**

_Finished At_

When the run settled. Present once terminal.

string format: date-time

nullable

**error**

_Error_

Error message. Present only on failed.

string

nullable

**error\_code**

_Error Code_

Machine-readable error code. Present only on failed.

string

nullable

**webhook**

Any of:

**WebhookStatusView**

_WebhookStatusView_

What a job’s `GET` reports about the callback attached to it.

The URL is echoed so a caller can tell which of its endpoints a run was aimed at; the rest is how the delivery went, which is the only place a failed delivery is visible.

object

**url**

required

_Url_

The callback URL this run was submitted with.

string

**status**

required

_WebhookDeliveryStatus_

Pending until a delivery settles, then delivered or failed.

string

Allowed values: pending delivered failed

**attempts**

required

_Attempts_

How many delivery attempts have been made.

integer

**last\_attempt\_at**

_Last Attempt At_

When the last attempt was made.

string format: date-time

nullable

**last\_response\_status**

_Last Response Status_

HTTP status the receiver returned on the last attempt, if it responded.

integer

nullable

**last\_error**

_Last Error_

Why the last attempt did not succeed. Null once delivered.

string

nullable

**null**

null

**metadata**

_Metadata_

Whatever you sent as webhook.metadata.

object

**_key_**

additional properties

string

## Responses

### 200

Successful Response

##### Examplegenerated

```json
example
```

### 422

Validation Error

_HTTPValidationError_object

**detail**

_Detail_

Array<object>

_ValidationError_object

**loc**

required

_Location_

Array

**msg**

required

_Message_

string

**type**

required

_Error Type_

string

**input**

_Input_

**ctx**

_Context_object

##### Examplegenerated

```json
{
  "detail": [
    {
      "loc": [
        "example"
      ],
      "msg": "example",
      "type": "example",
      "input": "example",
      "ctx": {}
    }
  ]
}
```
