<?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 Add new layer to a new Created feature service in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/add-new-layer-to-a-new-created-feature-service/m-p/1270933#M51039</link>
    <description>&lt;P&gt;Hello ,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;we are integrated with Esri and i'm trying to do the follwing :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;create new feature service , Then create an layer to it , Finally add features to that&amp;nbsp; feature layer .&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i'm using that&amp;nbsp; methods&amp;nbsp;import { applyEdits, createFeatureService, getAllLayersAndTables, IAddToServiceDefinitionResult, addToServiceDefinition, ICreateServiceResult, ILayerDefinition, queryFeatures, } from '@esri/arcgis-rest-feature-service';&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;first i create feature service and i can see it created successfully by&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;EM&gt;&lt;EM&gt;createFeatureService , and pass it's&amp;nbsp;&amp;nbsp;&lt;EM&gt;&lt;EM&gt;&lt;SPAN&gt;response&lt;SPAN&gt;.&lt;SPAN&gt;&lt;FONT face="inherit"&gt;encodedServiceURL to create feature&lt;FONT face="inherit"&gt;&amp;nbsp;layer&amp;nbsp;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;await addToServiceDefinition(url, {
            authentication: esriContext.auth,
            layers: layerData,
            rawResponse: false,
        });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After response resolved i got success with 200Ok , but indeed feature layer didn't created at esri online&amp;nbsp; i can find feature service but layer never exist .&lt;BR /&gt;Any help around that ?!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Second ,&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;How can i construct a simple rest full call using postman to addToDefinition seemed the payload for layer must be in type of formData .&lt;BR /&gt;https://&amp;lt;S&amp;gt;.arcgis.com/&amp;lt;clientid&amp;gt;ArcGIS/rest/admin/services/&amp;lt;FS names&amp;gt;/FeatureServer/addToDefinition?f=json&amp;amp;token=&amp;lt;mytoken.&lt;BR /&gt;but i have no luck i got&amp;nbsp;&lt;/P&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>Thu, 23 Mar 2023 15:47:30 GMT</pubDate>
    <dc:creator>HeshamAli</dc:creator>
    <dc:date>2023-03-23T15:47:30Z</dc:date>
    <item>
      <title>Add new layer to a new Created feature service</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/add-new-layer-to-a-new-created-feature-service/m-p/1270933#M51039</link>
      <description>&lt;P&gt;Hello ,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;we are integrated with Esri and i'm trying to do the follwing :&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;create new feature service , Then create an layer to it , Finally add features to that&amp;nbsp; feature layer .&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i'm using that&amp;nbsp; methods&amp;nbsp;import { applyEdits, createFeatureService, getAllLayersAndTables, IAddToServiceDefinitionResult, addToServiceDefinition, ICreateServiceResult, ILayerDefinition, queryFeatures, } from '@esri/arcgis-rest-feature-service';&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;first i create feature service and i can see it created successfully by&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;EM&gt;&lt;EM&gt;createFeatureService , and pass it's&amp;nbsp;&amp;nbsp;&lt;EM&gt;&lt;EM&gt;&lt;SPAN&gt;response&lt;SPAN&gt;.&lt;SPAN&gt;&lt;FONT face="inherit"&gt;encodedServiceURL to create feature&lt;FONT face="inherit"&gt;&amp;nbsp;layer&amp;nbsp;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;await addToServiceDefinition(url, {
            authentication: esriContext.auth,
            layers: layerData,
            rawResponse: false,
        });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After response resolved i got success with 200Ok , but indeed feature layer didn't created at esri online&amp;nbsp; i can find feature service but layer never exist .&lt;BR /&gt;Any help around that ?!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Second ,&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;How can i construct a simple rest full call using postman to addToDefinition seemed the payload for layer must be in type of formData .&lt;BR /&gt;https://&amp;lt;S&amp;gt;.arcgis.com/&amp;lt;clientid&amp;gt;ArcGIS/rest/admin/services/&amp;lt;FS names&amp;gt;/FeatureServer/addToDefinition?f=json&amp;amp;token=&amp;lt;mytoken.&lt;BR /&gt;but i have no luck i got&amp;nbsp;&lt;/P&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>Thu, 23 Mar 2023 15:47:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/add-new-layer-to-a-new-created-feature-service/m-p/1270933#M51039</guid>
      <dc:creator>HeshamAli</dc:creator>
      <dc:date>2023-03-23T15:47:30Z</dc:date>
    </item>
  </channel>
</rss>

