Enterprise Data Catalog REST API Reference > Use Cases > Retrieve Relationships Between Objects
  

Retrieve Relationships Between Objects

The sample use case is to retrieve the columns that are downstream in the data flow from the Employee_Name column.
You can use the REST API to retrieve the information in one of the following ways:
Using Java code and the Bundled Java Client
public void getDownstreamColumns() {
try {
Links links = this.api.catalogDataRelationshipsGet(new ArrayList<>(Arrays.asList("resource://Employees/Name")),
new ArrayList<>(Arrays.asList("core.DataFlow")), BigDecimal.ZERO, "OUT", true, false,
new ArrayList<>(Arrays.asList("core.name")));

for (Link link : links.getItems()) {
// Do something with the returned link
link.getOutEmbedded().getFacts();
}
} catch (ApiException e) {}
}
Using Curl
curl -X GET --header "Accept: application/json" --header "Content-Type: application/json" "http://localhost:13000/2/catalog/data/relationships?seed=resource%3A%2F%2FEmployees%2FName&association=core.DataFlow&direction=OUT&removeDuplicateAggregateLinks=true&depth=0&includeTerms=false&includeAttribute=core.name"