<?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: Can't find correct project and model id for scoring data through API in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Can-t-find-correct-project-and-model-id-for-scoring-data-through/m-p/687785#M958</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68234"&gt;@Ullsokk&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm contacting someone about the data mining APIs, and the validity of the uri: &lt;EM&gt;GET /datamining/projects/{projectId}&lt;/EM&gt;&amp;nbsp;endpoint.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need score code from model repository, &lt;EM&gt;/modelRepository/models/&amp;amp;modelId/code&lt;/EM&gt; will get the model score code. For the champion code in model repository, &lt;EM&gt;/modelRepository/projects/&amp;amp;projectId/champion/code&lt;/EM&gt; will get the champion model score code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When getting the project from Model Manager, when that project was registered by Model Studio there is an externalProjectId similar to the externalModelId in the model you reference. You would want to use the externalProjectId that is associated with the Model Manager project and not use the id.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 13:27:09 GMT</pubDate>
    <dc:creator>joeFurbee</dc:creator>
    <dc:date>2020-09-30T13:27:09Z</dc:date>
    <item>
      <title>Can't find correct project and model id for scoring data through API</title>
      <link>https://communities.sas.com/t5/Developers/Can-t-find-correct-project-and-model-id-for-scoring-data-through/m-p/686644#M947</link>
      <description>&lt;P&gt;I am using the following to get project and model id:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let uri =/modelRepository/projects/;

proc http url="https://myviyaserver&amp;amp;uri." 
method="GET" 
auth_basic
headerout=hdrs
headerout_overwrite
out=Respout;
headers "Authorization"="Bearer &amp;amp;access_token."
"Accept" = "application/json"
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I then use the following to find the model id of the champion model:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%let uri =/modelRepository/projects/&amp;amp;id./champion;

proc http url="https://myviyaserver&amp;amp;uri." 
method="GET" 
auth_basic
headerout=hdrs
headerout_overwrite
out= model&amp;amp;i.;
headers "Authorization"="Bearer &amp;amp;access_token."
"Accept" = "application/json"
;
run;&lt;/PRE&gt;&lt;P&gt;I then try to use the API score code with the returned values. Have tried using both externalmodelid&amp;nbsp; and then id, but both return a 404 error. If I on the other hand find the same model in model studio, and under pipeline comparison look at the API score code, both the project id and model id is something completely different. The score API works on those values, but I cant find those values using this API. So I guess I either have to find the project and model id that is in model studio (not registered models from the model repository), or find the correct paths to use the api score code using the modelRepository ids?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The API score code uses the following path:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%let scoreModelUrl=&amp;amp;servicesBaseUrl.dataMining/projects/&amp;amp;projectId/models/&amp;amp;modelId/scoreExecutions;&lt;/PRE&gt;&lt;P&gt;But i cant find a GET request that works on that path, eg.g&amp;nbsp;dataMining/projects/&amp;amp;projectId/.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does the URL have to be to get the API score code to work for a modeRepository/&amp;amp;projectId/?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 08:47:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-t-find-correct-project-and-model-id-for-scoring-data-through/m-p/686644#M947</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2020-09-25T08:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find correct project and model id for scoring data through API</title>
      <link>https://communities.sas.com/t5/Developers/Can-t-find-correct-project-and-model-id-for-scoring-data-through/m-p/687785#M958</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68234"&gt;@Ullsokk&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm contacting someone about the data mining APIs, and the validity of the uri: &lt;EM&gt;GET /datamining/projects/{projectId}&lt;/EM&gt;&amp;nbsp;endpoint.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need score code from model repository, &lt;EM&gt;/modelRepository/models/&amp;amp;modelId/code&lt;/EM&gt; will get the model score code. For the champion code in model repository, &lt;EM&gt;/modelRepository/projects/&amp;amp;projectId/champion/code&lt;/EM&gt; will get the champion model score code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When getting the project from Model Manager, when that project was registered by Model Studio there is an externalProjectId similar to the externalModelId in the model you reference. You would want to use the externalProjectId that is associated with the Model Manager project and not use the id.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 13:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-t-find-correct-project-and-model-id-for-scoring-data-through/m-p/687785#M958</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2020-09-30T13:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find correct project and model id for scoring data through API</title>
      <link>https://communities.sas.com/t5/Developers/Can-t-find-correct-project-and-model-id-for-scoring-data-through/m-p/687798#M959</link>
      <description>&lt;P&gt;Thank you! I now get a returned score file that I cant quite recognize, starting with&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;package MS_lotsofstrings_22SEP2020100924511 / overwrite=yes;
dcl package score _lotsofstrings();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;I have the models as a filename model&amp;amp;i. temp. Do I need to store the files physically in a .sas format to work?&lt;BR /&gt;How do I use this code? Doesnt seemt to be an astore, and the good old %include after a set statement does not work for me. Event tried saving to a .sas file and putting a data and set statement before the code, but get the following errors:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: DATA STEP Component Object failure. Aborted during the COMPILATION phase.
ERROR 180-322: Statement is not valid or it is used out of proper order.
ERROR 565-185: PACKAGE is not a known class name.&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 12:57:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-t-find-correct-project-and-model-id-for-scoring-data-through/m-p/687798#M959</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2020-09-30T12:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can't find correct project and model id for scoring data through API</title>
      <link>https://communities.sas.com/t5/Developers/Can-t-find-correct-project-and-model-id-for-scoring-data-through/m-p/688831#M970</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/214450"&gt;@joeFurbee&lt;/a&gt;&amp;nbsp;Tanks for the input so far. But I can't get the code from the API to work. I can't seem to find out what kind of code this is, and how to run it. Any input would be much appreciated. What I am basically asking, is what to do after retrieving the score code using&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;/modelRepository/projects/&amp;amp;projectId/champion/code&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2020 07:21:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Can-t-find-correct-project-and-model-id-for-scoring-data-through/m-p/688831#M970</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2020-10-05T07:21:19Z</dc:date>
    </item>
  </channel>
</rss>

