<?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 Re: Atlas create type via rest api in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114972#M38572</link>
    <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/40/apathan.html" nodeid="40"&gt;@Ayub Pathan&lt;/A&gt;  Do I have to fatten the json string or will it accept the formatted version you posted?&lt;/P&gt;</description>
    <pubDate>Tue, 23 Aug 2016 22:42:38 GMT</pubDate>
    <dc:creator>sunile_manjee</dc:creator>
    <dc:date>2016-08-23T22:42:38Z</dc:date>
    <item>
      <title>Atlas create type via rest api</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114970#M38570</link>
      <description>&lt;P&gt;How to create new atlas Type using rest api?  information on the apache site is lite.  A working example would be extremely helpful. for example i want to create type call "MyNewType".  &lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 11:48:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114970#M38570</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-08-23T11:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas create type via rest api</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114971#M38571</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/1486/smanjee.html" nodeid="1486"&gt;@Sunile Manjee&lt;/A&gt;&lt;P&gt;Below is an example to create type.&lt;/P&gt;&lt;P&gt;Save below json to some file(example type.json)&lt;/P&gt;&lt;PRE&gt;{
  "enumTypes": [
    
  ],
  "structTypes": [
    
  ],
  "traitTypes": [
    
  ],
  "classTypes": [
    {
      "superTypes": [
        
      ],
      "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
      "typeName": "myNewType1",
      "typeDescription": null,
      "attributeDefinitions": [
        {
          "name": "multiplicityRequired",
          "dataTypeName": "string",
          "multiplicity": "required",
          "isComposite": true,
          "isUnique": true,
          "isIndexable": true,
          "reverseAttributeName": null
        }
      ]
    }
  ]
}
&lt;/PRE&gt;&lt;P&gt;Submit HTTP POST request to atlas to create a type of above.&lt;/P&gt;&lt;PRE&gt;Command:
curl -X POST -d @type.json -u &amp;lt;username&amp;gt;:&amp;lt;password&amp;gt; -H 'Content-Type: application/json;  charset=UTF-8' http(s)://&amp;lt;atlas-hostname&amp;gt;:&amp;lt;atlas-port&amp;gt;/api/atlas/types


Output:
{"requestId":"qtp513700442-26 - b84cee5b-7940-4308-a35b-fc9af5de0b81","types":[{"name":"myNewType1"}]}
&lt;/PRE&gt;&lt;P&gt;Please refer to this post for more information: &lt;A href="https://community.hortonworks.com/content/kbentry/124/atlas-api-tips-create-trait-type-example.html" target="_blank"&gt;https://community.hortonworks.com/content/kbentry/124/atlas-api-tips-create-trait-type-example.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 18:00:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114971#M38571</guid>
      <dc:creator>apathan</dc:creator>
      <dc:date>2016-08-23T18:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas create type via rest api</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114972#M38572</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/40/apathan.html" nodeid="40"&gt;@Ayub Pathan&lt;/A&gt;  Do I have to fatten the json string or will it accept the formatted version you posted?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 22:42:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114972#M38572</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-08-23T22:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas create type via rest api</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114973#M38573</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1486/smanjee.html" nodeid="1486"&gt;@Sunile Manjee&lt;/A&gt; you can try as it is but either ways should be fine. &lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 22:59:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114973#M38573</guid>
      <dc:creator>apathan</dc:creator>
      <dc:date>2016-08-23T22:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Atlas create type via rest api</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114974#M38574</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/40/apathan.html" nodeid="40"&gt;@Ayub Pathan&lt;/A&gt; i will try soon.  trying 100s of ways last night and none of the combos worked.  will update today.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2016 23:30:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Atlas-create-type-via-rest-api/m-p/114974#M38574</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-08-23T23:30:45Z</dc:date>
    </item>
  </channel>
</rss>

