<?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: Secure Endpoint API PATCH methods in Endpoint Security</title>
    <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5301598#M8881</link>
    <description>&lt;P&gt;It works ! Thank you so much.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jun 2025 11:37:26 GMT</pubDate>
    <dc:creator>Matthieu Ramond</dc:creator>
    <dc:date>2025-06-23T11:37:26Z</dc:date>
    <item>
      <title>Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300839#M8871</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm trying to make some API calls on Secure Endpoint, particularly regarding the /v1/groups/ route.&lt;BR /&gt;I'm able to perform GET, POST, and DELETE requests without any issues, but I'm struggling with the PATCH methods.&lt;/P&gt;&lt;P&gt;The one I'm especially interested in right now is the method to modify the policies assigned to a group.&lt;BR /&gt;I've tried sending payloads like this:&lt;/P&gt;&lt;PRE&gt;{
  "policies": [
    {
      "guid": "b173a158-a24d-43c9-8cd3-93fb69759e64"
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;But I keep getting the same error in response:&lt;/P&gt;&lt;PRE&gt;{
  "version": "v1.2.0",
  "metadata": {
    "links": {
      "self": "https://api.eu.amp.cisco.com/v1/groups/50044d8c-c2u5-4c2e-94e1-094eb19ddad4"
    }
  },
  "data": {},
  "errors": [
    {
      "error_code": 400,
      "description": "Bad Request",
      "details": [
        "Following query parameter(s) are invalid: policies"
      ]
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;I’ve made sure the GUIDs are correct, and the request is being sent as JSON in the body of the request. I’m using Insomnia to test it.&lt;/P&gt;&lt;P&gt;Could you please confirm whether PATCH works to update policies on a group, and if so, what the correct format and method should be?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 15:53:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300839#M8871</guid>
      <dc:creator>Matthieu Ramond</dc:creator>
      <dc:date>2025-06-19T15:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300842#M8872</link>
      <description>&lt;P&gt;By no means an expert here, i do not see the patch here&amp;nbsp;&lt;A href="https://developer.cisco.com/docs/secure-endpoint/policies/" target="_blank"&gt;https://developer.cisco.com/docs/secure-endpoint/policies/&lt;/A&gt;&amp;nbsp;- is this the right API doc i am looking at?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 16:16:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300842#M8872</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2025-06-19T16:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300852#M8873</link>
      <description>This is V1, its page is here &lt;A href="https://developer.cisco.com/docs/secure-endpoint/v1-api-reference-group/" target="_blank"&gt;https://developer.cisco.com/docs/secure-endpoint/v1-api-reference-group/&lt;/A&gt;&lt;BR /&gt;Patch is valid.&lt;BR /&gt;It may be how the Body is set...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jun 2025 16:29:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300852#M8873</guid>
      <dc:creator>Ken Stieers</dc:creator>
      <dc:date>2025-06-19T16:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300857#M8874</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/321979"&gt;@Ken Stieers&lt;/a&gt;&amp;nbsp;- if this valid then i would agree, based on the error show "policies" is being interpreted as a query parameter, i guess if you wrapped this in the data object should resolve the issue?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
  "data": {
    "policies": [
      {
        "guid": "b173a158-a24d-43c9-8cd3-93fb69759e64"
      }
    ]
  }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 16:37:07 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300857#M8874</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2025-06-19T16:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300867#M8875</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/321979"&gt;@Ken Stieers&lt;/a&gt;&amp;nbsp;yes, this is the right doc. Sorry, I should have added a link to it.&lt;/P&gt;&lt;P&gt;Yes, I did try to wrap policies in the data object. However, I get the same error.&lt;/P&gt;&lt;PRE&gt;{
  "version": "v1.2.0",
  "metadata": {
    "links": {
      "self": "https://api.eu.amp.cisco.com/v1/groups/50044d8c-c2u5-4c2e-94e1-094eb19ddad4"
    }
  },
  "data": {},
  "errors": [
    {
      "error_code": 400,
      "description": "Bad Request",
      "details": [
        "Following query parameter(s) are invalid: data"
      ]
    }
  ]
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jun 2025 17:27:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300867#M8875</guid>
      <dc:creator>Matthieu Ramond</dc:creator>
      <dc:date>2025-06-19T17:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300878#M8876</link>
      <description>So... looking at that doc, the example shows a LOT more data in the body...&lt;BR /&gt;So probably what it wants is the result of a get of the policy inserted into the get of the group... not just the one bit you've got.&lt;BR /&gt;Something like this?&lt;BR /&gt;{&lt;BR /&gt;  "version": "v1.2.0",&lt;BR /&gt;  "metadata": {&lt;BR /&gt;    "links": {&lt;BR /&gt;      "self": "&lt;A href="https://api.amp.cisco.com/v1/groups/a4a983ef-91df-428f-9b08-1e88ec5357df" target="_blank"&gt;https://api.amp.cisco.com/v1/groups/a4a983ef-91df-428f-9b08-1e88ec5357df&lt;/A&gt;"&lt;BR /&gt;    }&lt;BR /&gt;  },&lt;BR /&gt;  "data": {&lt;BR /&gt;    "name": "00-mar25-forensic-group",&lt;BR /&gt;    "description": "",&lt;BR /&gt;    "guid": "a4a983ef-91df-428f-9b08-1e88ec5357df",&lt;BR /&gt;    "source": null,&lt;BR /&gt;    "policies": [&lt;BR /&gt;{&lt;BR /&gt;   "name": "00-cat-forensic-mar25",&lt;BR /&gt;    "description": "",&lt;BR /&gt;    "guid": "3dc1435d-bdc8-4a9d-9da5-e7371562378d",&lt;BR /&gt;    "product": "windows",&lt;BR /&gt;    "default": false,&lt;BR /&gt;    "serial_number": 140,&lt;BR /&gt;    "links": {&lt;BR /&gt;      "policy_xml": "&lt;A href="https://api.amp.cisco.com/v1/policies/3dc1435d-bdc8-4a9d-9da5-e7371562378d.xml" target="_blank"&gt;https://api.amp.cisco.com/v1/policies/3dc1435d-bdc8-4a9d-9da5-e7371562378d.xml&lt;/A&gt;"&lt;BR /&gt;    }&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Jun 2025 18:37:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5300878#M8876</guid>
      <dc:creator>Ken Stieers</dc:creator>
      <dc:date>2025-06-19T18:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5301550#M8879</link>
      <description>&lt;P&gt;No, it doesn't work. It doesn't recognise any of the objects.&lt;/P&gt;&lt;P&gt;Result when I wrap it in the data object :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{&lt;BR /&gt;"version": "v1.2.0",&lt;BR /&gt;"metadata": {&lt;BR /&gt;"links": {&lt;BR /&gt;"self": "https://api.eu.amp.cisco.com/v1/groups/50044d8c-c2a5-4b2e-94e1-093eb19ddad4"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"data": {},&lt;BR /&gt;"errors": [&lt;BR /&gt;{&lt;BR /&gt;"error_code": 400,&lt;BR /&gt;"description": "Bad Request",&lt;BR /&gt;"details": [&lt;BR /&gt;"Following query parameter(s) are invalid: data"&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;When I don't wrap it :&lt;/P&gt;&lt;PRE&gt;{&lt;BR /&gt;"version": "v1.2.0",&lt;BR /&gt;"metadata": {&lt;BR /&gt;"links": {&lt;BR /&gt;"self": "https://api.eu.amp.cisco.com/v1/groups/50044d8c-c2a5-4b2e-94e1-093eb19ddad4"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"data": {},&lt;BR /&gt;"errors": [&lt;BR /&gt;{&lt;BR /&gt;"error_code": 400,&lt;BR /&gt;"description": "Bad Request",&lt;BR /&gt;"details": [&lt;BR /&gt;"Following query parameter(s) are invalid: description,guid,source,creator,created_at,computers_count,descendant_computers_count,policies"&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 09:09:53 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5301550#M8879</guid>
      <dc:creator>Matthieu Ramond</dc:creator>
      <dc:date>2025-06-23T09:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5301558#M8880</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1889389"&gt;@Matthieu Ramond&lt;/a&gt;&amp;nbsp;if you are&amp;nbsp;getting "query parameter" errors for every single field you send, to me this would suggest the API endpoint does not accept request bodies at all. Taking a really long assumption here ... if i am wrong, i am, as i dont have a way to test my theory. Let me show my work ...&lt;/P&gt;
&lt;P&gt;I searched GH and found this&amp;nbsp;&lt;A href="https://github.com/CiscoSecurity/amp-01-basics/blob/b032c917b4a7793c9705826d5aad0225ca6d1259/05d_set_policy_for_group.py" target="_blank"&gt;https://github.com/CiscoSecurity/amp-01-basics/blob/b032c917b4a7793c9705826d5aad0225ca6d1259/05d_set_policy_for_group.py&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;As this is in the Cisco Security repo, i am going to assume this works.&lt;/P&gt;
&lt;P&gt;So it is the same API endpoint and operation you showed, but here its looks like the correct way to send the data is as form-encoded parameters rather than JSON, and using the specific policy type parameter names instead of a generic "policies" array.&amp;nbsp; The documentation shows JSON response structures, which might lead us to assume the request should also be JSON. However, the GH Python example, this clearly shows that the API expects:&lt;/P&gt;
&lt;P&gt;• **Content-Type**: application/x-www-form-urlencoded (form data)&lt;BR /&gt;• **Parameters**: Platform-specific like windows_policy_guid, not JSON with policies array&lt;/P&gt;
&lt;P&gt;Can yuo try in Insomnia:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Method: PATCH&lt;BR /&gt;2. URL: &lt;A href="https://api.eu.amp.cisco.com/v1/groups/50044d8c-c2a5-4b2e-94e1-093eb19ddad4" target="_blank"&gt;https://api.eu.amp.cisco.com/v1/groups/50044d8c-c2a5-4b2e-94e1-093eb19ddad4&lt;/A&gt;&lt;BR /&gt;3. Body Type: Change from "JSON" to "Form URL Encoded"&lt;BR /&gt;4. Body Content: Instead of JSON, use form parameters like&lt;/P&gt;
&lt;P class="whitespace-normal break-words"&gt;This i suspected based on the example is what this would look like in python&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;import requests

amp_client_id = 'your_client_id_here'
amp_api_key = 'your_api_key_here'
group_guid = '50044d8c-c2a5-4b2e-94e1-093eb19ddad4'
windows_policy_guid = 'b173a158-a24d-43c9-8cd3-93fb69759e64'

# For other platforms, try these parameter names:
# mac_policy_guid - for Mac policies
# inux_policy_guid - for Linux policies
# android_policy_guid - for Android policies
# ios_policy_guid - for iOS policies

url = f'https://api.eu.amp.cisco.com/v1/groups/{group_guid}'
data = {'windows_policy_guid': windows_policy_guid}

response = requests.patch(url, auth=(amp_client_id, amp_api_key), data=data)
print(response.json())&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 09:41:35 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5301558#M8880</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2025-06-23T09:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5301598#M8881</link>
      <description>&lt;P&gt;It works ! Thank you so much.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 11:37:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5301598#M8881</guid>
      <dc:creator>Matthieu Ramond</dc:creator>
      <dc:date>2025-06-23T11:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5301617#M8882</link>
      <description>&lt;P&gt;Ha! Lucky guess! Now all we need is for the team to update the documents. &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jun 2025 12:27:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5301617#M8882</guid>
      <dc:creator>bigevilbeard</dc:creator>
      <dc:date>2025-06-23T12:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Secure Endpoint API PATCH methods</title>
      <link>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5304278#M8895</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1889389"&gt;@Matthieu Ramond&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;maybe helpful, generated a comprehensive API collection for Secure Endpoint here on Postman:&amp;nbsp;&lt;A href="https://www.postman.com/ciscosecureendpoint/cisco-secure-endpoint/overview" target="_blank"&gt;https://www.postman.com/ciscosecureendpoint/cisco-secure-endpoint/overview&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Greetings,&lt;BR /&gt;Thorsten&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jul 2025 07:57:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/endpoint-security/secure-endpoint-api-patch-methods/m-p/5304278#M8895</guid>
      <dc:creator>Troja007</dc:creator>
      <dc:date>2025-07-01T07:57:40Z</dc:date>
    </item>
  </channel>
</rss>

