<?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: Create new job api error &amp;quot;MALFORMED_REQUEST&amp;quot; in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/create-new-job-api-error-quot-malformed-request-quot/m-p/26660#M18683</link>
    <description>&lt;P&gt;thanks 611969, I checked my code again and found some issues with string in json body&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jobs API 2.0 &amp;gt;&amp;gt; &lt;A href="https://docs.databricks.com/dev-tools/api/2.0/jobs.html#create" target="test_blank"&gt;https://docs.databricks.com/dev-tools/api/2.0/jobs.html#create&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Oct 2022 17:12:33 GMT</pubDate>
    <dc:creator>tum</dc:creator>
    <dc:date>2022-10-19T17:12:33Z</dc:date>
    <item>
      <title>Create new job api error "MALFORMED_REQUEST"</title>
      <link>https://community.databricks.com/t5/data-engineering/create-new-job-api-error-quot-malformed-request-quot/m-p/26658#M18681</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i'm trying to test create a new job api (v 2.1) with python, but i got error:&lt;/P&gt;&lt;P&gt;{ 'error_code': 'MALFORMED_REQUEST',&lt;/P&gt;&lt;P&gt;&amp;nbsp;'message': 'Invalid JSON given in the body of the request - expected a map'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do i validate json body before posting ?&lt;/P&gt;&lt;P&gt;this is my json&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; {
            "name": "testing job",
            "new_cluster": {
                "spark_version": "7.3.x-scala2.12",
                "node_type_id": "r3.xlarge",
                "aws_attributes": {
                "availability": "ON_DEMAND"
                },
                "num_workers": 10
            },
            "email_notifications": {
                "on_start": [],
                "on_success": [],
                "on_failure": []
            },
            "timeout_seconds": 3600,
            "max_retries": 1,
            "schedule": {
                "quartz_cron_expression": "0 15 22 * * ?",
                "timezone_id": "America/Los_Angeles"
            }
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 09:29:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/create-new-job-api-error-quot-malformed-request-quot/m-p/26658#M18681</guid>
      <dc:creator>tum</dc:creator>
      <dc:date>2022-10-19T09:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create new job api error "MALFORMED_REQUEST"</title>
      <link>https://community.databricks.com/t5/data-engineering/create-new-job-api-error-quot-malformed-request-quot/m-p/26659#M18682</link>
      <description>&lt;P&gt;@tum m​&amp;nbsp;It looks Json key-value pairs that you are using seems to be causing issue. spark version is individual key-value pair. that is not a part of object itself (e.g.: you used new cluster and under that you added spark version), please find below examples.  as far as i know there is no validation tool to show if object mapping added is right, but syntax wise we have tools like json validator &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/dev-tools/api/latest/clusters.html?_ga=2.150187956.302334246.1666014889-1804906335.1628093752" alt="https://docs.databricks.com/dev-tools/api/latest/clusters.html?_ga=2.150187956.302334246.1666014889-1804906335.1628093752" target="_blank"&gt;Clusters API 2.0 | Databricks on AWS&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 14:12:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/create-new-job-api-error-quot-malformed-request-quot/m-p/26659#M18682</guid>
      <dc:creator>karthik_p</dc:creator>
      <dc:date>2022-10-19T14:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create new job api error "MALFORMED_REQUEST"</title>
      <link>https://community.databricks.com/t5/data-engineering/create-new-job-api-error-quot-malformed-request-quot/m-p/26660#M18683</link>
      <description>&lt;P&gt;thanks 611969, I checked my code again and found some issues with string in json body&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jobs API 2.0 &amp;gt;&amp;gt; &lt;A href="https://docs.databricks.com/dev-tools/api/2.0/jobs.html#create" target="test_blank"&gt;https://docs.databricks.com/dev-tools/api/2.0/jobs.html#create&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 17:12:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/create-new-job-api-error-quot-malformed-request-quot/m-p/26660#M18683</guid>
      <dc:creator>tum</dc:creator>
      <dc:date>2022-10-19T17:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Create new job api error "MALFORMED_REQUEST"</title>
      <link>https://community.databricks.com/t5/data-engineering/create-new-job-api-error-quot-malformed-request-quot/m-p/26661#M18684</link>
      <description>&lt;P&gt;Hi @tum m​&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or &lt;B&gt;mark an answer as best&lt;/B&gt;? Else please let us know if you need more help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We'd love to hear from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Nov 2022 13:33:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/create-new-job-api-error-quot-malformed-request-quot/m-p/26661#M18684</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-27T13:33:57Z</dc:date>
    </item>
  </channel>
</rss>

