<?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>question Error while creating Atlas trait via rest api call in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121135#M51159</link>
    <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11266-atlas-error.txt"&gt;atlas-error.txt&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11265-createtag.txt"&gt;createtag.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Hope you can help me out. I am using Atlas API to get the list of traits and create traits via API calls.&lt;/P&gt;&lt;P&gt;I am able to call the GET method without any issues. But when I call the POST method it gives an error as shown below: &lt;/P&gt;&lt;P&gt;Error - Unable to deserialize json&lt;/P&gt;&lt;P&gt;Below are the commands that I am executing:&lt;/P&gt;&lt;P&gt;Get All tags ---------------- Works fine
&lt;/P&gt;&lt;P&gt;curl --user admin:admin -H "Content-Type: application/json" -X GET "&lt;A href="http://ServerName:Port/api/atlas/types?type=TRAIT"&gt;http://ServerName:Port/api/atlas/types?type=TRAIT&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;Create tag ----------------- Gives Error
&lt;/P&gt;&lt;P&gt;curl --user "admin:admin" -H "Content-Type: application/json" -d "createtag.txt" -X POST "&lt;A href="http://ServerName:Port/api/atlas/types"&gt;http://ServerName:Port/api/atlas/types&lt;/A&gt;"&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jan 2017 05:23:30 GMT</pubDate>
    <dc:creator>jigar_chhadwa</dc:creator>
    <dc:date>2017-01-10T05:23:30Z</dc:date>
    <item>
      <title>Error while creating Atlas trait via rest api call</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121135#M51159</link>
      <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11266-atlas-error.txt"&gt;atlas-error.txt&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11265-createtag.txt"&gt;createtag.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Hope you can help me out. I am using Atlas API to get the list of traits and create traits via API calls.&lt;/P&gt;&lt;P&gt;I am able to call the GET method without any issues. But when I call the POST method it gives an error as shown below: &lt;/P&gt;&lt;P&gt;Error - Unable to deserialize json&lt;/P&gt;&lt;P&gt;Below are the commands that I am executing:&lt;/P&gt;&lt;P&gt;Get All tags ---------------- Works fine
&lt;/P&gt;&lt;P&gt;curl --user admin:admin -H "Content-Type: application/json" -X GET "&lt;A href="http://ServerName:Port/api/atlas/types?type=TRAIT"&gt;http://ServerName:Port/api/atlas/types?type=TRAIT&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;Create tag ----------------- Gives Error
&lt;/P&gt;&lt;P&gt;curl --user "admin:admin" -H "Content-Type: application/json" -d "createtag.txt" -X POST "&lt;A href="http://ServerName:Port/api/atlas/types"&gt;http://ServerName:Port/api/atlas/types&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 05:23:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121135#M51159</guid>
      <dc:creator>jigar_chhadwa</dc:creator>
      <dc:date>2017-01-10T05:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating Atlas trait via rest api call</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121136#M51160</link>
      <description>&lt;P&gt;Please try this json&lt;/P&gt;&lt;PRE&gt;{
 "enumTypes":[],
 "structTypes":[],
 "traitTypes":[
 {
 "superTypes":[],
 "hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.TraitType",
 "typeName":"NAME_OF_TAG_TO_CREATE",
 "typeDescription":null,
 "attributeDefinitions":[]
 }
&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Jan 2017 05:45:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121136#M51160</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2017-01-10T05:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating Atlas trait via rest api call</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121137#M51161</link>
      <description>&lt;P&gt;Hi Sunile,&lt;/P&gt;&lt;P&gt;I tried the json you provided, but still am getting the same error.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 17:19:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121137#M51161</guid>
      <dc:creator>jigar_chhadwa</dc:creator>
      <dc:date>2017-01-10T17:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating Atlas trait via rest api call</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121138#M51162</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.hortonworks.com/users/15334/jigarchhadwa.html"&gt;@Jigar Chhadwa&lt;/A&gt; , provide createtag.txt as @createtag.txt . In your case,curl command took "createtag.txt" itself as the json instead of the content in the file.&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;curl --user "admin:admin" -H "Content-Type: application/json" -d @createtag.txt -X POST "&lt;A href="http://servername:Port/api/atlas/types"&gt;http://ServerName:Port/api/atlas/types&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 20:04:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121138#M51162</guid>
      <dc:creator>ssainath</dc:creator>
      <dc:date>2017-01-10T20:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating Atlas trait via rest api call</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121139#M51163</link>
      <description>&lt;P&gt;here is example where my.json has content from above&lt;/P&gt;&lt;PRE&gt;curl -X POST -d @my.json -u admin:admin -H 'Content-Type: application/json;  charset=UTF-8' 127.0.0.1:21000/api/atlas/types
&lt;/PRE&gt;&lt;P&gt;more examples here&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/sunileman/Atlas-API-Examples" target="_blank"&gt;https://github.com/sunileman/Atlas-API-Examples&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 00:00:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121139#M51163</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2017-01-11T00:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating Atlas trait via rest api call</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121140#M51164</link>
      <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11303-createtag.txt"&gt;createtag.txt&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11302-atlas-api-call-and-error.txt"&gt;atlas-api-call-and-error.txt&lt;/A&gt;Got it &lt;A rel="user" href="https://community.cloudera.com/users/2504/ssainath.html" nodeid="2504"&gt;@Sharmadha Sainath&lt;/A&gt; , I tried with the new command but got the same error as before. I changed the name of the tag and the description. Also since GET is working fine, I got the definition from one of the tags which is already created from the UI, so the definition seems to be the correct one.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2017 00:14:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121140#M51164</guid>
      <dc:creator>jigar_chhadwa</dc:creator>
      <dc:date>2017-01-11T00:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error while creating Atlas trait via rest api call</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121141#M51165</link>
      <description>&lt;P&gt;This was resolved with the corrected json input. the description column was missing.&lt;/P&gt;&lt;P&gt;thanks all&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 00:21:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Error-while-creating-Atlas-trait-via-rest-api-call/m-p/121141#M51165</guid>
      <dc:creator>jigar_chhadwa</dc:creator>
      <dc:date>2017-03-01T00:21:31Z</dc:date>
    </item>
  </channel>
</rss>

