---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# FetchConfiguration structure - iOS

# FetchConfiguration structure - iOS {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The FetchConfiguration structure provides the ability to define the
configuration for fetching records from your ServiceNow
instance.  
{#FetchConfigiOSStructure__table_vx2_klw_5pb__entry__3}

| Name | Type | Description |
|-|-|-|
| filter | [Filter](https://servicenow-prod.fluidtopics.net/RU8GNeHrwTSXZYsrdNWpMQ#FilteriOSStructure "The Filter structure provides the ability to configure filters that define the data to return in the return results of a REST endpoint query.") | Optional. Query to apply to the return results. For example, to return only active records with a short description that contains the word "broken", pass the following query: `active=true^short_descriptionLIKEbroken` Default: nil - No filter applied, all records returned (any system or table limits are honored.) |
| limit | Integer | Optional. Number of records to return per page/response. Default: nil - All records returned (any system or table limits are honored.) |
| readConfiguration | [FieldReadConfiguration](https://servicenow-prod.fluidtopics.net/Re~2rn0s~55vWcgvBUKh5g#FieldReadConfigurationiOSStruct "The FieldReadConfiguration structure enables you to configure which fields to fetch from a ServiceNow instance table and in which format.") | Optional. Configuration of the fields returned in the response. Default: nil - All fields are returned. |
[Table 1. Properties]

{#FetchConfigiOSStructure__table_vx2_klw_5pb}

## FetchConfiguration - init(filter: Filter? = nil, limit: Int? = nil, readConfiguration:
FieldReadConfiguration? = nil) {#ariaid-title2}

Defines the criteria for what records, and associated fields within those records, to
return when fetching data from a ServiceNow instance through a REST
endpoint.
{#FetConfigiOS-init_S_I_O__table_pgj_tg2_vpb__entry__3}

| Name | Type | Description |
|-|-|-|
| filter | [Filter](https://servicenow-prod.fluidtopics.net/RU8GNeHrwTSXZYsrdNWpMQ#FilteriOSStructure "The Filter structure provides the ability to configure filters that define the data to return in the return results of a REST endpoint query.") | Optional. Query to apply to the return results. For example, to return only active records with a short description that contains the word "broken", pass the following query: `active=true^short_descriptionLIKEbroken` Default: nil - No filter applied, all records returned (any system or table limits are honored.) |
| limit | Integer | Optional. Number of records to return per page/response. Default: nil - All records returned (any system or table limits are honored.) |
| readConfiguration | [FieldReadConfiguration](https://servicenow-prod.fluidtopics.net/Re~2rn0s~55vWcgvBUKh5g#FieldReadConfigurationiOSStruct "The FieldReadConfiguration structure enables you to configure which fields to fetch from a ServiceNow instance table and in which format.") | Optional. Configuration of the fields returned in the response. Default: nil - All fields are returned. |
[Table 2. Parameters]

{#FetConfigiOS-init_S_I_O__table_pgj_tg2_vpb} {#FetConfigiOS-init_S_I_O__table_qgj_tg2_vpb__entry__2}

| Type | Description |
|-|-|
| None |   |
[Table 3. Returns]

{#FetConfigiOS-init_S_I_O__table_qgj_tg2_vpb}  
Shows how to configure the data to fetch from the Table API.

    /// The configuration for what to fetch from the Table API.
    lazy var fetchConfiguration: FetchConfiguration = {
      let includeFields = [
        // Case details
        "number",
        "short_description",
        "priority",
        "state",
        "opened_at",
        
        // Account details
        "account.name",
        "account.number",
        "contact.name",
        "contact.email",
        "contact_type",

        // Assignment
        "assignment_group.name",
        "assigned_to.name"
      ]
      let readConfiguration = FieldReadConfiguration(includeFields: includeFields, options: .actualValues)
      let filter = Filter(criteria: [], sortBy: [.desc("number")], queryCategory: nil)
      return FetchConfiguration(filter: filter, limit: 10, readConfiguration: readConfiguration)
    }()


