Enterprise Data Catalog REST API Reference > Use Cases > Retrieve Attribute Details
  

Retrieve Attribute Details

The sample use case is to retrieve the last modified details of an attribute.
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 getAttributeLastModifiedDetails() throws ApiException {
final String attributeId = "core.lastModified";
// Method 1, filter catalog/models/attributes using id parameter
AttributesResponse attrsResponse = this.api.catalogModelsAttributesGet(
new ArrayList<>(Arrays.asList(attributeId)), null, null, null);
AttributeResponse attrResponse = attrsResponse.getItems().get(0);
attrResponse.getSearchable();
//Method 2, use the attributeId to directly fetch the details
attrResponse = this.api.catalogModelsAttributesIdGet(attributeId);
attrResponse.getDataTypeId();
}

}
Using Curl
// Method 1, filter catalog/models/attributes using id parameter
curl -X GET --header "Accept: application/json" "http://localhost:13000/2/catalog/models/attributes?id=core.lastModified"//
//Method 2, use the catalog/models/attributes/{id} to directly fetch the details
curl -X GET --header "Accept: application/json" "http://localhost:13000/2/catalog/models/attributes/core.lastModified"