<?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 Updating Entities using ITSI REST API? in Splunk ITSI</title>
    <link>https://community.splunk.com/t5/Splunk-ITSI/Updating-Entities-using-ITSI-REST-API/m-p/627233#M2621</link>
    <description>&lt;P&gt;Hiya,&amp;nbsp;&lt;BR /&gt;I am trying to use the ITSI REST API to update entities in my splunk development.&lt;/P&gt;
&lt;P&gt;I am able to create entities and overwrite pre existing entities which have the same `_key` value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I want to just update an entity without overwriting/deleting any data.&lt;BR /&gt;So say I have an entity with 2 info fields:&lt;BR /&gt;"cpu_cores = 4"&lt;BR /&gt;"memory = 32"&lt;BR /&gt;and I just want to update the "cpu_cores" field to be "cpu_cores = 8" and leave the "memory" field the same, but whenever I execute the post request it overwrites the info fields and deletes the "memory" Field.&lt;BR /&gt;&lt;BR /&gt;Below is the Endpoint I am using and the JSON object to update the entity:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Endpoint&lt;BR /&gt;https://&amp;lt;my_ip&amp;gt;:8089/servicesNS/nobody/itsi/itoa_interface/entity/bulk_update/?is_partial_data=1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;JSON Object&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;[
    {
        "_key":"aa_entity_1",
        "title": "aa entity 1",
        "object_type": "entity",
        "description": "Just a test",
        "informational": {
            "fields": [
                "cpu_cores"
            ],
            "values": [
                "8"
            ]
        },
        "cpu_cores": [
            "8"
        ]
    }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;This JSON creates the entity fine, and what I understand from the documentation is that the "&lt;SPAN&gt;is_partial_data=1" should mean that it will only update data and not remove any, I have looked around and tried different things with the "is_partial_data=1". I've tried putting&amp;nbsp;it into the&amp;nbsp; JSON Object as "is_partial_data":true,&lt;BR /&gt;In the endpoint I saw somewhere that the "/" shouldn't be present before the "?is_partial_data=1", but this didnt work either.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;Addtional Info:&lt;/P&gt;
&lt;P&gt;Splunk Enterprise: 9.0.3&lt;BR /&gt;ITSI Version: 4.13.2&lt;BR /&gt;Using Postman to do post request&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jan 2023 19:29:02 GMT</pubDate>
    <dc:creator>fidrildi</dc:creator>
    <dc:date>2023-01-17T19:29:02Z</dc:date>
    <item>
      <title>Updating Entities using ITSI REST API?</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/Updating-Entities-using-ITSI-REST-API/m-p/627233#M2621</link>
      <description>&lt;P&gt;Hiya,&amp;nbsp;&lt;BR /&gt;I am trying to use the ITSI REST API to update entities in my splunk development.&lt;/P&gt;
&lt;P&gt;I am able to create entities and overwrite pre existing entities which have the same `_key` value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I want to just update an entity without overwriting/deleting any data.&lt;BR /&gt;So say I have an entity with 2 info fields:&lt;BR /&gt;"cpu_cores = 4"&lt;BR /&gt;"memory = 32"&lt;BR /&gt;and I just want to update the "cpu_cores" field to be "cpu_cores = 8" and leave the "memory" field the same, but whenever I execute the post request it overwrites the info fields and deletes the "memory" Field.&lt;BR /&gt;&lt;BR /&gt;Below is the Endpoint I am using and the JSON object to update the entity:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Endpoint&lt;BR /&gt;https://&amp;lt;my_ip&amp;gt;:8089/servicesNS/nobody/itsi/itoa_interface/entity/bulk_update/?is_partial_data=1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;JSON Object&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;[
    {
        "_key":"aa_entity_1",
        "title": "aa entity 1",
        "object_type": "entity",
        "description": "Just a test",
        "informational": {
            "fields": [
                "cpu_cores"
            ],
            "values": [
                "8"
            ]
        },
        "cpu_cores": [
            "8"
        ]
    }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;This JSON creates the entity fine, and what I understand from the documentation is that the "&lt;SPAN&gt;is_partial_data=1" should mean that it will only update data and not remove any, I have looked around and tried different things with the "is_partial_data=1". I've tried putting&amp;nbsp;it into the&amp;nbsp; JSON Object as "is_partial_data":true,&lt;BR /&gt;In the endpoint I saw somewhere that the "/" shouldn't be present before the "?is_partial_data=1", but this didnt work either.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;Addtional Info:&lt;/P&gt;
&lt;P&gt;Splunk Enterprise: 9.0.3&lt;BR /&gt;ITSI Version: 4.13.2&lt;BR /&gt;Using Postman to do post request&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2023 19:29:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/Updating-Entities-using-ITSI-REST-API/m-p/627233#M2621</guid>
      <dc:creator>fidrildi</dc:creator>
      <dc:date>2023-01-17T19:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Updating Entities using ITSI REST API?</title>
      <link>https://community.splunk.com/t5/Splunk-ITSI/Updating-Entities-using-ITSI-REST-API/m-p/629411#M2625</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is not working for you the "&lt;SPAN&gt;/servicesNS/nobody/SA-ITOA/itoa_interface/entity/bulk_update?is_partial_data=1&lt;/SPAN&gt;" endpoint? What was the response?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This works for me on SE 9.0.3&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl -k -u user:password &lt;A href="https://localhost:8089/servicesNS/nobody/SA-ITOA/itoa_interface/entity/bulk_update?is_partial_data=1" target="_blank"&gt;https://localhost:8089/servicesNS/nobody/SA-ITOA/itoa_interface/entity/bulk_update?is_partial_data=1&lt;/A&gt; -H "Content-Type: application json" -X POST -d '[{"_key":"entity_guid","cpu":["56"]}]'&lt;/P&gt;&lt;P&gt;Note that the payload needs to be a JSON list.&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, 02 Feb 2023 23:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-ITSI/Updating-Entities-using-ITSI-REST-API/m-p/629411#M2625</guid>
      <dc:creator>srauhala_splunk</dc:creator>
      <dc:date>2023-02-02T23:16:19Z</dc:date>
    </item>
  </channel>
</rss>

