# GetSigmaScheduledQueryRunsScheduledQueryRun

From **Stripe API**.

`GET /v1/sigma/scheduled_query_runs/{scheduled_query_run}`

<p>Retrieves the details of an scheduled query run.</p>

## Parameters

### `expand`

- Location: query
- Required: false
- Type: `array`

Specifies which fields in the response should be expanded.

### `scheduled_query_run`

- Location: path
- Required: true
- Type: `string`
- maxLength: `5000`

## Request body

- Required: false
### `application/x-www-form-urlencoded`

- Type: `object`

```json
{"additionalProperties":false,"type":"object"}
```

## Security

### `basicAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `basic`
Send credentials in the `Authorization` request header using the `Basic` scheme.

Basic HTTP authentication. Allowed headers-- Authorization: Basic <api_key> | Authorization: Basic <base64 hash of `api_key:`>

### `bearerAuth`

- Type: `http`
- Request header: `Authorization`
- Scheme: `bearer`
- Bearer format: `auth-scheme`
Send the token in the `Authorization` request header using the `Bearer` scheme.

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

## Responses

### `200`

Successful response.

### `application/json`

- Type: `object`

If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll
receive a `sigma.scheduled_query_run.created` webhook each time the query
runs. The webhook contains a `ScheduledQueryRun` object, which you can use to
retrieve the query results.

```json
{"description":"If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll\nreceive a `sigma.scheduled_query_run.created` webhook each time the query\nruns. The webhook contains a `ScheduledQueryRun` object, which you can use to\nretrieve the query results.","properties":{"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"data_load_time":{"description":"When the query was run, Sigma contained a snapshot of your Stripe data at this time.","format":"unix-time","type":"integer"},"error":{"$ref":"#/components/schemas/sigma_scheduled_query_run_error"},"file":{"anyOf":[{"$ref":"#/components/schemas/file"}],"description":"The file object representing the results of the query.","nullable":true},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["scheduled_query_run"],"type":"string"},"result_available_until":{"description":"Time at which the result expires and is no longer available for download.","format":"unix-time","type":"integer"},"sql":{"description":"SQL for the query.","maxLength":100000,"type":"string"},"status":{"description":"The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise.","maxLength":5000,"type":"string"},"title":{"description":"Title of the query.","maxLength":5000,"type":"string"}},"required":["created","data_load_time","id","livemode","object","result_available_until","sql","status","title"],"title":"ScheduledQueryRun","type":"object","x-expandableFields":["error","file"],"x-resourceId":"scheduled_query_run"}
```

### `default`

Error response.

### `application/json`

- Type: `object`

An error response from the Stripe API

```json
{"description":"An error response from the Stripe API","properties":{"error":{"$ref":"#/components/schemas/api_errors"}},"required":["error"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url https://api.stripe.com/v1/sigma/scheduled_query_runs/{scheduled_query_run} \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data '{}'
```
