# List workflows

GET

/v1/workspaces/{workspace\_id}/workflows

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

```python
import requests


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


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';
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"


  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",
  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")
  .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")


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

* Production

List available generation workflows (published blueprints) in a workspace.

## Authorizations

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

## Parameters

### Path Parameters

**workspace\_id**

required

_Workspace Id_

string format: uuid

### Query Parameters

**search**

Any of:

**string**

string

**null**

null

Full-text search on workflow name/description

**limit**

_Limit_

integer

default: 20 \>= 1 <= 100

**cursor**

Any of:

**string**

string

**null**

null

## Responses

### 200

Successful Response

_ListWorkflowsOutput_object

**workflows**

required

_Workflows_

Array<object>

_WorkflowSummary_object

**workflow\_id**

required

_Workflow Id_

Unique workflow identifier

string format: uuid

**name**

required

_Name_

Workflow display name

string

**description**

required

_Description_

What this workflow generates

string

**modality**

Any of:

**Modality**

_Modality_

string

Allowed values: text image audio video three\_d playable

**null**

null

**created\_at**

required

_Created At_

When this workflow version was created

string format: date-time

**published\_at**

Any of:

**string**

string format: date-time

**null**

null

**inputs**

required

_Inputs_

Input parameters the workflow accepts

Array<object>

_WorkflowInput_object

**name**

required

_Name_

Input parameter name (used as key in execute\_workflow inputs)

string

**type**

required

_Type_

Parameter type: string, number, boolean, file, prompt, etc.

string

**value\_schema**

Any of:

**object**

object

**_key_**

additional properties

any

**null**

null

**required**

required

_Required_

Whether this input must be provided

boolean

**description**

required

_Description_

What this input controls

string

**display\_name**

Any of:

**string**

string

**null**

null

**default**

Any of:

**Default**

_Default_

Default value if not provided

**null**

null

**outputs**

required

_Outputs_

Output parameters the workflow produces

Array<object>

_WorkflowOutput_object

**name**

required

_Name_

Output parameter name

string

**type**

required

_Type_

Output type: file, string, etc.

string

**value\_schema**

Any of:

**object**

object

**_key_**

additional properties

any

**null**

null

**description**

required

_Description_

What this output contains

string

**display\_name**

Any of:

**string**

string

**null**

null

**pagination**

required

_PaginationOutput_object

**next\_cursor**

Any of:

**string**

string

**null**

null

**has\_more\_results**

required

_Has More Results_

If there are more results to page through

boolean

**total\_count**

Any of:

**integer**

integer

**null**

null

##### Example

```json
{
  "workflows": [
    {
      "modality": "text"
    }
  ]
}
```

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