In 1021 EnterpriseDataCatalog (REST-API) Reference en
In 1021 EnterpriseDataCatalog (REST-API) Reference en
In 1021 EnterpriseDataCatalog (REST-API) Reference en
10.2.1
This software and documentation are provided only under a separate license agreement containing restrictions on use and disclosure. No part of this document may be
reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica LLC.
Informatica and the Informatica logo are trademarks or registered trademarks of Informatica LLC in the United States and many jurisdictions throughout the world. A
current list of Informatica trademarks is available on the web at https://www.informatica.com/trademarks.html. Other company and product names may be trade
names or trademarks of their respective owners.
Portions of this software and/or documentation are subject to copyright held by third parties. Required third party notices are included with the product.
U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial
computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such,
the use, duplication, disclosure, modification, and adaptation is subject to the restrictions and license terms set forth in the applicable Government contract, and, to the
extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License.
The information in this documentation is subject to change without notice. If you find any problems in this documentation, report them to us at
[email protected].
Informatica products are warranted according to the terms and conditions of the agreements under which they are provided. INFORMATICA PROVIDES THE
INFORMATION IN THIS DOCUMENT "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT.
Chapter 1: Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Enterprise Data Catalog REST API Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Accessing the APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table of Contents 3
Chapter 3: Object APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Object REST APIs Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Object Information APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Data Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Data Object IDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Relationships. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Object Modification APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Data Objects Modification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Data Object Modification IDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4 Table of Contents
Preface
The Informatica Enterprise Data Catalog REST API Reference is written for developers who want to customise
Enterprise Data Catalog by using the concepts exposed by the REST APIs. It is assumed that you have a good
understanding of REST concepts and experience using REST APIs.
Informatica Resources
Informatica Network
Informatica Network hosts Informatica Global Customer Support, the Informatica Knowledge Base, and other
product resources. To access Informatica Network, visit https://network.informatica.com.
To access the Knowledge Base, visit https://kb.informatica.com. If you have questions, comments, or ideas
about the Knowledge Base, contact the Informatica Knowledge Base team at
[email protected].
Informatica Documentation
To get the latest documentation for your product, browse the Informatica Knowledge Base at
https://kb.informatica.com/_layouts/ProductDocumentation/Page/ProductDocumentSearch.aspx.
If you have questions, comments, or ideas about this documentation, contact the Informatica Documentation
team through email at [email protected].
5
Informatica Product Availability Matrixes
Product Availability Matrixes (PAMs) indicate the versions of operating systems, databases, and other types
of data sources and targets that a product release supports. If you are an Informatica Network member, you
can access PAMs at
https://network.informatica.com/community/informatica-network/product-availability-matrices.
Informatica Velocity
Informatica Velocity is a collection of tips and best practices developed by Informatica Professional
Services. Developed from the real-world experience of hundreds of data management projects, Informatica
Velocity represents the collective knowledge of our consultants who have worked with organizations from
around the world to plan, develop, deploy, and maintain successful data management solutions.
If you are an Informatica Network member, you can access Informatica Velocity resources at
http://velocity.informatica.com.
If you have questions, comments, or ideas about Informatica Velocity, contact Informatica Professional
Services at [email protected].
Informatica Marketplace
The Informatica Marketplace is a forum where you can find solutions that augment, extend, or enhance your
Informatica implementations. By leveraging any of the hundreds of solutions from Informatica developers
and partners, you can improve your productivity and speed up time to implementation on your projects. You
can access Informatica Marketplace at https://marketplace.informatica.com.
To find your local Informatica Global Customer Support telephone number, visit the Informatica website at
the following link:
http://www.informatica.com/us/services-and-training/support-services/global-support-centers.
If you are an Informatica Network member, you can use Online Support at http://network.informatica.com.
6 Preface
Chapter 1
Overview
This chapter includes the following topics:
You can use the Enterprise Data Catalog REST APIs to extract information from models and objects and
update models and objects. The APIs expose the following concepts:
Model
A model defines the structure for the metadata that the scanner ingests in the catalog.
Data
Association
Association Kinds
Types of associations.
Data Types
Types of attributes.
7
Classes
Types of objects.
Reference Attributes
Type of attribute that projects a value from a source object to a target object.
An object is an asset in the catalog. The object includes facts and you can link an object to other
objects. Scanners or users create facts and links.
Fact
An instantiated attribute of an object. For example, Created by and Modified by are facts.
Links
Prerequisites
Verify that you perform the following prerequisites before you use the REST APIs:
You can use the following URL format to call the REST APIs: <Type of HTTP method> http://
<eumadminURL>:<port>/access/2/catalog/models/<REST API>. The models directory includes all the REST
APIs exposed for retrieving and updating information related to models. You can replace the models
directory with data directory to call the REST APIs exposed to retrieve information about objects.
For example, to call the REST API GET 2/catalog/models/associationKinds, use the following URL: GET
http://<eumadminURL>:<port>/access/2/catalog/models/associationKinds
You can use any standard HTTP client or use the Java client provided with Enterprise Data Catalog to call the
REST APIs.
You can download the Java client and the source files with the Javadocs from the following locations:
8 Chapter 1: Overview
Chapter 2
9
• Delete custom attributes.
• Update custom attributes.
• Create custom reference attributes.
• Delete custom reference attributes.
• Update custom reference attributes.
URL Parameters
Response Codes
Code Reason
URL Parameters
Code Reason
Attribute Details
attributes/{id}
URL Parameters
Response Codes
Code Reason
URL Parameters
Response Codes
Code Reason
URL Parameters
Code Reason
URL Parameters
Code Reason
List Associations
associations
URL Parameters
Response Codes
Code Reason
List Attributes
attributes
Response Codes
Code Reason
URL Parameters
Response Codes
Code Reason
URL Parameters
Response Codes
Code Reason
URL Parameters
Code Reason
URL Parameters
Code Reason
URL Parameters
Response Codes
Code Reason
URL Parameters
Response Codes
Code Reason
URL Parameters
Attribute Parameters
Response Codes
Code Reason
URL Parameters
Response Codes
Code Reason
URL Parameters
Response Codes
Code Reason
204 No content.
Response Codes
Code Reason
204 No content.
Note: You must index the catalog after you use the API.
Attribute Parameters
Response Codes
Code Reason
Note: You must index the catalog after you use the API.
Attribute Parameters
Response Codes
Code Reason
Object APIs
This chapter includes the following topics:
You can use the Object Information APIs to list the objects, view the details of the objects, and view the
relationships between the objects in the catalog. You can use the Object Modification APIs to update the
custom properties for one or multiple objects in the catalog.
35
Data Objects
objects
The endpoint return the objects in the catalog. An endpoint is an object that has a connection to another
object in a different resource.
URL Parameters
Response Codes
Code Reason
Response Codes
Code Reason
Relationships
relationships
The endpoint returns the relationship between an object and other objects in Enterprise Data Catalog. An
endpoint is an object that has a connection to another object in a different resource.
Response Codes
Code Reason
URL Parameters
(Array[LinkPro
pertyRequest],
optional)
}
LinkPropertyRe
quest {
attributeId
(string):
Attribute id ,
value
(string,
optional):
Property value
}
Response Codes
Code Reason
201 Created.
Attribute Parameters
(Array[LinkPro
pertyRequest],
optional)
}
LinkPropertyRe
quest {
attributeId
(string):
Attribute id ,
value
(string,
optional):
Property value
}
Response Codes
Code Reason
201 Created.
URL Parameters
48
Response Codes
Code Reason
403 User does not have the access permission to view or edit the resource.
URL Parameters
Response Codes
Code Reason
403 User does not have the access permission to view or edit the resource.
Use Cases
This chapter includes the following topics:
51
The commands common for all the sample use cases to import the package, included models, HTTP client,
and the code to initialize the Java client are provided for reference:
// Copyright (c) 2017 Informatica Corporation. All rights reserved.
package com.infa.products.ldm.ingestion.rest.api.samples;
import com.infa.products.ldm.core.rest.v2.client.api.CatalogApi;
import com.infa.products.ldm.core.rest.v2.client.invoker.ApiException;
import com.infa.products.ldm.core.rest.v2.client.invoker.ApiResponse;
import com.infa.products.ldm.core.rest.v2.client.models.AttributePostRequest;
import com.infa.products.ldm.core.rest.v2.client.models.AttributePutRequest;
import com.infa.products.ldm.core.rest.v2.client.models.AttributeResponse;
import com.infa.products.ldm.core.rest.v2.client.models.AttributesRequest;
import com.infa.products.ldm.core.rest.v2.client.models.AttributesResponse;
import com.infa.products.ldm.core.rest.v2.client.models.FactRequest;
import com.infa.products.ldm.core.rest.v2.client.models.Link;
import com.infa.products.ldm.core.rest.v2.client.models.Links;
import com.infa.products.ldm.core.rest.v2.client.models.ModelRefRequest;
import com.infa.products.ldm.core.rest.v2.client.models.ObjectIdRequest;
import com.infa.products.ldm.core.rest.v2.client.models.ObjectResponse;
import com.infa.products.ldm.core.rest.v2.client.models.ObjectsResponse;
import com.infa.products.ldm.core.rest.v2.client.models.RefAttributePost;
import com.infa.products.ldm.core.rest.v2.client.models.RefAttributesPost;
import com.infa.products.ldm.core.rest.v2.client.models.RefAttributesResponse;
import com.infa.products.ldm.core.rest.v2.client.utils.ObjectAdapter;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.squareup.okhttp.CurlLogger;
public class RestSamples {
/**
* Initialize the api client. Must be done once before it can be used.
*
* @param username
* @param password
* @param basePath Base URL of rest api ex. http://localhost:8080/access/2
*/
public RestSamples(String username, String password, String basePath) {
this.api = new CatalogApi();
this.api.getApiClient().setUsername(username);
this.api.getApiClient().setPassword(password);
this.api.getApiClient().setBasePath(basePath);
}
}
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"
// If there are more than 20 results, you can do a loop operation to fetch all
the results
} while (offset < response.getMetadata().getTotalCount().intValue());
}
}
}
Using Curl
curl -X GET --header "Accept: application/json" "http://localhost:13000/2/catalog/
models/attributes?classId=core.DataElement&offset=0&pageSize=20"
do {
response = this.api.catalogDataObjectsGet(
"core.name:*customer* AND core.classType:com.infa.ldm.relational.Table",
null, offset, pageSize, false);
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"
You can use the REST API to retrieve the information in one of the following ways:
}
Using Curl
// Fetch attribute to be updated
curl -X GET --header "Accept: application/json" "http://localhost:13000/2/
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 setContactAndRegion(String contactAttrId, String regionAttrId) {
try {
// Fetch the object you want to update
ApiResponse<ObjectResponse> objApiResponse =
this.api.catalogDataObjectsIdGetWithHttpInfo("resource://obj1");
Fetch the object JSON to has to be updated. Also, read the ETag header returned in the response.
curl -X GET --header "Accept: application/json" --header "Content-Type: application/
json" "http://localhost:13000/2/catalog/data/objects/resource~3a~~2f~~2f~obj1"
From the returned JSON, remove all the read only facts and links. Do not remove any custom facts and
links or they get deleted. Add the updated facts to JSON. Send the JSON along with ETag using curl
command.
}
Using Curl
curl -X POST --header "Accept: application/json" --header "Content-Type: application/
json" -d "{
\"items\": [
{
\"refDataTypeId\": \"com.infa.ldm.isp.UserDatatype\",
\"name\": \"Contact\",
\"description\": \"Person to contact for more information.\",
\"searchable\": false,
\"classes\": [