<?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: R80 API - Create multiple objects JSON in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-API-Create-multiple-objects-JSON/m-p/2445#M131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, you can't make multiple objects with a single API call, you have to call "add-host" API for every object.&lt;/P&gt;&lt;P&gt;When using the mgmt_cli instead of web-services, it is possible to pass a csv file and create multiple objects with one CLI command. &lt;/P&gt;&lt;P&gt;Behind the scenes, when mgmt_cli is processing the csv file, it makes multiple API calls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Jun 2016 10:36:24 GMT</pubDate>
    <dc:creator>Uri_Bialik</dc:creator>
    <dc:date>2016-06-19T10:36:24Z</dc:date>
    <item>
      <title>R80 API - Create multiple objects JSON</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-API-Create-multiple-objects-JSON/m-p/2444#M130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking at the API for add-host. What is the proper syntax to add multiple hosts in one payload rather than just one at a time?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example: &lt;/P&gt;&lt;P&gt;add one host&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name" : "New Host 1",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ip-address" : "192.0.2.1"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;add multiple hosts&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name" : "New Host 1",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ip-address" : "192.0.2.1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name" : "New Host 2",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ip-address" : "192.0.2.2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;The above gives the following error: &lt;/P&gt;&lt;P&gt;Can not deserialize instance of com.checkpoint.management.web_api.core.handler.objects.network_objects.host.HostRequestNew out of START_ARRAY token&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 18:39:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-API-Create-multiple-objects-JSON/m-p/2444#M130</guid>
      <dc:creator>Joshua_Boerum</dc:creator>
      <dc:date>2016-06-16T18:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: R80 API - Create multiple objects JSON</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-API-Create-multiple-objects-JSON/m-p/2445#M131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, you can't make multiple objects with a single API call, you have to call "add-host" API for every object.&lt;/P&gt;&lt;P&gt;When using the mgmt_cli instead of web-services, it is possible to pass a csv file and create multiple objects with one CLI command. &lt;/P&gt;&lt;P&gt;Behind the scenes, when mgmt_cli is processing the csv file, it makes multiple API calls.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 10:36:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/R80-API-Create-multiple-objects-JSON/m-p/2445#M131</guid>
      <dc:creator>Uri_Bialik</dc:creator>
      <dc:date>2016-06-19T10:36:24Z</dc:date>
    </item>
  </channel>
</rss>

