Enterprise Data Catalog REST API Reference > Use Cases > Retrieve Objects Using Object Name
  

Retrieve Objects Using Object Name

The sample use case is to find all the tables that has the word Customer in the table name.
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 searchForObjects() throws ApiException {
BigDecimal offset = BigDecimal.ZERO;
final BigDecimal pageSize = BigDecimal.valueOf(20);
ObjectsResponse response = null;

do {
response = this.api.catalogDataObjectsGet(
"core.name:*customer* AND core.classType:com.infa.ldm.relational.Table", null, offset, pageSize, false);

for (ObjectResponse obj : response.getItems()) {
// Do something with the returned objects
obj.getFacts();
}

offset = offset.add(pageSize);
} while (response.getMetadata().getTotalCount().longValue() > pageSize.longValue());
}
Using Curl
curl -X GET --header "Accept: application/json" --header "Content-Type: application/json" "http://localhost:13000/2/catalog/data/objects?q=core.name%3A*customer*%20AND%20core.classType%3Acom.infa.ldm.relational.Table&offset=0&pageSize=20&related=false"