<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Possible to create a Datasource programatically from a feature layer url? in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/possible-to-create-a-datasource-programatically/m-p/1408082#M11997</link>
    <description>&lt;P&gt;Hi, I was curious if you were able to figure this out yet?&lt;/P&gt;&lt;P&gt;I am looking to implement a similar approach for one of my apps.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2024 17:50:45 GMT</pubDate>
    <dc:creator>jrhodes-gst</dc:creator>
    <dc:date>2024-04-10T17:50:45Z</dc:date>
    <item>
      <title>Possible to create a Datasource programatically from a feature layer url?</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/possible-to-create-a-datasource-programatically/m-p/1322627#M8103</link>
      <description>&lt;P&gt;Hello, I am working on an app that needs to use a specific feature layer for each user, based on some back-end logic. we have feature layer urls stored in our database that contain the feature layer needed for each user. currently we can access it using a series of api calls made with FeatureLayer objects. however, we can not expose the data to experience builder as a whole, as I can't seem to find a way to make a data source from the url.&lt;BR /&gt;&lt;BR /&gt;is it possible for me to programmatically create a data source based on this feature layer url? is this even the right approach?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 18:18:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/possible-to-create-a-datasource-programatically/m-p/1322627#M8103</guid>
      <dc:creator>aoestreicher</dc:creator>
      <dc:date>2023-08-25T18:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create a Datasource programatically from a feature layer url?</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/possible-to-create-a-datasource-programatically/m-p/1408082#M11997</link>
      <description>&lt;P&gt;Hi, I was curious if you were able to figure this out yet?&lt;/P&gt;&lt;P&gt;I am looking to implement a similar approach for one of my apps.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 17:50:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/possible-to-create-a-datasource-programatically/m-p/1408082#M11997</guid>
      <dc:creator>jrhodes-gst</dc:creator>
      <dc:date>2024-04-10T17:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to create a Datasource programatically from a feature layer url?</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/possible-to-create-a-datasource-programatically/m-p/1494271#M13182</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/678121"&gt;@aoestreicher&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/784489"&gt;@jrhodes-gst&lt;/a&gt;&amp;nbsp;&amp;nbsp;Yes, you can use the data source manager.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import { DataSourceManager, Immutable, DataSourceTypes, /** FeatureLayerDataSourceConstructorOptions, DataSourceJson */ } from 'jimu-core'

const featureLayerDs = await DataSourceManager.getInstance().createDataSource({
  id: 'your_id',
  dataSourceJson: Immutable({
    id: 'your_id',
    type: DataSourceTypes.FeatureLayer,
    url: 'https://your_domain/arcgis/rest/services/service_name/FeatureServer/0',
    layerId: '0',
    itemId: 'the_id', // optional
    portalUrl: 'https://org_name.arcgis.com', // optional
    ... // other properties in DataSourceJson
  }),
  layer: mapsSDKFeatureLayer, // optional, if you have one, https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html,
  ... // other properties in FeatureLayerDataSourceConstructorOptions
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 08:58:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/possible-to-create-a-datasource-programatically/m-p/1494271#M13182</guid>
      <dc:creator>YueyangLi</dc:creator>
      <dc:date>2024-06-18T08:58:20Z</dc:date>
    </item>
  </channel>
</rss>

