<?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: API access via python script in Databricks Free Edition Help</title>
    <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102518#M89</link>
    <description>&lt;P&gt;Are you running this from a notebook? if yes can you run bash command:&lt;BR /&gt;&lt;BR /&gt;%sh&lt;/P&gt;
&lt;P&gt;nc -vz&amp;nbsp;prod-api.xsp.cloud.corpintra.net 443&lt;BR /&gt;&lt;BR /&gt;I want to confirm your cluster is able to reach the endpoint.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Dec 2024 16:10:33 GMT</pubDate>
    <dc:creator>Walter_C</dc:creator>
    <dc:date>2024-12-18T16:10:33Z</dc:date>
    <item>
      <title>API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102517#M88</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I try to access an API via a python script.&lt;/P&gt;&lt;P&gt;I have access using postman. But if I try to access it via python in databricks, it will not work (timeout).&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; requests&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; socket&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;url &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;'&lt;A href="https://prod-api.xsp.cloud.corpintra.net/tips-ki/symptom-prediction/api/v0/predict" target="_blank"&gt;https://prod-api.xsp.cloud.corpintra.net/tips-ki/symptom-prediction/api/v0/predict&lt;/A&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;headers &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Content-Type'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'application/json'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'x-api-key'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'&amp;lt;api-key&amp;gt;'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'User-Agent'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'PostmanRuntime/7.43.0'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Accept'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'*/*'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Host'&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;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bsp;&lt;/SPAN&gt;&lt;SPAN&gt;# Timeout nach 10 Sekunden&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; response.&lt;/SPAN&gt;&lt;SPAN&gt;raise_for_status&lt;/SPAN&gt;&lt;SPAN&gt;() &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;# Löst eine Ausnahme bei HTTP-Fehlern aus&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; data &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; response.&lt;/SPAN&gt;&lt;SPAN&gt;json&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(data)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:06:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102517#M88</guid>
      <dc:creator>DanScho</dc:creator>
      <dc:date>2024-12-18T16:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102518#M89</link>
      <description>&lt;P&gt;Are you running this from a notebook? if yes can you run bash command:&lt;BR /&gt;&lt;BR /&gt;%sh&lt;/P&gt;
&lt;P&gt;nc -vz&amp;nbsp;prod-api.xsp.cloud.corpintra.net 443&lt;BR /&gt;&lt;BR /&gt;I want to confirm your cluster is able to reach the endpoint.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:10:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102518#M89</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-12-18T16:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102520#M90</link>
      <description>&lt;P&gt;yes, i use it from a notebook.&lt;/P&gt;&lt;P&gt;C:\Windows&amp;gt;nc -vz prod-api.xsp.cloud.corpintra.net 443&lt;BR /&gt;Der Befehl "nc" ist entweder falsch geschrieben oder&lt;BR /&gt;konnte nicht gefunden werden.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:22:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102520#M90</guid>
      <dc:creator>DanScho</dc:creator>
      <dc:date>2024-12-18T16:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102522#M91</link>
      <description>&lt;P&gt;is "nc" a linux command? I use windows...&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:31:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102522#M91</guid>
      <dc:creator>DanScho</dc:creator>
      <dc:date>2024-12-18T16:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102523#M92</link>
      <description>&lt;P&gt;Sorry I am confused, you mentioned that you are running this in a notebook, this inside Databricks and running it through a cluster? if this is the case the command needs to be ran inside the notebook, you can add a new cell from it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:33:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102523#M92</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-12-18T16:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102532#M93</link>
      <description>&lt;P&gt;sorry for confusing... i missunderstood your question.... now I got it.&lt;/P&gt;&lt;P&gt;running this command in a notebook in databricks shows no result.... it is "loading" endlessly... I only can interrupt it....&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:44:05 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102532#M93</guid>
      <dc:creator>DanScho</dc:creator>
      <dc:date>2024-12-18T16:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102533#M94</link>
      <description>&lt;P&gt;now it shows:&lt;BR /&gt;&lt;SPAN&gt;nc: connect to prod-api.xsp.cloud.corpintra.net (53.13.186.164) port 443 (tcp) failed: Connection timed out&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:44:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102533#M94</guid>
      <dc:creator>DanScho</dc:creator>
      <dc:date>2024-12-18T16:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102534#M95</link>
      <description>&lt;P&gt;ok that means that your subnet for clusters in the cloud deployment is not allowing connections to this host on port 443, you will need to check with your cloud administrator or network team to allow this traffic&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:51:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102534#M95</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-12-18T16:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102538#M96</link>
      <description>&lt;P&gt;hmm... not good... is it not possible to configure this in azure databricks by myself?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 17:26:01 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102538#M96</guid>
      <dc:creator>DanScho</dc:creator>
      <dc:date>2024-12-18T17:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102540#M97</link>
      <description>&lt;P&gt;Unfortunately no because this is not being blocked by Databricks, this is being blocked by a firewall or security group at the cloud level&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 17:54:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102540#M97</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2024-12-18T17:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: API access via python script</title>
      <link>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102662#M98</link>
      <description>&lt;P&gt;Nevertheless: Thank you very much for helping me!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 13:34:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/databricks-free-edition-help/api-access-via-python-script/m-p/102662#M98</guid>
      <dc:creator>DanScho</dc:creator>
      <dc:date>2024-12-19T13:34:58Z</dc:date>
    </item>
  </channel>
</rss>

