<?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: Import .sas.json files using SAS Viya API in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963203#M2802</link>
    <description>&lt;P&gt;So they seem to be SAS packages. These files can be imported using the sas-viya CLI using the transfer plugin.&lt;BR /&gt;&lt;BR /&gt;To make things easier check this&amp;nbsp;&lt;A href="https://github.com/sassoftware/pyviyatools/blob/master/importpackages.py" target="_blank"&gt;https://github.com/sassoftware/pyviyatools/blob/master/importpackages.py&lt;/A&gt;&amp;nbsp;it does the thing you are looking for. It uses the sas-viya CLI in the background to the work.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Apr 2025 14:00:36 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2025-04-02T14:00:36Z</dc:date>
    <item>
      <title>Import .sas.json files using SAS Viya API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963192#M2799</link>
      <description>&lt;P&gt;Hi Community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to SAS Viya and how it workds. I have a repository containing many SAS related files, jobs and reports. I want to create a python script to use SAS Viya APIs to load the files into SAS Viya. I looked into the documentation and I've found the /files/files endpoint to create a new resource file. I did a successful request by using this endpoint and I see a&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;creationTimeStamp property in the response. However, when I search&amp;nbsp; for the object and open the file in the SAS Environment Manager, I receive the error that SAS Environment Manager. I see the file in the search results.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MAhkami_0-1743578999839.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105835i15D403FB72038441/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MAhkami_0-1743578999839.png" alt="MAhkami_0-1743578999839.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only used the /files/files endpoint&amp;nbsp;&lt;A href="https://developer.sas.com/rest-apis/files/createNewFile" target="_blank"&gt;createNewFile | SAS for Developers&lt;/A&gt;&amp;nbsp;to create this file. Is this the right approach?&amp;nbsp;&lt;/P&gt;&lt;P&gt;In general, what steps do I need to take to import a file to SAS Viya with API requests? Also, can someone tell me how I can distinguish different SAS scripts from each other (reports, jobs, scripts)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mehran&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;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Apr 2025 07:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963192#M2799</guid>
      <dc:creator>MAhkami</dc:creator>
      <dc:date>2025-04-02T07:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Import .sas.json files using SAS Viya API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963198#M2800</link>
      <description>&lt;P&gt;Some questions:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;What kind of files do you want to import?&lt;/LI&gt;
&lt;LI&gt;Are these plain text files that contain SAS program code?&lt;/LI&gt;
&lt;LI&gt;Are these files (.json) created by exporting SAS content folders or members within a SAS Content folder?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;When adding plain text files did you specify the&amp;nbsp;&lt;SPAN&gt;parentFolderUri query parameter?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 11:33:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963198#M2800</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2025-04-02T11:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Import .sas.json files using SAS Viya API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963200#M2801</link>
      <description>&lt;P&gt;So, the files I want to import are not plain txt files and they have json format. I assume that they are&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;exported by SAS content folders. I see different type tags in the json file such as&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"application/vnd.sas.transfer.object",&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"application/vnd.sas.file", and many more. I did not provide the &lt;SPAN&gt;parentFolderUri&amp;nbsp;in the header part of my request. I did not see this requirement in the documentation. Is it necessary to provide this?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 13:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963200#M2801</guid>
      <dc:creator>MAhkami</dc:creator>
      <dc:date>2025-04-02T13:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Import .sas.json files using SAS Viya API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963203#M2802</link>
      <description>&lt;P&gt;So they seem to be SAS packages. These files can be imported using the sas-viya CLI using the transfer plugin.&lt;BR /&gt;&lt;BR /&gt;To make things easier check this&amp;nbsp;&lt;A href="https://github.com/sassoftware/pyviyatools/blob/master/importpackages.py" target="_blank"&gt;https://github.com/sassoftware/pyviyatools/blob/master/importpackages.py&lt;/A&gt;&amp;nbsp;it does the thing you are looking for. It uses the sas-viya CLI in the background to the work.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 14:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963203#M2802</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2025-04-02T14:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import .sas.json files using SAS Viya API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963204#M2803</link>
      <description>&lt;P&gt;Thanks. Does it mean that I cannot import SAS packages with Rest APIs?&amp;nbsp;&lt;BR /&gt;I've seen this approach before and I thought an endpoint is available to transfer these files. I found this link from the community.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Global-Forum-Proceedings/Moving-SAS-Viya-Contents-A-RESTful-Way/ta-p/726351" target="_blank"&gt;Moving SAS® Viya® Contents: A RESTful Way - SAS Support Communities&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Are SAS packages a special type of file in SAS which can only be imported with CLIs?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 14:04:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963204#M2803</guid>
      <dc:creator>MAhkami</dc:creator>
      <dc:date>2025-04-02T14:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Import .sas.json files using SAS Viya API</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963206#M2804</link>
      <description>&lt;P&gt;Publicly documented API's can be found here&amp;nbsp;&lt;A href="https://developer.sas.com/rest-apis" target="_blank"&gt;https://developer.sas.com/rest-apis&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The /transfer API as seen in &lt;A href="https://communities.sas.com/t5/SAS-Global-Forum-Proceedings/Moving-SAS-Viya-Contents-A-RESTful-Way/ta-p/726351" target="_blank" rel="noopener"&gt;Moving SAS® Viya® Contents: A RESTful Way - SAS Support Communities&lt;/A&gt;&amp;nbsp;is not publicly available.&amp;nbsp; So the documented way of doing an import, is to use the sas-viya transfer plugin.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 14:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Import-sas-json-files-using-SAS-Viya-API/m-p/963206#M2804</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2025-04-02T14:16:36Z</dc:date>
    </item>
  </channel>
</rss>

