# Get variable items

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://dashboard.alchemy.com/api/graphql/variables/{var_name}

Lists the items of a GraphQL webhook variable, one page at a time. A
variable that does not exist has no items. To get the next page, send
`pagination.cursors.after` as `after`.

Reference: https://www.alchemy.com/docs/data/webhooks/webhooks-api-endpoints/get-graphql-variable

## Headers

| Name | Type | Required | Description |
|------|------|----------|-------------|
| X-Alchemy-Token | string | Yes | Your team's auth token. Find it on the Webhooks page of the Alchemy dashboard. |

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| var_name | string | Yes | The variable name. |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| limit | integer | No | The number of items on a page, from 1 to 50,000. The default is 1,000. |
| after | string | No | The cursor from the previous page. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://dashboard.alchemy.com/api/graphql/variables/string \
  --header 'X-Alchemy-Token: string'
```

### JavaScript

```javascript
const options = {method: 'GET', headers: {'X-Alchemy-Token': 'string'}};

fetch('https://dashboard.alchemy.com/api/graphql/variables/string', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://dashboard.alchemy.com/api/graphql/variables/string"

headers = {"X-Alchemy-Token": "string"}

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

print(response.text)
```

### Go

```go
package main

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

func main() {

	url := "https://dashboard.alchemy.com/api/graphql/variables/string"

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

	req.Header.Add("X-Alchemy-Token", "string")

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

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

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.get("https://dashboard.alchemy.com/api/graphql/variables/string")
  .header("X-Alchemy-Token", "string")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://dashboard.alchemy.com/api/graphql/variables/string");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-Alchemy-Token", "string");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /api/graphql/variables/{var_name}
method: GET
operation:
  operationId: GetGraphqlVariable
  responses:
    '200':
      description: One page of the variable's items
      content:
        application/json:
          schema:
            properties:
              data:
                items:
                  type: string
                type: array
              pagination:
                description: Where the next page starts, and how many items there are in total.
                properties:
                  cursors:
                    properties:
                      after:
                        type: string
                    type: object
                    description: '`after` is left out on the last page.'
                  total_count:
                    type: number
                    format: double
                    description: The number of items on all pages.
                required:
                  - cursors
                  - total_count
                type: object
                additionalProperties: false
            required:
              - data
              - pagination
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                data:
                  - '0x2a9e8fa175f45b235efddd97d2727741ef4eee63'
                  - '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
                pagination:
                  cursors: {}
                  total_count: 2
    '400':
      description: Invalid input
      content:
        application/json:
          schema:
            description: |-
              The error body. `name` is null for the statuses that have no name, such as
              404 and 429.
            properties:
              message:
                type: string
              name:
                type: string
                nullable: true
            required:
              - message
              - name
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                message: Invalid variable name
                name: ValidationError
    '401':
      description: Requires authentication
      content:
        application/json:
          schema:
            description: |-
              The error body. `name` is null for the statuses that have no name, such as
              404 and 429.
            properties:
              message:
                type: string
              name:
                type: string
                nullable: true
            required:
              - message
              - name
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                message: Unauthenticated request.
                name: AuthError
    '503':
      description: Variable service unavailable
      content:
        application/json:
          schema:
            description: |-
              The error body. `name` is null for the statuses that have no name, such as
              404 and 429.
            properties:
              message:
                type: string
              name:
                type: string
                nullable: true
            required:
              - message
              - name
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                message: Error getting graphQL variable
                name: ServerError
  description: |-
    Lists the items of a GraphQL webhook variable, one page at a time. A
    variable that does not exist has no items. To get the next page, send
    `pagination.cursors.after` as `after`.
  summary: Get variable items
  tags:
    - Webhooks
  security:
    - team_api_key: []
  parameters:
    - in: path
      name: var_name
      required: true
      description: The variable name.
      schema:
        type: string
    - in: query
      name: limit
      required: false
      description: The number of items on a page, from 1 to 50,000. The default is 1,000.
      schema:
        type: integer
        minimum: 1
        maximum: 50000
    - in: query
      name: after
      required: false
      description: The cursor from the previous page.
      schema:
        type: string
```
