Skip to main content

Contentstack Data Source

The Contentstack connector lets you ingest published content from a Contentstack stack—including content types, entries, assets, and taxonomy entries—and synchronize full or incremental content changes through the Sync API. Follow the instructions below to create a new data flow that ingests data from a Contentstack source in Nexla.
contentstack_api.png

Contentstack

Create a New Data Flow

  1. To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Then, select the desired flow type from the list, and click the Create button.

  2. Select the Contentstack connector tile from the list of available connectors. Then, select the credential that will be used to connect to the Contentstack instance, and click Next; or, create a new Contentstack credential for use in this flow.

  3. In Nexla, Contentstack data sources can be created using pre-built endpoint templates, which expedite source setup for common Contentstack endpoints. Each template is designed specifically for the corresponding Contentstack endpoint, making source configuration easy and efficient.
    • To configure this source using a template, follow the instructions in Configure Using a Template.

    Contentstack sources can also be configured manually, allowing you to ingest data from Contentstack endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this source manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Contentstack endpoints. Each template is designed specifically for the corresponding Contentstack endpoint, making data source setup easy and efficient.

All Content Delivery API templates read published content from the environment associated with your credential. Templates that list collections automatically paginate using Contentstack's skip and limit parameters, fetching 100 records per page until all records are retrieved. The Sync templates are not auto-paginated and are designed to be chained together, as described in their individual sections below.

Endpoint Settings

  • Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your data source for this endpoint.
Content Types & Entries

List Content Types

Retrieves all content types defined in the stack. Use this endpoint to discover the structure of your stack and obtain the content type UIDs needed by the entry endpoints below.

  • No required parameters. This endpoint automatically paginates through all content types in the stack.
  • Optionally set Include Count to Yes to include the total count of content types in the response. The default value is No.

A content type defines the structure (schema) of an entry. The unique content_type_uid values returned here are required inputs for the entry and content-query endpoints.

Get Content Type

Retrieves the schema of a single content type by its unique identifier. Use this endpoint when you need the field definitions for one specific content type.

  • Enter the unique identifier of the content type in the Content Type UID field. You can obtain available UIDs using the List Content Types endpoint.

List Entries

Retrieves all published entries of a specific content type from the environment associated with your credential. This is the primary endpoint for ingesting content records.

  • Enter the unique identifier of the content type whose entries you want to fetch in the Content Type UID field.
  • This endpoint automatically paginates through all entries, fetching 100 records per page.

Entries are returned for the environment configured in your credential. Only content that has been published to that environment is returned by the Content Delivery API.

Get Entry

Retrieves a single published entry by its unique identifier. Use this endpoint when you need one specific record rather than a full collection.

  • Enter the unique identifier of the content type that contains the entry in the Content Type UID field.
  • Enter the unique identifier of the entry in the Entry UID field. Entry UIDs can be obtained from the List Entries endpoint.

List Entries with Limit

Retrieves entries of a content type, paginating in pages governed by the API's limit parameter. Use this endpoint to ingest large entry collections in controlled batches.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Nexla manages pagination automatically, fetching 100 records per page until all entries are retrieved.

List Entries with Skip

Retrieves entries of a content type using the API's skip parameter to offset the starting position. Use this endpoint when you want to begin ingestion from a specific point in the entry collection.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Nexla automatically advances the skip offset across pages, fetching 100 records per page.

List Entries - Paginated

Retrieves entries of a content type with both pagination and an optional total count. Use this endpoint when you want the total number of matching entries returned alongside the data.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Optionally set Include Count to Yes to include the total count of entries in the response. The default value is Yes.
Assets

List Assets

Retrieves all published assets—such as images, videos, and documents—from the environment associated with your credential.

  • No required parameters. This endpoint automatically paginates through all assets in the environment, fetching 100 records per page.

Assets are files uploaded to your stack. The response includes asset metadata such as the file name, content type, file size, and the URL where the asset is hosted.

Get Asset

Retrieves a single published asset by its unique identifier from the environment associated with your credential.

  • Enter the unique identifier of the asset in the Asset UID field. Asset UIDs can be obtained from the List Assets endpoint.
Sync API

The Sync API returns published entries and assets along with a token in each response. When more than 100 records are available, the response includes a pagination_token for fetching the next batch; when the batch is complete, it instead includes a sync_token for fetching future incremental changes. These templates are not auto-paginated—you chain them by passing the returned token into the next call.

Initial Sync

Starts a full stack synchronization (init=true), returning all published entries and assets for the environment. Use this endpoint the first time you synchronize content to a downstream system.

  • No required parameters. The request fetches the first batch of items for the environment associated with your credential.
  • Inspect the response to determine the next step:

    • If the response contains a pagination_token, more records are available. Pass that token to the Sync Using Pagination Token endpoint to fetch the next batch.
    • If the response contains a sync_token, the initial sync is complete. Save that token and use it later with the Subsequent Sync endpoint to fetch only incremental changes.

The Sync API returns content for the environment configured in your credential. Each response includes either a pagination_token (more pages remain) or a sync_token (the batch is complete)—never both.

Sync Using Pagination Token

Fetches one batch of sync results using a pagination_token returned by a previous sync call. Call this endpoint repeatedly until a sync_token is returned, indicating that all records have been fetched.

  • Enter the token returned by the previous sync response in the Pagination Token field.
  • Each response again contains either a new pagination_token (more pages remain) or a sync_token (the sync is complete). Continue calling this endpoint with each new pagination token until a sync token is returned.

Pagination tokens are especially useful for resuming an interrupted sync. If a sync is interrupted, you can restart from where it stopped by reusing the last pagination_token you received.

Subsequent Sync

Fetches only the content changes (delta updates) made since a previous completed sync, using the sync_token from that sync. Use this endpoint for ongoing incremental synchronization after an initial sync.

  • Enter the token returned by the previous completed sync in the Sync Token field.
  • The response contains the changed items along with either a pagination_token (more changed pages remain) or a new sync_token (the incremental sync is complete). Save the new sync token for the next incremental run.

Incremental changes include published, unpublished, and deleted entries and assets, allowing you to keep a downstream system fully in step with your stack.

Taxonomy Queries

These endpoints query taxonomy entries using Contentstack's taxonomy query operators. Each accepts a JSON Query parameter (with a sample default value provided) and automatically paginates through matching results.

List Taxonomy Entries

Retrieves all taxonomy entries for the environment with no query filter applied. Use this endpoint to ingest the full set of taxonomy-tagged content.

  • No required parameters. This endpoint automatically paginates through all taxonomy entries.

Taxonomies let you classify content using hierarchical terms. The query endpoints below filter taxonomy entries using operators that respect this hierarchy.

Taxonomy Query - OR Operator

Retrieves taxonomy entries that match any one of multiple conditions using the $or operator.

  • Enter the JSON query in the Query field. The default value is {"$or":[{"taxonomies.color":"blue"},{"taxonomies.color":"red"}]}, which matches entries tagged with either color.

Taxonomy Query - AND Operator

Retrieves taxonomy entries that match all of the specified conditions using the $and operator.

  • Enter the JSON query in the Query field. The default value is {"$and":[{"taxonomies.color":"blue"},{"taxonomies.size":"large"}]}, which matches entries tagged with both terms.

Taxonomy Query - Exists Operator

Retrieves taxonomy entries where a specified field exists, using the $exists operator.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.color":{"$exists":true}}, which matches entries that have a color taxonomy term assigned.

Taxonomy Query - Equal and Below

Retrieves taxonomy entries that match a specific term and all of its descendant terms, using the $eq_below operator. Use this endpoint to ingest a term together with everything beneath it in the taxonomy hierarchy.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.category":{"$eq_below":"electronics"}}.

Taxonomy Query - Below Operator

Retrieves taxonomy entries that match only the descendant terms of a specified term, excluding the term itself, using the $below operator.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.category":{"$below":"electronics"}}.

Taxonomy Query - Equal and Above

Retrieves taxonomy entries that match a specific term and all of its ancestor terms, using the $eq_above operator.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.category":{"$eq_above":"laptops"}}.

Taxonomy Query - Above Operator

Retrieves taxonomy entries that match only the ancestor (parent) terms of a specified term, excluding the term itself, using the $above operator.

  • Enter the JSON query in the Query field. The default value is {"taxonomies.category":{"$above":"laptops"}}.
Content Queries

These endpoints query the entries of a specific content type using Contentstack's query operators. Each requires a Content Type UID and accepts a JSON Query parameter (with a sample default value provided), and automatically paginates through matching results.

Content Query - OR Operator

Retrieves entries that match any one of multiple conditions using the $or operator.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"$or":[{"color":"Gold"},{"color":"Black"}]}.

Content Query - OR in Groups

Retrieves entries matching an $or condition applied to fields nested inside a group field.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"$or":[{"group.field1":"value1"},{"group.field2":"value2"}]}.

A group field bundles related fields together. Reference fields inside a group using dot notation, such as group.field1.

Content Query - AND in Modular Blocks

Retrieves entries matching an $and condition applied to fields inside a modular block.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"$and":[{"modular_block.field1":"value1"},{"modular_block.field2":"value2"}]}.

Modular blocks let content editors assemble entries from reusable, repeatable block components. Reference fields inside a modular block using dot notation.

Content Query - OR in Modular Blocks

Retrieves entries matching an $or condition applied to fields inside a modular block.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"$or":[{"modular.field1":"value1"},{"modular.field2":"value2"}]}.

Content Query - Less Than

Retrieves entries whose numeric field value is less than a specified threshold, using the $lt operator.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"price":{"$lt":600}}.

Content Query - Less Than in Groups

Retrieves entries whose group-field value is less than a specified threshold, using the $lt operator on a field inside a group.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"group.discount":{"$lt":25}}.

Content Query - Less Than in Modular Blocks

Retrieves entries whose modular-block field value is less than a specified threshold, using the $lt operator on a field inside a modular block.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"modular.rating":{"$lt":3}}.

Content Query - Less Than or Equal To

Retrieves entries whose numeric field value is less than or equal to a specified threshold, using the $lte operator.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"price":{"$lte":146}}.

Content Query - Less Than or Equal To in Groups

Retrieves entries whose group-field value is less than or equal to a specified threshold, using the $lte operator on a field inside a group.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"group.discount":{"$lte":27}}.

Content Query - Less Than or Equal To in Modular Blocks

Retrieves entries whose modular-block field value is less than or equal to a specified threshold, using the $lte operator on a field inside a modular block.

  • Enter the unique identifier of the content type in the Content Type UID field.
  • Enter the JSON query in the Query field. The default value is {"modular.rating":{"$lte":3}}.

Endpoint Testing

Once the selected endpoint template has been configured, Nexla can retrieve a sample of the data that will be fetched according to the current settings. This allows users to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched & displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Configure Manually

Contentstack data sources can be manually configured to ingest data from any valid Contentstack Content Delivery API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

With manual configuration, you can also create more complex Contentstack sources, such as sources that apply custom query parameters, request specific fields, or include additional reference data in the response.

API Method

  1. To manually configure this source, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the Contentstack API from the Method pulldown menu. Content Delivery API requests are read-only, so GET is used for all standard content retrieval operations.

    • GET: For retrieving content types, entries, assets, and taxonomy data from the API

API Endpoint URL

  1. Enter the URL of the Contentstack API endpoint from which this source will fetch data in the Set API URL field. This should be the complete URL including the protocol (https://) and any required path parameters. The host should match the region of your stack, and most endpoints require the environment query parameter so that the API returns published content. For example, the entries endpoint follows the pattern https://api.contentstack.io/v3/content_types/{content_type_uid}/entries?environment=production.

Ensure the API endpoint URL is correct and accessible with your current credentials. You can test the endpoint using the Test button after configuring the URL. For the full list of available endpoints, see the Contentstack Content Delivery API documentation.

Path to Data

Optional

If only a subset of the data returned by the API endpoint is needed, you can designate the part(s) of the response that should be included in the Nexset(s) produced from this source by specifying the path to the relevant data within the response. This is particularly useful because Contentstack responses wrap content in named arrays or objects alongside metadata such as the total count.

For example, the List Entries endpoint returns an array named entries along with metadata, while Get Entry returns a single object named entry. By entering the path to the relevant data, you can configure Nexla to treat each element of the returned array as a record.

Path to Data is essential when API responses have nested structures. Without specifying the correct path, Nexla might not be able to properly parse and organize your data into usable records.

  • To specify which data should be treated as relevant in responses from this source, enter the path to the relevant data in the Set Path to Data in Response field.

    • For responses in JSON format enter the JSON path that points to the object or array that should be treated as relevant data. JSON paths use dot notation (e.g., $.entries[*] to access the array of entries returned by the List Entries endpoint).
    Path to Data Examples:

    For the entries and taxonomy endpoints, the relevant data is in the array $.entries[*]. For assets, use $.assets[*]. For the Sync endpoints, use $.items[*]. For single-record endpoints, use $.entry, $.asset, or $.content_type.

Autogenerate Path Suggestions

Nexla can also autogenerate data path suggestions based on the response from the API endpoint. These suggested paths can be used as-is or modified to exactly suit your needs.

  • To use this feature, click the Test button next to the Set API URL field to fetch a sample response from the API endpoint. Suggested data paths generated based on the content & format of the response will be displayed in the Suggestions box below the Set Path to Data in Response field.

  • Click on a suggestion to automatically populate the Set Path to Data in Response field with the corresponding path. The populated path can be modified directly within the field if further customization is needed.

    PathSuggestions.png

Metadata

If metadata is included in the response but is located outside of the defined path to relevant data, you can configure Nexla to include this data as common metadata in each record. This is useful when you want to preserve important contextual information that applies to all records but isn't part of the main data array.

For example, Contentstack list responses include a count value alongside the entries or assets array when count is requested. If you have specified the path to the relevant data but want to retain the total count or other top-level metadata, you can specify a path to this metadata to include it with each record in the generated Nexset(s).

Metadata paths are particularly useful for preserving API response context like the total record count returned with paginated Contentstack collections.

  • To specify the location of metadata that should be included with each record, enter the path to the relevant metadata in the Path to Metadata in Response field.

    • For responses in JSON format, enter the JSON path to the object or array that contains the metadata.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this source, enter the headers & corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2). Additional headers can be used for features such as branch selection or response customization.

    You do not need to include any headers already present in the credentials. The api_key and access_token headers that authenticate Contentstack requests are handled automatically by Nexla based on your credential configuration.

Endpoint Testing

After configuring all settings for the selected endpoint, Nexla can retrieve a sample of the data that will be fetched according to the current configuration. This allows users to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched & displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Save & Activate the Source

  1. Once all of the relevant steps in the above sections have been completed, click the Create button in the upper right corner of the screen to save and create the new Contentstack data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.