<?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: REST API /append is not enabled in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1553760#M4876</link>
    <description>&lt;P&gt;Thank you so much! Now it is working. It was misleading to see the&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;"supportsAppend": true&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;and having to manually add the operation to the list of operations, but now it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Oct 2024 14:23:31 GMT</pubDate>
    <dc:creator>AntoniGołoś</dc:creator>
    <dc:date>2024-10-30T14:23:31Z</dc:date>
    <item>
      <title>REST API /append is not enabled</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1551273#M4870</link>
      <description>&lt;P&gt;I am trying to upsert features to a layer in a feature layer using the /append endpoint. Even though the structure of my request is the same as in the documentation, I am getting an error:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;{'error': {'code': 405, 'message': 'Unable to append data.', 'details': ['Append is not enabled.']}}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I am using a token obtained from OAuth2 which is hosted on the same ArcGIS Online as the data. Token is working, because I can make requests to other endpoints like /applyEdits. Append is also enabled, as I can see it from the response from the ArcGIS Online:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;"supportsAppend": true&lt;BR /&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;My python code looks like this:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;base_url, layer_id, sublayer_id = ... # initialize some values&lt;BR /&gt;oauth_session = ... # creates an OAuth2 session - wrapper around requests library&lt;BR /&gt;&lt;SPAN&gt;with &lt;/SPAN&gt;&lt;SPAN&gt;open&lt;/SPAN&gt;(&lt;SPAN&gt;"upsert_feature.json"&lt;/SPAN&gt;, &lt;SPAN&gt;"r"&lt;/SPAN&gt;) &lt;SPAN&gt;as &lt;/SPAN&gt;f:&lt;BR /&gt;    arcgis_append_features_url = &lt;SPAN&gt;f"&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;base_url&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/arcgis/rest/services/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;layer_id&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/FeatureServer/&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;sublayer_id&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/append?f=json&amp;amp;upsert=True&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;response = oauth_session.post(arcgis_append_features_url, data={"edits": json.loads(f.read())}, headers={"Content-Type": "application/json"})&lt;/SPAN&gt;&lt;BR /&gt;    &lt;SPAN&gt;print&lt;/SPAN&gt;(response.json())&lt;/PRE&gt;&lt;P&gt;Thanks for help!&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Oct 2024 07:23:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1551273#M4870</guid>
      <dc:creator>AntoniGołoś</dc:creator>
      <dc:date>2024-10-24T07:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: REST API /append is not enabled</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1551278#M4871</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/829425"&gt;@AntoniGołoś&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found this post here, does it match your situation?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/append-rest-api-endpoint-rejects-request-even/m-p/1154099#M4099" target="_blank"&gt;https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/append-rest-api-endpoint-rejects-request-even/m-p/1154099#M4099&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Cody&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 13:43:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1551278#M4871</guid>
      <dc:creator>CodyPatterson</dc:creator>
      <dc:date>2024-10-23T13:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: REST API /append is not enabled</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1551292#M4872</link>
      <description>&lt;P&gt;Thank you for a quick answer! I have seen that post before. I am already using my organization's portal to obtain a token, although not through /generateToken endpoint, just through the /token endpoint. It is important for me to follow the &lt;A href="https://developers.arcgis.com/documentation/security-and-authentication/types-of-authentication/" target="_blank"&gt;App authentication workflow&lt;/A&gt; as the script is part of a service, which does not involve user credentials.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 14:02:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1551292#M4872</guid>
      <dc:creator>AntoniGołoś</dc:creator>
      <dc:date>2024-10-23T14:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: REST API /append is not enabled</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1553343#M4873</link>
      <description>&lt;P&gt;You need to &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/append-feature-service/#enable-and-disable-append-capabilities" target="_self"&gt;add the append capability&lt;/A&gt; in your service.&lt;/P&gt;&lt;P&gt;Basically you can do it by the API with &lt;A href="https://developers.arcgis.com/rest/services-reference/online/update-definition-feature-layer-.htm" target="_self"&gt;update definition&lt;/A&gt; and just add "Append" to "capabilities" to the service definition or go through the UI on AGOL:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mikal_0-1730216860217.png" style="width: 485px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118355iED620061A2EFB10A/image-dimensions/485x441?v=v2" width="485" height="441" role="button" title="mikal_0-1730216860217.png" alt="mikal_0-1730216860217.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 15:48:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1553343#M4873</guid>
      <dc:creator>mikaël</dc:creator>
      <dc:date>2024-10-29T15:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: REST API /append is not enabled</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1553760#M4876</link>
      <description>&lt;P&gt;Thank you so much! Now it is working. It was misleading to see the&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;"supportsAppend": true&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;and having to manually add the operation to the list of operations, but now it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 14:23:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/rest-api-append-is-not-enabled/m-p/1553760#M4876</guid>
      <dc:creator>AntoniGołoś</dc:creator>
      <dc:date>2024-10-30T14:23:31Z</dc:date>
    </item>
  </channel>
</rss>

