LineageREST Resource

REST interface for an entity's lineage information

GET /v2/lineage/{guid}

Returns lineage info about entity.

Request Parameters
name type description default constraints
guid path - unique entity id    
depth query - number of hops for lineage 3 int
direction query - input, output or both BOTH "BOTH" or "INPUT" or "OUTPUT"
Response Codes
code condition
200 If Lineage exists for the given entity
400 Bad query parameters
404 If no lineage is found for the given entity
Response Body
media type data type description
application/json AtlasLineageInfo (JSON) AtlasLineageInfo
application/json AtlasLineageInfo (JSON)

Example

Request
GET /v2/lineage/{guid}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "baseEntityGuid" : "...",
  "guidEntityMap" : {
    "property1" : {
      "classificationNames" : [ "...", "..." ],
      "classifications" : [ {
        "entityGuid" : "...",
        "entityStatus" : "ACTIVE",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      }, {
        "entityGuid" : "...",
        "entityStatus" : "DELETED",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      } ],
      "displayText" : "...",
      "guid" : "...",
      "isIncomplete" : true,
      "labels" : [ "...", "..." ],
      "meaningNames" : [ "...", "..." ],
      "meanings" : [ {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "DEPRECATED",
        "steward" : "...",
        "termGuid" : "..."
      }, {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "VALIDATED",
        "steward" : "...",
        "termGuid" : "..."
      } ],
      "status" : "DELETED",
      "attributes" : {
        "property1" : { },
        "property2" : { }
      },
      "typeName" : "..."
    },
    "property2" : {
      "classificationNames" : [ "...", "..." ],
      "classifications" : [ {
        "entityGuid" : "...",
        "entityStatus" : "ACTIVE",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      }, {
        "entityGuid" : "...",
        "entityStatus" : "PURGED",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      } ],
      "displayText" : "...",
      "guid" : "...",
      "isIncomplete" : true,
      "labels" : [ "...", "..." ],
      "meaningNames" : [ "...", "..." ],
      "meanings" : [ {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "DISCOVERED",
        "steward" : "...",
        "termGuid" : "..."
      }, {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "DEPRECATED",
        "steward" : "...",
        "termGuid" : "..."
      } ],
      "status" : "DELETED",
      "attributes" : {
        "property1" : { },
        "property2" : { }
      },
      "typeName" : "..."
    }
  },
  "lineageDepth" : 12345,
  "lineageDirection" : "INPUT",
  "lineageOnDemandPayload" : {
    "property1" : {
      "depth" : 12345,
      "direction" : "BOTH",
      "inputRelationsLimit" : 12345,
      "outputRelationsLimit" : 12345
    },
    "property2" : {
      "depth" : 12345,
      "direction" : "INPUT",
      "inputRelationsLimit" : 12345,
      "outputRelationsLimit" : 12345
    }
  },
  "relations" : [ {
    "fromEntityId" : "...",
    "relationshipId" : "...",
    "toEntityId" : "..."
  }, {
    "fromEntityId" : "...",
    "relationshipId" : "...",
    "toEntityId" : "..."
  } ],
  "relationsOnDemand" : {
    "property1" : {
      "hasMoreInputs" : true,
      "hasMoreOutputs" : true,
      "inputRelationsCount" : 12345,
      "outputRelationsCount" : 12345
    },
    "property2" : {
      "hasMoreInputs" : true,
      "hasMoreOutputs" : true,
      "inputRelationsCount" : 12345,
      "outputRelationsCount" : 12345
    }
  }
}
                
              

POST /v2/lineage/{guid}

Returns lineage info about entity.

Request Parameters
name type description
guid path
Request Body
media type data type
application/json map of LineageOnDemandConstraints (JSON)
Response Codes
code condition
200 If Lineage exists for the given entity
400 Bad query parameters
404 If no lineage is found for the given entity
Response Body
media type data type description
application/json AtlasLineageInfo (JSON) AtlasLineageInfo

Example

Request
POST /v2/lineage/{guid}
Content-Type: application/json
Accept: application/json

                
{
  "..." : {
    "depth" : 12345,
    "direction" : "INPUT",
    "inputRelationsLimit" : 12345,
    "outputRelationsLimit" : 12345
  }
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "baseEntityGuid" : "...",
  "guidEntityMap" : {
    "property1" : {
      "classificationNames" : [ "...", "..." ],
      "classifications" : [ {
        "entityGuid" : "...",
        "entityStatus" : "DELETED",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      }, {
        "entityGuid" : "...",
        "entityStatus" : "DELETED",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      } ],
      "displayText" : "...",
      "guid" : "...",
      "isIncomplete" : true,
      "labels" : [ "...", "..." ],
      "meaningNames" : [ "...", "..." ],
      "meanings" : [ {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "OBSOLETE",
        "steward" : "...",
        "termGuid" : "..."
      }, {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "OBSOLETE",
        "steward" : "...",
        "termGuid" : "..."
      } ],
      "status" : "PURGED",
      "attributes" : {
        "property1" : { },
        "property2" : { }
      },
      "typeName" : "..."
    },
    "property2" : {
      "classificationNames" : [ "...", "..." ],
      "classifications" : [ {
        "entityGuid" : "...",
        "entityStatus" : "DELETED",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      }, {
        "entityGuid" : "...",
        "entityStatus" : "DELETED",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      } ],
      "displayText" : "...",
      "guid" : "...",
      "isIncomplete" : true,
      "labels" : [ "...", "..." ],
      "meaningNames" : [ "...", "..." ],
      "meanings" : [ {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "DISCOVERED",
        "steward" : "...",
        "termGuid" : "..."
      }, {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "DEPRECATED",
        "steward" : "...",
        "termGuid" : "..."
      } ],
      "status" : "PURGED",
      "attributes" : {
        "property1" : { },
        "property2" : { }
      },
      "typeName" : "..."
    }
  },
  "lineageDepth" : 12345,
  "lineageDirection" : "OUTPUT",
  "lineageOnDemandPayload" : {
    "property1" : {
      "depth" : 12345,
      "direction" : "OUTPUT",
      "inputRelationsLimit" : 12345,
      "outputRelationsLimit" : 12345
    },
    "property2" : {
      "depth" : 12345,
      "direction" : "BOTH",
      "inputRelationsLimit" : 12345,
      "outputRelationsLimit" : 12345
    }
  },
  "relations" : [ {
    "fromEntityId" : "...",
    "relationshipId" : "...",
    "toEntityId" : "..."
  }, {
    "fromEntityId" : "...",
    "relationshipId" : "...",
    "toEntityId" : "..."
  } ],
  "relationsOnDemand" : {
    "property1" : {
      "hasMoreInputs" : true,
      "hasMoreOutputs" : true,
      "inputRelationsCount" : 12345,
      "outputRelationsCount" : 12345
    },
    "property2" : {
      "hasMoreInputs" : true,
      "hasMoreOutputs" : true,
      "inputRelationsCount" : 12345,
      "outputRelationsCount" : 12345
    }
  }
}
                
              

GET /v2/lineage/uniqueAttribute/type/{typeName}

Returns lineage info about entity. In addition to the typeName path parameter, attribute key-value pair(s) can be provided in the following format attr:= NOTE: The attrName and attrValue should be unique across entities, eg. qualifiedName

Request Parameters
name type description default constraints
typeName path - typeName of entity    
depth query - number of hops for lineage 3 int
direction query - input, output or both BOTH "BOTH" or "INPUT" or "OUTPUT"
Response Codes
code condition
200 If Lineage exists for the given entity
400 Bad query parameters
404 If no lineage is found for the given entity
Response Body
media type data type description
application/json AtlasLineageInfo (JSON) AtlasLineageInfo

Example

Request
GET /v2/lineage/uniqueAttribute/type/{typeName}
Content-Type: application/json;charset=UTF-8
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "baseEntityGuid" : "...",
  "guidEntityMap" : {
    "property1" : {
      "classificationNames" : [ "...", "..." ],
      "classifications" : [ {
        "entityGuid" : "...",
        "entityStatus" : "ACTIVE",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      }, {
        "entityGuid" : "...",
        "entityStatus" : "PURGED",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      } ],
      "displayText" : "...",
      "guid" : "...",
      "isIncomplete" : true,
      "labels" : [ "...", "..." ],
      "meaningNames" : [ "...", "..." ],
      "meanings" : [ {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "VALIDATED",
        "steward" : "...",
        "termGuid" : "..."
      }, {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "OTHER",
        "steward" : "...",
        "termGuid" : "..."
      } ],
      "status" : "DELETED",
      "attributes" : {
        "property1" : { },
        "property2" : { }
      },
      "typeName" : "..."
    },
    "property2" : {
      "classificationNames" : [ "...", "..." ],
      "classifications" : [ {
        "entityGuid" : "...",
        "entityStatus" : "ACTIVE",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      }, {
        "entityGuid" : "...",
        "entityStatus" : "ACTIVE",
        "propagate" : true,
        "removePropagationsOnEntityDelete" : true,
        "validityPeriods" : [ { }, { } ],
        "attributes" : {
          "property1" : { },
          "property2" : { }
        },
        "typeName" : "..."
      } ],
      "displayText" : "...",
      "guid" : "...",
      "isIncomplete" : true,
      "labels" : [ "...", "..." ],
      "meaningNames" : [ "...", "..." ],
      "meanings" : [ {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "OTHER",
        "steward" : "...",
        "termGuid" : "..."
      }, {
        "confidence" : 12345,
        "createdBy" : "...",
        "description" : "...",
        "displayText" : "...",
        "expression" : "...",
        "qualifiedName" : "...",
        "relationGuid" : "...",
        "source" : "...",
        "status" : "PROPOSED",
        "steward" : "...",
        "termGuid" : "..."
      } ],
      "status" : "DELETED",
      "attributes" : {
        "property1" : { },
        "property2" : { }
      },
      "typeName" : "..."
    }
  },
  "lineageDepth" : 12345,
  "lineageDirection" : "INPUT",
  "lineageOnDemandPayload" : {
    "property1" : {
      "depth" : 12345,
      "direction" : "OUTPUT",
      "inputRelationsLimit" : 12345,
      "outputRelationsLimit" : 12345
    },
    "property2" : {
      "depth" : 12345,
      "direction" : "OUTPUT",
      "inputRelationsLimit" : 12345,
      "outputRelationsLimit" : 12345
    }
  },
  "relations" : [ {
    "fromEntityId" : "...",
    "relationshipId" : "...",
    "toEntityId" : "..."
  }, {
    "fromEntityId" : "...",
    "relationshipId" : "...",
    "toEntityId" : "..."
  } ],
  "relationsOnDemand" : {
    "property1" : {
      "hasMoreInputs" : true,
      "hasMoreOutputs" : true,
      "inputRelationsCount" : 12345,
      "outputRelationsCount" : 12345
    },
    "property2" : {
      "hasMoreInputs" : true,
      "hasMoreOutputs" : true,
      "inputRelationsCount" : 12345,
      "outputRelationsCount" : 12345
    }
  }
}