# Read a file's scores

GET

/v1/workspaces/{workspace\_id}/files/{file\_id}/scores

```bash
curl --request GET \
  --url https://api.app.layer.ai/api/v1/workspaces/:workspace_id/files/:file_id/scores \
  --header 'Authorization: Bearer <token>'
```

```python
import requests


url = "https://api.app.layer.ai/api/v1/workspaces/:workspace_id/files/:file_id/scores"


headers = {"Authorization": "Bearer <token>"}


response = requests.get(url, headers=headers)


print(response.json())
```

```js
const url = 'https://api.app.layer.ai/api/v1/workspaces/:workspace_id/files/:file_id/scores';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main


import (
  "fmt"
  "net/http"
  "io"
)


func main() {


  url := "https://api.app.layer.ai/api/v1/workspaces/:workspace_id/files/:file_id/scores"


  req, _ := http.NewRequest("GET", url, nil)


  req.Header.Add("Authorization", "Bearer <token>")


  res, _ := http.DefaultClient.Do(req)


  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)


  fmt.Println(res)
  fmt.Println(string(body))


}
```

```php
<?php


$curl = curl_init();


curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.app.layer.ai/api/v1/workspaces/:workspace_id/files/:file_id/scores",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);


$response = curl_exec($curl);
$err = curl_error($curl);


curl_close($curl);


if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```

```java
OkHttpClient client = new OkHttpClient();


Request request = new Request.Builder()
  .url("https://api.app.layer.ai/api/v1/workspaces/:workspace_id/files/:file_id/scores")
  .get()
  .addHeader("Authorization", "Bearer <token>")
  .build();


Response response = client.newCall(request).execute();
```

```ruby
require 'uri'
require 'net/http'


url = URI("https://api.app.layer.ai/api/v1/workspaces/:workspace_id/files/:file_id/scores")


http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true


request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'


response = http.request(request)
puts response.read_body
```

```csharp
var client = new RestClient("https://api.app.layer.ai/api/v1/workspaces/:workspace_id/files/:file_id/scores");
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer <token>");
var response = client.Execute(request);
```

* Production

> **v1 is superseded.** v1 was superseded by [v2](/docs/v2/rest-api/operations/getfilescoresv2) on 2026-08-26\. A sunset date has not been announced yet; v1 will be deprecated as a whole before removal. Migrate with the [v2 migration guide](/docs/migration).

The output scoring verdicts recorded against one file: the current score per rule, plus the headline score stamped on the file by whichever rule its scope nominated.

An empty `scores` list means the file has not been judged, not that it scored zero.

## Authorizations

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

## Parameters

### Path Parameters

**workspace\_id**

required

_Workspace Id_

Id of the workspace that owns the resource.

string format: uuid

Id of the workspace that owns the resource.

**file\_id**

required

_File Id_

Id of the file.

string format: uuid

Id of the file.

## Responses

### 200

Successful Response

_FileScoresOutput_object

**file\_id**

required

_File Id_

Echoes the requested file id.

string format: uuid

**scores**

required

_Scores_

The current verdict per rule — the newest one, where a file has been scored more than once.

Array<object>

_FileScore_object

**rule\_id**

required

_Rule Id_

The rule that produced this verdict.

string format: uuid

**rule\_name**

required

_Rule Name_

The rule’s name as it was when the file was judged.

string

**score**

required

_Score_

The verdict, 0-100\. Higher is a closer match to what the rule asks for.

integer

**rationale**

required

_Rationale_

The judge’s explanation of the score.

string

**judged\_by\_model**

required

_Judged By Model_

The model that judged it.

string

**judged\_at**

required

_Judged At_

When the verdict was recorded.

string format: date-time

**headline\_score**

Any of:

**integer**

integer

**null**

null

**headline\_rule\_id**

Any of:

**string**

string format: uuid

**null**

null

**headline\_scored\_at**

Any of:

**string**

string format: date-time

**null**

null

##### Examplegenerated

```json
{
  "file_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
  "scores": [
    {
      "rule_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
      "rule_name": "example",
      "score": 1,
      "rationale": "example",
      "judged_by_model": "example",
      "judged_at": "2026-04-15T12:00:00Z"
    }
  ],
  "headline_score": 1,
  "headline_rule_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
  "headline_scored_at": "2026-04-15T12:00:00Z"
}
```

### 401

Unauthenticated — missing or invalid Bearer token.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 403

Forbidden — insufficient permissions.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 404

Resource not found.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 422

Invalid input parameters.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 429

Rate limited — too many concurrent requests.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```

### 500

Internal server error.

object

**type**

required

string

**title**

required

string

**status**

required

integer

**detail**

required

string

##### Example

```json
{
  "type": "https://api.layer.ai/errors/ERROR_CODE",
  "title": "Error Title",
  "status": 400,
  "detail": "Human-readable description."
}
```
