<?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 how to add the token parameter to applyEdits in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-add-the-token-parameter-to-applyedits/m-p/664738#M3228</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to send updates from my web app to a feature service rest api and need to add the token parameter to the&amp;nbsp;request in addition to the "attributes" json but the applyEdits documentation doesn't address the token (or client_id) parameter. The parameter&amp;nbsp;requirements&amp;nbsp;in the documentation are nested and I can't determine which level the token parameter belongs to. Here is the syntax from the documentation for applyEdits:&lt;/P&gt;&lt;P&gt;[&lt;BR /&gt;{ "id" : &amp;lt;layerId1&amp;gt;,&lt;BR /&gt; "adds" : [&amp;lt;feature1&amp;gt;, &amp;lt;feature2&amp;gt;],&lt;BR /&gt; "updates" : [&amp;lt;feature1&amp;gt;, &amp;lt;feature2&amp;gt;],&lt;BR /&gt; "deletes" : [&amp;lt;objectID1&amp;gt;, &amp;lt;objectID2&amp;gt;]&lt;BR /&gt;},&lt;BR /&gt;{ "id" : &amp;lt;layerId2&amp;gt;,&lt;BR /&gt; "adds" : [&amp;lt;feature1&amp;gt;, &amp;lt;feature2&amp;gt;],&lt;BR /&gt; "updates" : [&amp;lt;feature1&amp;gt;, &amp;lt;feature2&amp;gt;],&lt;BR /&gt; "deletes" : [&amp;lt;objectID1&amp;gt;, &amp;lt;objectID2&amp;gt;]&lt;BR /&gt;} &lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For an update, the &amp;lt;feature1&amp;gt; json&amp;nbsp;might look like this:&lt;/P&gt;&lt;P&gt;"attributes" : {&lt;BR /&gt; "OBJECTID" : 50,&lt;BR /&gt; "datetime" : 1272210710000,&lt;BR /&gt; "region" : "Andreanof Islands, Aleutian Islands, Alaska" &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't been able to get a test record update to work and i think it has to do with the fact that the portal where the feature service is located requires login so i need to add the valid token in the param list. I have been able to use the query to get the attributes back from the feature service but that json is not nested so it works much easier. Any help would be greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Oct 2017 18:36:54 GMT</pubDate>
    <dc:creator>ClareWoldorf</dc:creator>
    <dc:date>2017-10-03T18:36:54Z</dc:date>
    <item>
      <title>how to add the token parameter to applyEdits</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-add-the-token-parameter-to-applyedits/m-p/664738#M3228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to send updates from my web app to a feature service rest api and need to add the token parameter to the&amp;nbsp;request in addition to the "attributes" json but the applyEdits documentation doesn't address the token (or client_id) parameter. The parameter&amp;nbsp;requirements&amp;nbsp;in the documentation are nested and I can't determine which level the token parameter belongs to. Here is the syntax from the documentation for applyEdits:&lt;/P&gt;&lt;P&gt;[&lt;BR /&gt;{ "id" : &amp;lt;layerId1&amp;gt;,&lt;BR /&gt; "adds" : [&amp;lt;feature1&amp;gt;, &amp;lt;feature2&amp;gt;],&lt;BR /&gt; "updates" : [&amp;lt;feature1&amp;gt;, &amp;lt;feature2&amp;gt;],&lt;BR /&gt; "deletes" : [&amp;lt;objectID1&amp;gt;, &amp;lt;objectID2&amp;gt;]&lt;BR /&gt;},&lt;BR /&gt;{ "id" : &amp;lt;layerId2&amp;gt;,&lt;BR /&gt; "adds" : [&amp;lt;feature1&amp;gt;, &amp;lt;feature2&amp;gt;],&lt;BR /&gt; "updates" : [&amp;lt;feature1&amp;gt;, &amp;lt;feature2&amp;gt;],&lt;BR /&gt; "deletes" : [&amp;lt;objectID1&amp;gt;, &amp;lt;objectID2&amp;gt;]&lt;BR /&gt;} &lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For an update, the &amp;lt;feature1&amp;gt; json&amp;nbsp;might look like this:&lt;/P&gt;&lt;P&gt;"attributes" : {&lt;BR /&gt; "OBJECTID" : 50,&lt;BR /&gt; "datetime" : 1272210710000,&lt;BR /&gt; "region" : "Andreanof Islands, Aleutian Islands, Alaska" &lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't been able to get a test record update to work and i think it has to do with the fact that the portal where the feature service is located requires login so i need to add the valid token in the param list. I have been able to use the query to get the attributes back from the feature service but that json is not nested so it works much easier. Any help would be greatly appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 18:36:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-to-add-the-token-parameter-to-applyedits/m-p/664738#M3228</guid>
      <dc:creator>ClareWoldorf</dc:creator>
      <dc:date>2017-10-03T18:36:54Z</dc:date>
    </item>
  </channel>
</rss>

