---
updatedAt: 2026-09-02T13:22:56.000Z
---

# Get reference set content

To get the content of a **reference set** in your Connect subscription, query the `referenceSetRecords` object.

This query uses the `FilterRuleInput` filter type.

```graphql Query
query {
    referenceSetRecords(dataSetId: "123456789-0000000000000000000"){
        totalCount
        nodes {
            attributes {
                name
                value
            }
        }
    }
}
```
```json Response
{
    "data": {
        "referenceSetRecords": {
            "totalCount": 3,
            "nodes": [
                {
                    "attributes": [
                        {
                            "name": "Email",
                            "value": "aina.berg+2@example.com"
                        },
                        {
                            "name": "Age",
                            "value": "14-17"
                        },
                        {
                            "name": "Nearest store",
                            "value": "Bremen"
                        },
                        {
                            "name": "Client",
                            "value": true
                        },
                        {
                            "name": "ID",
                            "value": "OYXF-761"
                        },
                        {
                            "name": "Joined on",
                            "value": "2024-10-10 13:59:31.000"
                        }
                    ]
                },
                {
                    "attributes": [
                        {
                            "name": "Email",
                            "value": "aina.berg@example.com"
                        },
                        {
                            "name": "Age",
                            "value": "18-24"
                        },
                        {
                            "name": "Nearest store",
                            "value": "Bremen"
                        },
                        {
                            "name": "Client",
                            "value": true
                        },
                        {
                            "name": "ID",
                            "value": "OYXF-87"
                        },
                        {
                            "name": "Joined on",
                            "value": "2022-10-10 13:59:31.000"
                        }
                    ]
                },
                {
                    "attributes": [
                        {
                            "name": "Email",
                            "value": "aina.berg+3@example.com"
                        },
                        {
                            "name": "Age",
                            "value": "18-24"
                        },
                        {
                            "name": "Nearest store",
                            "value": "Karlskrona"
                        },
                        {
                            "name": "Client",
                            "value": true
                        },
                        {
                            "name": "ID",
                            "value": "OYXF-88"
                        },
                        {
                            "name": "Joined on",
                            "value": "2024-11-10 13:59:31.000"
                        }
                    ]
                }
            ]
        }
    }
}
```

# Arguments

Arguments supported by the `referenceSetRecords` query

<Table align={["left","left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Argument
      </th>

      <th>
        Nested field
      </th>

      <th>
        Values
      </th>

      <th>
        Required?
      </th>

      <th>
        Definition
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `dataSetId`
      </td>

      <td>

      </td>

      <td>
        ID
      </td>

      <td>
        Required
      </td>

      <td>
        The ID of the reference set
      </td>
    </tr>

    <tr>
      <td>
        `filter`
      </td>

      <td>
        `field`
      </td>

      <td>

      </td>

      <td>
        Optional
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        `contains`
      </td>

      <td>

      </td>

      <td>
        Optional
      </td>

      <td>
        "Contains the specified text"
      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        `eq`
      </td>

      <td>

      </td>

      <td>
        Optional
      </td>

      <td>
        "Equals."
      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        `in`
      </td>

      <td>

      </td>

      <td>
        Optional
      </td>

      <td>
        "Is one of the following."
      </td>
    </tr>

    <tr>
      <td>
        `orderBy`
      </td>

      <td>
        `field`
      </td>

      <td>
        String
      </td>

      <td>
        Optional
      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>

      </td>

      <td>
        `sort`
      </td>

      <td>
        Either of the following values:

        \- `ASC`<br />- `DESC`
      </td>

      <td>
        Optional
      </td>

      <td>
        The sort order to use for reference sets in the response
      </td>
    </tr>
  </tbody>
</Table>

# Fields

Fields returned by the `referenceSetRecords` query

| Field        | Nested field | Values  | Required? | Description                                      |
| :----------- | :----------- | :------ | :-------- | :----------------------------------------------- |
| `nodes`      | `attributes` | Array   | Required  | See nested fields                                |
| `totalCount` |              | Integer | Optional  | The total number of entries in the reference set |

Fields nested into the `attributes` field

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th>
        Field
      </th>

      <th>
        Values
      </th>

      <th>
        Required?
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `name`
      </td>

      <td>
        String
      </td>

      <td>
        Required
      </td>

      <td>
        The name of an attribute defined in the reference set
      </td>
    </tr>

    <tr>
      <td>
        `value`
      </td>

      <td>
        Depends on the attribute type
      </td>

      <td>
        Optional
      </td>

      <td>
        The value assigned to the attribute
      </td>
    </tr>

    <tr>
      <td>
        `type`
      </td>

      <td>
        One of the following values:

        \- `TEXT`<br />- `NUMBER`<br />- `BOOLEAN`<br />- `DATE`
      </td>

      <td>
        Optional
      </td>

      <td>
        The data format of the attribute
      </td>
    </tr>
  </tbody>
</Table>