<?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: The input provided for this request is not valid for this endpoint in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/The-input-provided-for-this-request-is-not-valid-for-this/m-p/892559#M1996</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/382397"&gt;@YuryShkoda&lt;/a&gt; found the issue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems the "arguments" attribute is no longer supported on the compute API side&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We use it as our payload is also used for executing Jobs as well as arbitrary code.&amp;nbsp; Solution is simply to remove that object from the request Body.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Sep 2023 14:19:59 GMT</pubDate>
    <dc:creator>AllanBowe</dc:creator>
    <dc:date>2023-09-04T14:19:59Z</dc:date>
    <item>
      <title>The input provided for this request is not valid for this endpoint</title>
      <link>https://communities.sas.com/t5/SAS-Viya/The-input-provided-for-this-request-is-not-valid-for-this/m-p/892544#M1995</link>
      <description>&lt;P&gt;This thread is in relation to this ticket: &lt;A href="https://github.com/sasjs/adapter/issues/829" target="_blank"&gt;https://github.com/sasjs/adapter/issues/829&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking for support here whilst we figure out the root cause (maybe someone is already aware).&amp;nbsp; It looks like something has changed recently on Viya 4 when it comes to running code in an existing session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the request / response (running &lt;A href="https://cli.sasjs.io" target="_self"&gt;SASjs CLI&lt;/A&gt; with verbose mode):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ℹ HTTP Request:          
                                                                                                                   
POST /compute/sessions/ca3f4bdf-3cf8-48b5-91fb-f9f11999789c-ses0000/jobs HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsIREDACTED
User-Agent: axios/0.27.2
Content-Length: 1162
Host: extviya4.emea.sas.com
Connection: close

{
  name: 'myJob',
  description: 'Powered by SASjs',
  code: [
    'data work.demo;',
    '  do x=1 to 1e6;',
    '    y=ranuni(0);',
    '  end;',
    'run;'
  ],
  variables: {
    SYS_JES_JOB_URI: '',
    _program: '/Viyademo08 Group Folder/4GL/proj/yurshk/jobs/long/long',
    _DEBUG: 131
  },
  arguments: {
    _contextName: 'SAS Job Execution compute context',
    _OMITJSONLISTING: true,
    _OMITJSONLOG: true,
    _OMITSESSIONRESULTS: false,
    _OMITTEXTLISTING: true,
    _OMITTEXTLOG: false
  }
}

HTTP Response Code: 400

HTTP Response:
Date: Fri, 01 Sep 2023 15:14:27 GMT
Content-Type: application/vnd.sas.error+json;charset=utf-8;version=2
Content-Length: 470
Connection: close
Set-Cookie: sas-ingress-nginx=9a59cdfa1a238157REDACTED; Path=/compute/; Secure; HttpOnly; SameSite=Lax
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Content-Security-Policy: default-src 'self'; object-src 'none'; frame-ancestors 'self'; form-action 'self';
Expires: 0
Pragma: no-cache
Sas-Service-Response-Flag: true
Vary: Origin
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
Strict-Transport-Security: max-age=63072000; includeSubDomains

{
  version: 2,
  httpStatusCode: 400,
  errorCode: 5036,
  message: 'The input provided for this request is not valid for this endpoint. ',
  details: [
    'path: /compute/sessions/ca3f4bdf-3cf8-48b5-91fb-f9f11999789c-ses0000/jobs',
    'correlator: d03057f5-3c73-4a2c-b171-af28f8367024'
  ],
  remediation: 'Check to make sure the request made to the server is a valid request. Contact your system administrator to determine if the request made from your application is formatted correctly.'
}

&lt;/PRE&gt;
&lt;P&gt;Checking the &lt;A href="https://developer.sas.com/apis/rest/Compute/#execute-sas-code-in-a-session" target="_self"&gt;API docs&lt;/A&gt; the example body does appear to be different however it does not correspond to the referred &lt;A href="https://developer.sas.com/apis/rest/Compute/#schemajobrequest" target="_self"&gt;JobRequest&lt;/A&gt; schema.&lt;BR /&gt;&lt;BR /&gt;Does anyone have any working examples, or can see what is wrong with our payload?&amp;nbsp; It has worked fine for several years until now..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 12:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/The-input-provided-for-this-request-is-not-valid-for-this/m-p/892544#M1995</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2023-09-04T12:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: The input provided for this request is not valid for this endpoint</title>
      <link>https://communities.sas.com/t5/SAS-Viya/The-input-provided-for-this-request-is-not-valid-for-this/m-p/892559#M1996</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/382397"&gt;@YuryShkoda&lt;/a&gt; found the issue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Seems the "arguments" attribute is no longer supported on the compute API side&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We use it as our payload is also used for executing Jobs as well as arbitrary code.&amp;nbsp; Solution is simply to remove that object from the request Body.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 14:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/The-input-provided-for-this-request-is-not-valid-for-this/m-p/892559#M1996</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2023-09-04T14:19:59Z</dc:date>
    </item>
  </channel>
</rss>

