### Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://docs.cognigy.com/llms.txt)

Use this file to discover all available pages before exploring further.

---

### Get upcoming scheduled runs
#### Request

```
GET /dashboard/upcoming-scheduled-runs
```

---

#### Example cURL request

```bash
curl --request GET \
  --url 'https://api-trial.cognigy.ai/testing/dashboard/upcoming-scheduled-runs?limit=20' \
  --header 'Authorization: Bearer <token>'
```

#### Example Python request

```python
import requests

url = "https://api-trial.cognigy.ai/testing/dashboard/upcoming-scheduled-runs?limit=20"

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

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

print(response.text)
```

#### Example JavaScript (fetch) request

```javascript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api-trial.cognigy.ai/testing/dashboard/upcoming-scheduled-runs?limit=20', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

#### Example PHP request

```php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api-trial.cognigy.ai/testing/dashboard/upcoming-scheduled-runs?limit=20",
  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;
}
```

#### Example Go request

```go
package main

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

func main() {

url := "https://api-trial.cognigy.ai/testing/dashboard/upcoming-scheduled-runs?limit=20"

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(string(body))
}
```

#### Response Status Codes

- `200`: Upcoming scheduled runs retrieved successfully.
- `400`: Bad Request.
- `401`: Unauthorized.
- `403`: Forbidden.
- `500`: Internal Server Error.

---

#### Response Structure

**Success Response**

```json
{
  "data": [
    {
      "simulationReference": "sim-ref-123",
      "simulationName": "Customer Support Flow Test",
      "nextRun": "2024-01-20T10:00:00Z",
      "frequency": "Daily",
      "batchId": "batch-id-456",
      "status": "IN_PROGRESS",
      "frequencyValue": "0 10 * * *",
      "batchName": "Daily Customer Support Test"
    }
  ]
}
```

**Error Responses**

```json
{
  "error": "<string>",
  "code": "<string>",
  "traceId": "<string>"
}
```

---

### Authorizations

**Authorization**
- Type: `bearerAuth`
- Description: JWT Bearer Token for authentication.

### Query Parameters

- **projectId** (string, required): Project identifier.
- **scenarioIds** (string[], optional): Filter by scenario/simulation reference IDs (comma-separated or array). If not provided, includes all scenarios.
- **limit** (integer, default: 20): Maximum number of upcoming scheduled runs to return. Required range: `1 <= x <= 100`.
