Child pages
  • Atlas REST API
Skip to end of metadata
Go to start of metadata

Version 2 REST API

The API definitions for the version 2 APIs can be found here: http://atlas.incubator.apache.org/api/v2/index.html

 

The text below is for the original REST API.


Version 1 REST API

Types Resource

A type is the description of any representable item; e.g. a Hive table. You can represent any meta model representing any domain using these types.

/types

POST

Submits a type definition corresponding to a given type representing a meta model of a domain. Could represent things like Hive Database, Hive Table, etc.

Request Body

elementTypes Definition
media typesapplication/json

Response Body

elementTypes Definition
media typesapplication/json

GET

Gets the list of trait type names registered in the type system.

Parameters

namedescriptiontypedefault
typetype should be the name of enum org.apache.atlas.typesystem.types.DataTypes.TypeCategory Typically, would be one of all, TRAIT, CLASS, ENUM, STRUCT queryall

Response Body

elementType Names Response
media types application/json

/types/{typeName}

GET

Fetch the complete definition of a given type name which is unique.

Parameters

namedescriptiontype
typeNameunique type namepath

Response Body

element 

media types

application/json

Types Definition

Properties
nametypedescription
enumTypesArrayArray of Type Definition for ENUM types
structTypesArrayArray of Type Definition for STRUCT
traitTypesArrayArray of Type Definition for TRAIT
classTypesArray Array of Type Definition for CLASS types
Example
{
  "enumTypes": [
  ],
  "structTypes": [
  ],
  "traitTypes": [
    {
      "superTypes": [
      ],
      "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.TraitType",
      "typeName": "Dimension",
      "attributeDefinitions": [
     ]
   }
 ],
"classTypes": [
    {
      "superTypes": [
      ],
      "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
      "typeName": "DB",
      "attributeDefinitions": [
        {
          "name": "name",
          "dataTypeName": "string",
          "multiplicity": "optional",
          "isComposite": false,
          "isUnique": false,
          "isIndexable": true,
          "reverseAttributeName": null
        },
        {
          "name": "description",
          "dataTypeName": "string",
          "multiplicity": "optional",
          "isComposite": false,
          "isUnique": false,
          "isIndexable": true,
          "reverseAttributeName": null
        }
      ]
    }
  ]
}

Type Definition

Properties

nametypedescription
superTypesArrayArray of. hierarchicalMetaTypeName
StringThe type nametypeName 
StringThe type name 
attributeDefinitionsArrayArray of Attribute Definitions
Example
 {
      "superTypes": [
      ],
      "hierarchicalMetaTypeName": "org.apache.atlas.typesystem.types.ClassType",
      "typeName": "DB",
      "attributeDefinitions": [
        {
          "name": "name",
          "dataTypeName": "string",
          "multiplicity": "optional",
          "isComposite": false,
          "isUnique": false,
          "isIndexable": true,
          "reverseAttributeName": null
        },
        {
          "name": "description",
          "dataTypeName": "string",
          "multiplicity": "optional",
          "isComposite": false,
          "isUnique": false,
          "isIndexable": true,
          "reverseAttributeName": null
        },
        {
          "name": "createTime",
          "dataTypeName": "int",
          "multiplicity": "optional",
          "isComposite": false,
          "isUnique": false,
          "isIndexable": true,
          "reverseAttributeName": null
        }
      ]
    }

 

Type Name Definition

Properties

nametypedescription
nameStringThe type name
Example
{
"name": "Table"
}

Attribute Definition

Properties

nametypedescription
nameStringThe attribute name
dataTypeNameStringThe owning data type name
multiplicityString  
isCompositeBoolean 
isUniqueBoolean 
isIndexableBoolean 
reverseAttributeNameStringexample
Example
{
   "name": "name",
  "dataTypeName": "string",
  "multiplicity": "optional",
  "isComposite": false,
  "isUnique": false,
  "isIndexable": true,
  "reverseAttributeName": null
}

Types Response

Properties

nametypedescription
requestIdStringThe unique id for the request
typesArrayAn array of Type Name Definition
Example
{
  "requestId": "2028017635@qtp-1259652483-0 - 94742422-fe87-4409-ad83-aed7337a6256",
  "types": [
    {
      "name": "JdbcAccess"
    },
    {
      "name": "StorageDesc"
    },
    {
      "name": "Table"
    },
    {
      "name": "Dimension"
    },
    {
      "name": "Fact"
    },
    {
      "name": "View"
    },
    {
      "name": "LoadProcess"
    },
    {
      "name": "PII"
    },
    {
      "name": "Column"
    },
    {
      "name": "Metric"
    },
    {
      "name": "ETL"
    },
    {
      "name": "DB"
    }
  ]
}

Type Response

Properties

nametypedescription
typeNameStringThe type name
definitionStringString representation of a Types Definition
requestIdStringThe unique id for the request
Example
{ "typeName": "DataSet", "definition": "{\n \"enumTypes\":[\n \n ],\n \"structTypes\":[\n \n ],\n \"traitTypes\":[\n \n ],\n \"classTypes\":[\n {\n \"superTypes\":[\n \n ],\n \"hierarchicalMetaTypeName\":\"org.apache.atlas.typesystem.types.ClassType\",\n \"typeName\":\"DataSet\",\n \"attributeDefinitions\":[\n {\n \"name\":\"name\",\n \"dataTypeName\":\"string\",\n \"multiplicity\":\"required\",\n \"isComposite\":false,\n \"isUnique\":false,\n \"isIndexable\":true,\n \"reverseAttributeName\":null\n },\n {\n \"name\":\"description\",\n \"dataTypeName\":\"string\",\n \"multiplicity\":\"optional\",\n \"isComposite\":false,\n \"isUnique\":false,\n \"isIndexable\":true,\n \"reverseAttributeName\":null\n }\n ]\n }\n ]\n}", "requestId": "214048839@qtp-1259652483-857 - b8e7dcff-a4d9-45c4-b977-133f86acd29c" }
 

Type Names Response

Properties

nametypedescription
resultsArrayAn array of type names
countNumberThe count of returned type names
requestIdStringThe unique id for the request
Example
{
  "results": [
    "StorageDesc",
    "DataSet",
    "hive_order",
    "Process",
    "hive_table",
    "hive_db",
    "hive_process",
    "hive_principal_type",
    "hive_resource_type",
    "hive_object_type",
    "Column",
    "Infrastructure",
    "hive_index",
    "hive_column",
    "hive_resourceuri",
    "JdbcAccess",
    "Table",
    "Dimension",
    "Fact",
    "View",
    "LoadProcess",
    "hive_storagedesc",
    "PII",
    "hive_role",
    "hive_partition",
    "hive_serde",
    "Metric",
    "hive_type",
    "ETL",
    "DB"
  ],
  "count": 30,
  "requestId": "214048839@qtp-1259652483-857 - f9282cc9-a242-4631-9bc2-0a4878f49f56"
}
example: type ENUM
{
  "results": [
    "hive_resource_type",
    "hive_principal_type",
    "hive_object_type"
  ],
  "count": 3,
  "requestId": "214048839@qtp-1259652483-857 - a9826a25-e8d1-4ca5-9284-6498207215dd"
}

Entity Resource

An entity is an "instance" of a Type. Entities conform to the definition of the Type they correspond with.

/entities

POST

Submits an entity definition (instance) corresponding to a given type.

Request Body

element

Entity Definition

media types

application/json

Response Body

element

Entity Response

media types

application/json

 

GET

Gets the list of entities for a given entity type.

Parameters

name

description

type

type

name of a type which is unique

query

Response Body

element

Entity Type Response

media types

application/json

/entities/{guid}

GET

Fetch the complete definition of an entity given its GUID.

Parameters

name

description

type

guid

The unique identifier for the entity.

path

Response Body

element

Entity Response

media types

application/json

PUT

Adds or updates a property of the given entity id.

 
 
 
 
  • No labels