# Get workflow run

GET

/v1/workspaces/{workspace\_id}/workflows/{workflow\_id}/runs/{run\_id}

```bash
curl --request GET \
  --url https://api.app.layer.ai/api/v1/workspaces/:workspace_id/workflows/:workflow_id/runs/:run_id \
  --header 'Authorization: Bearer <token>'
```

```python
import requests


url = "https://api.app.layer.ai/api/v1/workspaces/:workspace_id/workflows/:workflow_id/runs/:run_id"


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/workflows/:workflow_id/runs/:run_id';
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/workflows/:workflow_id/runs/:run_id"


  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/workflows/:workflow_id/runs/:run_id",
  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/workflows/:workflow_id/runs/:run_id")
  .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/workflows/:workflow_id/runs/:run_id")


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/workflows/:workflow_id/runs/:run_id");
var request = new RestRequest("", Method.Get);
request.AddHeader("Authorization", "Bearer <token>");
var response = client.Execute(request);
```

* Production

Get the status and results of a workflow run.

## Authorizations

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

## Parameters

### Path Parameters

**workspace\_id**

required

_Workspace Id_

string format: uuid

**workflow\_id**

required

_Workflow Id_

string format: uuid

**run\_id**

required

_Run Id_

string format: uuid

## Responses

### 200

Successful Response

_GetWorkflowRunOutput_object

**run\_id**

required

_Run Id_

Unique identifier for this workflow run.

string format: uuid

**status**

required

_BlueprintRunStatus_

Current status: pending, running, success, failure, or cancelled.

string

Allowed values: pending running success failure cancelled

**poll\_interval\_seconds**

Any of:

**integer**

integer

**null**

null

**steps**

_Steps_

Status of each step composing the workflow run.

Array<object>

default: 

_GetWorkflowRunStep_object

**name**

required

_Name_

The name of the workflow step

string

**status**

required

_BlueprintRunStatus_

The execution status of the step: pending, running, success, failure, or cancelled.

string

Allowed values: pending running success failure cancelled

**error**

Any of:

**string**

string

**null**

null

**error\_code**

Any of:

**string**

string

**null**

null

**estimated\_price\_creative\_units**

Any of:

**number**

number

**null**

null

**completed\_at**

Any of:

**string**

string format: date-time

**null**

null

**actual\_price\_creative\_units**

Any of:

**number**

number

**null**

null

**outputs**

Any of:

**Array<object>**

Array<object>

_WorkflowRunAsset_object

**object\_id**

required

_Object Id_

Unique identifier of the generated object.

string format: uuid

**object\_type**

required

_LibraryObjectType_

Type of generated object: file or asset.

string

Allowed values: directory file asset style blueprint skill

**file\_id**

Any of:

**null**

string format: uuid

**string**

null

**url**

required

_Url_

Download URL for the asset.

string

**content\_type**

required

_Content Type_

MIME type, e.g. image/png or video/mp4.

string

**preview\_url**

Any of:

**null**

string

**string**

null

**width**

Any of:

**null**

integer

**integer**

null

**height**

Any of:

**null**

integer

**integer**

null

**duration\_seconds**

Any of:

**null**

number

**number**

null

**file\_size\_bytes**

Any of:

**null**

integer

**integer**

null

**null**

null

**error**

Any of:

**string**

string

**null**

null

**error\_code**

Any of:

**string**

string

**null**

null

##### Example

```json
{
  "status": "pending",
  "steps": [],
  "outputs": [
    {
      "object_type": "directory"
    }
  ]
}
```

### 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."
}
```
