---
schema_version: "1"
id: 479dcc7e3b2513b0e98fc4fa3412e68d2af74946e9905ed6477baf44dc8f6fc3
title: Configuring a REST Web Data Source (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_configuring_a_rest_web_data_source.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_configuring_a_rest_web_data_source.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8ae544b9192a8842998208f489001e529a609af3aa5526e6b599aafd635e1fb1
description: For the managed package runtime, configure a REST Web data source to get or post data from or to a public API.
products:
  - Omnistudio
release: "264"
---
# Configuring a REST Web Data Source (Managed Package)

For the managed package runtime, configure a REST Web data source to get or post data from or to a public API.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

For example, pull in weather data from a weather API based on a policy holder's postal code.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)

Note

For optimal flexibility and easier implementation, use an Integration Procedure as a data source to execute multiple actions in a single server call. See [Configure an Integration Procedure Data Source on a Flexcard (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_configure_an_integration_procedure_data_source_on_a_flexcard.htm&release=264.0.0&type=5 "For the managed package runtime, configure a data source to use a Vlocity Integration Procedure to execute multiple actions in a single server call. For example, as a Systems Admin, you want your customer service reps to view the weather forecast of policy holders when on a call. You can use an Integration Procedure with an Omnistudio Data Mapper Extract that returns an account's ZIP code, and a REST API call that uses the ZIP code to get the current forecast for the Account's region.").

To configure a REST data source:

1. On the Vlocity Cards tab, click **New** to configure a data source for a new cards component, or select the component for which you want to configure a data source.
2. In the Cards Designer, in the Layout or Cards pane, from the **Data Source** picklist, select **REST**.
    
    ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/restwebdatasource.png)
3. From the **Subtype** picklist, select **Web**.
4. In the **Endpoint** box, enter REST endpoint URL. For example:
    
    ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/screenshot___rest___endpoint.png)
5. Specify the REST method:
    
    - `GET`—Requests data specified by the parameters of the URL.
    - `POST`—Sends JSON data specified in the Body text area.
        
        ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/screenshot___rest___post.png)
    
    You can use Context Variables to pass inherited values with either method.
6. Click **+Add Header Variable** to add request headers.
    
    Most third-party APIs expect headers, such as tokens, public keys, and content-type. For example:
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d186580e180">
                  <p style="margin-bottom:0;">Request header</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d186580e186">
                  <p style="margin-bottom:0;">Value</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="Request header" class="slds-cell-wrap" style="vertical-align:top;" headers="d186580e180 ">
                  <p style="margin-bottom:0;">
                    <code>Accept:</code>
                  </p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d186580e186 ">
                  <p style="margin-bottom:0;">
                    <code>application/json</code>
                  </p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Request header" class="slds-cell-wrap" style="vertical-align:top;" headers="d186580e180 ">
                  <p style="margin-bottom:0;">
                    <code>Accept-Language:</code>
                  </p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d186580e186 ">
                  <p style="margin-bottom:0;">
                    <code>en_US</code>
                  </p>
                </td>

              </tr>
              <tr class="">
                <td data-label="Request header" class="slds-cell-wrap" style="vertical-align:top;" headers="d186580e180 ">
                  <p style="margin-bottom:0;">
                    <code>Token:</code>
                  </p>
                </td>

                <td data-label="Value" class="slds-cell-wrap" style="vertical-align:top;" headers="d186580e186 ">
                  <p style="margin-bottom:0;">
                    <code>Ke2B34kmpOU9wen</code>
                  </p>
                </td>

              </tr>
            </tbody>
          </table>
    
    If you are making a cross-domain REST API call, you must ensure that it abides by the Cross-Origin Resource Sharing (CORS) policy. For example, an API response that contains a request header named `Access-Control-Allow-Origin: *` enables CORS.
7. (Optional). Enter values for these properties:
    
    - To drill down to a specific dataset, in the **Result JSON Path** field, enter a path. For example, enter records.results, which drills down to the `results` array and passes the array to the card or card layout.
    - To sort data by a specific data field, enter the field name in the **Order By** input field.
    - To reverse the order of the data returned, select **True** from the **Reverse Order** picklist.
        
        ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/orderbyreverseorder.png)
    - Set a **Timeout** value in milliseconds.
        
        The timeout value controls the time that the framework waits for the designated data source to return a response. Timeouts improve handling user interactions with long running processes. Setting an appropriate timeout value allows the application and users to react accordingly to long wait times.
    - Set an **Interval** value in milliseconds.
        
        The card component's data source refreshes continuously at the given interval and checks for changes in data source records. If changes are found, the layout or card component reloads. Setting an interval enables recursive updates of records.
8. To preview a card using real data, add a test variable in the **Test Data Source Settings** fields. See [Testing Data Source Settings (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_testing_data_source_settings.htm&release=264.0.0&type=5 "For the managed package runtime, add runtime variables to fetch and test your data source.").