TIBCO® MDM Rest Services GuideSoftware Release 9.0.1October 2016
Two-Second Advantage®
Important Information
SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCHEMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (ORPROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THEEMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANYOTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.
USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS ANDCONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTEDSOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THECLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOADOR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE)OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USERLICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE” FILE(S) OF THESOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, ANDYOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BEBOUND BY THE SAME.
This document contains confidential information that is subject to U.S. and international copyright lawsand treaties. No part of this document may be reproduced in any form without the writtenauthorization of TIBCO Software Inc.
TIBCO and Two-Second Advantage are either registered trademarks or trademarks of TIBCO SoftwareInc. in the United States and/or other countries.
Enterprise Java Beans (EJB), Java Platform Enterprise Edition (Java EE), Java 2 Platform EnterpriseEdition (J2EE), and all Java-based trademarks and logos are trademarks or registered trademarks ofOracle Corporation in the U.S. and other countries.
All other product and company names and marks mentioned in this document are the property of theirrespective owners and are mentioned for identification purposes only.
THIS SOFTWARE MAY BE AVAILABLE ON MULTIPLE OPERATING SYSTEMS. HOWEVER, NOTALL OPERATING SYSTEM PLATFORMS FOR A SPECIFIC SOFTWARE VERSION ARE RELEASEDAT THE SAME TIME. SEE THE README FILE FOR THE AVAILABILITY OF THIS SOFTWAREVERSION ON A SPECIFIC OPERATING SYSTEM PLATFORM.
THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICALERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESECHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCOSOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S)AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.
THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY ORINDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE,INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.
Copyright © 2010-2016 TIBCO Software Inc. All rights reserved.
TIBCO Software Inc. Confidential Information
2
TIBCO® MDM Rest Services Guide
Contents
TIBCO Documentation and Support Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Endpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Resource . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Request Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Password Encryption and Decryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Encrypting the Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Decrypting the Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
REST Services Available in TIBCO MDM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Login Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Example of Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Logout Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Example of Logout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Session Refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
Example of Session Refresh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Get User Profile Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Example of Get User Profile Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Add a New Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Example of Record Add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Modify a Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Example of Record Modify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Delete a Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Example of Record Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Search a Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Supported Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30
Example of Basic Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Example of Related Record Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Add a Related Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Example of Related Record Add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Modify a Related Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Example of Related Record Modify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3
TIBCO® MDM Rest Services Guide
Delete a Related Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Example of Related Record Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Retrieve Records from a Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Example of Retrieving Records of a Repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Retrieve records by ID and IDEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Example of Retrieving Records by Record ID and Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Retrieve Related Records by Parent Record ID and ID Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Example of Retrieving Related Records by Parent Record ID and ID Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54
Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4
TIBCO® MDM Rest Services Guide
TIBCO Documentation and Support Services
Documentation for this and other TIBCO products is available on the TIBCO Documentation site. Thissite is updated more frequently than any documentation that might be included with the product. Toensure that you are accessing the latest available help topics, visit:
https://docs.tibco.com
Product-Specific Documentation
Documentation for TIBCO products is not bundled with the software. Instead, it is available on theTIBCO Documentation site. To directly access the documentation for this product, double-click thefollowing file: TIBCO_HOME/release_notes/TIB_mdm_version_docinfo.html
where TIBCO_HOME is the top-level directory in which TIBCO products are installed. On Windows,the default TIBCO_HOME is C:\tibco. On UNIX systems, the default TIBCO_HOME is /opt/tibco.
The following documents for this product can be found on the TIBCO Documentation site:
● TIBCO MDM Release Notes
● TIBCO MDM Installation and Configuration Guide
● TIBCO MDM User’s Guide
● TIBCO MDM System Administration
● TIBCO MDM Customization Guide
● TIBCO MDM Workflow Reference
● TIBCO MDM Web Services Guide
● JAVA API Reference
● TIBCO MDM Best Practices Guide
● TIBCO MDM Performance Tuning Guide
● TIBCO MDM Rest Services Guide
● Swagger API Reference
How to Contact TIBCO Support
For comments or problems with this manual or the software it addresses, contact TIBCO Support:
● For an overview of TIBCO Support, and information about getting started with TIBCO Support,visit this site:
http://www.tibco.com/services/support
● If you already have a valid maintenance or support contract, visit this site:
https://support.tibco.com
Entry to this site requires a user name and password. If you do not have a user name, you canrequest one.
How to Join TIBCO Community
TIBCO Community is an online destination for TIBCO customers, partners, and resident experts. It is aplace to share and access the collective experience of the TIBCO community. TIBCO Community offersforums, blogs, and access to a variety of resources. To register, go to the following web address:
https://community.tibco.com
5
TIBCO® MDM Rest Services Guide
Overview
REST stands for Representational State Transfer. REST relies on a stateless, client-server, cache-ablecommunications protocol and in virtually all cases, the HTTP protocol is used.
REST is an architecture style for designing network applications. Rather than using complexmechanisms, such as SOAP to connect between machines, simple HTTP is used to make calls betweenmachines.
RESTful applications use the HTTP requests to post data (create and/or update), read data (for example,make queries), and delete data. Thus, REST uses HTTP for all four CRUD (Create/Read/Update/Delete)operations. REST is a lightweight alternative to mechanisms, such as RPC (Remote Procedure Calls)and web services (SOAP, WSDL, and so on). Despite being simple, REST is fully-featured; there isnothing you can do in web services that cannot be done with a RESTful architecture.
MethodsThe various methods of REST services are as follows:
● GET: provides a read only access to a resource.
● PUT: updates an existing resource.
● DELETE: removes a resource.
● POST: creates a new resource.
EndpointThis default URL format for the endpoint is:
<MachineName:port>/eml/rest/
For example, localhost:8080/eml/rest/
ResourceIn any RESTful service, structure your resources by their hierarchy. These resources are specified in thehierarchical part of the URL. All hierarchical parts are required and unique. None of them can beomitted, and all of them can appear only once. Certain parts of the URL are fixed (such as, the servername, port, and endpoint), and certain parts are parametrized. The parametrized parts are oftendenoted in code and documentation by curly braces.
Consider, a web service for a record. The data might be organized into a repository, which containrecords, attributes, and relationships. The resource URL for the web service is as follows: http://localhost:9393/eml/rest/records/{repositoryName}/{id}
Sending a DELETE request to this URL might remove a record from an existing repository, whilesending a GET request to this URL might retrieve the details of a particular record ID.
HeaderREST call headers are the HTTP headers, a required component of the message. The headers define theoperating parameters of the transaction, also called as metadata.
6
TIBCO® MDM Rest Services Guide
Header FieldName Description Example
Authorization Authentication credentials forHTTP authentication.
Basic username:password:EnterpriseName
userName:Password:EnterpriseName shouldbe encoded in the Base64 format in theAuthorization parameter . Forexample,john:john:Company is encoded in theBase64 format as am9objpqb2huOkNvbXBhbnk=You can encrypt the password string for securitypurpose. For details refer Password Encryptionand Decryption
For Weblogic, the header request mustbe sent without the Basic in theAuthorization field. For example,username:password:EnterpriseName
Content-Type The content type shouldcontain a JSON formattedtext.
application/json
apiVersion Specifies the API version to beused.
2.0
ParametersREST parameters specify the variable parts of your resources: the data that you are working with. In aREST request, the resource that you are working with is specified in the URL - Uniform ResourceLocator.
Request BodyIn the request, send the data as a JSON object.
7
TIBCO® MDM Rest Services Guide
Password Encryption and Decryption
The Password input is required in all REST services. You can encrypt any text password using thepasswordEncryptDecryptTool.sh or passwordEncryptDecryptTool.bat tool located in $MQ_HOME/bin.
Prerequisite
Ensure that all environment variables used in TIBCO MDM are set properly before executing the script,such as MQ_HOME, MQ_COMMON_DIR, MQ_CONFIG_FILE, NODE_ID, WAS_HOME, JBOSS_HOME, and so on.
The scripts accept a text string and return an encrypted string value or accept an already encryptedstring value and return a text value. You can generate an encrypted string using the tool and then use itin the REST service request.
Encryption and decryption tool is also supported through a Java API so that it can be embedded.
Usage is as follows:
● For encryption:import com.tibco.mdm.infrastructure.encryption.EncrypterDecryptorUtil;......EncrypterDecryptorUtil cipher = EncrypterDecryptorUtil.getCipher();cipher.encrypt(<pwdStringInPlainText>);
● For decryption:import com.tibco.mdm.infrastructure.encryption.EncrypterDecryptorUtil;......EncrypterDecryptorUtil cipher = EncrypterDecryptorUtil.getCipher();cipger.decrypt(<EncryptedPwdValue>);
Encrypting the Password
Procedure
1. Go to the command prompt; go to the $MQ_HOME/bin folder.
2. Type passwordEncryptDecryptTool.bat "password" and press ENTER. For example, D:\work\venus_dest\bin>passwordEncryptDecryptTool.bat "tibco123"
8
TIBCO® MDM Rest Services Guide
The utility provides information about the accessed property file and loaded properties, and thendisplays the encrypted password. For example, the encrypted password for tibco123 iscfMrxokzKTm3zJJLpDW7Jg==.
Decrypting the PasswordUse the similar encryption procedure to decrypt the password.
Procedure
● Place the encrypted string in the command prompt instead of the text password. For example,$MQ_HOME/bin>passwordEncryptDecryptTool.bat "cfMrxokzKTm3zJJLpDW7Jg==".After entering the encrypted string as an input, the utility returns the original decrypted password.In this case, tibco123.
You must specify the double quotation marks ('') for the text password or an encryptedpassword, else the utility does not perform encryption or decryption.
9
TIBCO® MDM Rest Services Guide
REST Services Available in TIBCO MDM
In TIBCO MDM, REST services are available for the activities listed in the table.
The REST services sample project is available in MQ_HOME\schema\RestService .
REST Services Available in TIBCO MDM
REST ServiceType Service Description
DetailsAvailable
Login Login Use to get the login user information. LoginServices
Logout Use to get the logout information. LogoutServices
Session Refresh Use to get the session refreshinformation.
SessionRefresh
User Info forEnterprise
Use to get the details whether the useris currently logged in or not to theenterprise.
EnterpriseService
Records Add a record Use to add a record. Add aRecord
Modify a record Use to modify a record. Modify aRecord
Delete a record Use to delete a record. Delete aRecord
Search a record Use to search a record. Search aRecord
Add a relatedrecord
Use to add a related record. Add aRelatedRecord
Modify a relatedrecord
Use to modify a related record. Modify aRelatedRecord
Delete a relatedrecord
Use to delete a related record. Delete aRelatedRecord
Retrieve records ofa repository
Use to retrieve records from arepository.
Retrive aRecord froma Repository
10
TIBCO® MDM Rest Services Guide
REST ServiceType Service Description
DetailsAvailable
Retrieve record byID and IDEXT
Use to retrieve a record by theirproduct ID and ID extension.
Retrive aRecord byRecord IDand IDExtension
Retrieve relatedrecords by parentrecord Id and IdExtension
Use to retrieve related records by theirproduct ID and ID extension.
Retrive aRelatedRecord byRecord IDand IDExtension
11
TIBCO® MDM Rest Services Guide
Login
The Login REST service contains the information on how to implement the login related functionality.
The various login related services are as follows:
● Login
● Logout
● Session Refresh
● Get User Profile Service
Login ServiceThe various details of the Login REST services are explained in this section. You must specify theusername, password, and enterprise name as a request JSON body.
HTTP Method
POST
Endpoint URL
See Endpoint.
Resource
/login/userinfo
Request Model
Media Type: application/json.{ "username": "string", "password": "string", "enterprise": "string"}
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "sessionId": "string", "errorCode": "string", "errorMessage": "string", "result": { "severity": "string", "code": "string", "desciption": { "lang": "string", "message": "string" } }}
If the response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
12
TIBCO® MDM Rest Services Guide
● 500 Internal Server Error
For error code response, see Error Handling .
Example of LoginConsider the following example where a username is "14305_1" and password is "xyr62dwUuk4=" isthe enterprise named "Company":
Example - Request
{ "username":"14305_1", "password":"xyr62dwUuk4=", "enterprise":"Company"}
Example - Response
The response returns the message that the login was successfully.{"sessionId": "gHVYMHNScidvq2SPevK8+GRp.undefined","errorCode": "","errorMessage": "","result": {"severity": "Info","code": "SVC-11219","description": {"lang": "English","message": "Login successful." } }}
Logout ServiceThe various details of the Logout REST services are explained in this section. You must set the cookie inheader to logout.
HTTP Method
POST
Endpoint URL
See Endpoint.
Resource
/login/userinfo/logout
Request Model
Media Type: application/json.Cookie: JSESSIONID=MfDshWaTXBoHtCcsoyaRQYOz;
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{
"errorCode": "string", "errorMessage": "string",
13
TIBCO® MDM Rest Services Guide
"result": { "severity": "string", "code": "string", "desciption": { "lang": "string", "message": "string" } }}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of LogoutConsider the following example for logout having cookie"JSESSIONID=MfDshWaTXBoHtCcsoyaRQYOz".
Example - Request
Cookie: JSESSIONID=MfDshWaTXBoHtCcsoyaRQYOz;
Example - Response
The response returns the message that the user logged out successfully.{ "errorCode": "", "errorMessage": "", "result": { "severity": "Info", "code": "SVC-11222", "description": { "lang": "English", "message": "User logged out successfully" } }}
Session RefreshThe various details of the Session Refresh REST services are explained in this section. You must set thecookie in header to refresh session.
HTTP Method
PUT
Endpoint URL
See Endpoint.
Resource
/login/userinfo/sessionrefresh
Request Parameters
You must specify the cookie
14
TIBCO® MDM Rest Services Guide
Name Description Type Data Type
Cookie Specify the cookiename.
string string
Request Model
Media Type: application/json.Cookie: JSESSIONID=No3sfvH6doYk-4VLWBcbyI95;
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "sessionId": "string", "errorCode": "string", "errorMessage": "string", "result": { "severity": "string", "code": "string", "desciption": { "lang": "string", "message": "string" } }}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Session RefreshConsider the following example where the session having cookie"JSESSIONID=MfDshWaTXBoHtCcsoyaRQYOz" is refreshed or not in the repository named"Company".
Example - Request
Cookie: JSESSIONID=MfDshWaTXBoHtCcsoyaRQYOz;
Example - Response
The response returns the message that the session was refreshed successfully.{ "sessionId": "jzuTA1HH13tk+xh4lkGaPkXw.undefined", "errorCode": "", "errorMessage": "", "result": { "severity": "Info", "code": "SVC-11341", "description": { "lang": "English", "message": "Your session refreshed successfully." } }}
15
TIBCO® MDM Rest Services Guide
Get User Profile ServiceThe various details whether the user is currently logged in or not to the enterprise is explained in thissection. You must set the cookie in header to get session details.
HTTP Method
GET
Endpoint URL
See Endpoint.
Resource
/login/userinfo/{enterprise}
Request Parameters
You must specify the enterprise name.
Name Description Type Data Type
Enterprise Specify the enterprisename.
path string
Cookie Specify the cookiename.
Header string
Request Model
Media Type: application/json.Cookie: JSESSIONID=No3sfvH6doYk-4VLWBcbyI95;
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "sessionId": "string", "errorCode": "string", "errorMessage": "string", "result": { "severity": "string", "code": "string", "desciption": { "lang": "string", "message": "string" } }}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling.
16
TIBCO® MDM Rest Services Guide
Example of Get User Profile ServiceConsider the following example where user with cookie"JSESSIONID=MfDshWaTXBoHtCcsoyaRQYOz" is currently logged in or not to the repository named"Company".
Example - Request
Cookie: JSESSIONID=MfDshWaTXBoHtCcsoyaRQYOz;
Example - Response
The response returns the message that the user is a invalid user.{ "sessionId": "v7mgIZn4jTNpotTnneN7oiQ6.undefined", "errorCode": "", "errorMessage": "", "result": { "severity": "Info", "code": "SVC-11344", "desciption": { "lang": "English", "message": "Valid User" } }}
17
TIBCO® MDM Rest Services Guide
Records
This REST services contain all the information regarding the Record operations in TIBCO MDM.
The Record operations are as follows:
● Add a New Record● Modify a Record● Delete a Record● Search a Record● Add a Related Record● Modify a Related Record● Delete a Related Record● Retrieve Records from a Repository● Retrieve Records by ID and EXT● Retrieve Related Records by Parent Record ID and ID Extension
Set the entity command qualifier to any of the following command type:
● Validate/Process: causes the records to be validated before saving. This also initiates New RecordIntroduction Edit (NRIE) workflows. This is the default.
● Validate/NoProcess: validates records and saves them without starting the NRIE workflows.● NoValidate/Process: does not validate records, but saves them, and also starts NRIE workflows.● NoValidate/NoProcess: does not validate records or start the workflow, but saves them.
Example on how to use the Validate and Process Record Add request in JSON.{ "process" : true, "validate": true, "record": { "repositoryName": "ALLRULEA", "productIdExt": "15853", "productId": "15853", "attributes": [ { "name": "ATA_STRING1", "value": "demo" }, { "name": "ATA_INTEGER1", "value": "1" } ] }}
Add a New RecordThe various details of how to add a new record is explained in this section.
HTTP Method
POST
Endpoint URL
See Endpoint.
18
TIBCO® MDM Rest Services Guide
Resource
/records/{repositoryName}
Request Parameters
You must specify the following parameters:
Name Description Type Data Type
repositoryName Specify the repositoryname.
This is Mandatory.
path string
perspectiveName Specify the perspectivename.
query string
Request Model
Media Type: application/json.{ "process":false, "validate":false, "perspectiveName":"string", "record":{ "productId":"string", "productIdExt":"string", "version":"string", "state":"string", "key":0, "attributes":[ { "name":"string", "value":"string", "displayName":"string", "multivalues":[ {
} ], "type":0, "id":0, "multivalue":false } ], "repositoryName":"string", "relationship":{ "relationshipName":[ { "relationshipAttributes":[ { "name":"string", "value":"string", "displayName":"string", "multivalues":[ {
} ], "type":0, "id":0, "multivalue":false } ],
19
TIBCO® MDM Rest Services Guide
"targetRecord":{ "productId":"string", "productIdExt":"string", "version":"string", "state":"string", "key":0, "attributes":[ { "name":"string", "value":"string", "displayName":"string", "multivalues":[ {
} ], "type":0, "id":0, "multivalue":false } ], "repositoryName":"string", "relationships":{
}, "deleted":false } } ] }, "deleted":false }}
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "responseMessages": [ { "code": "string", "message": "string", "type": "string" } ], "records": [ { "repositoryName": "string", "productId": "string", "productIdExt": "string", "productKeyId": "string", "responseAttributes": [ { "attributeName": "string", "attributeDisplayName": "string", "values": [ "string" ], "errorCode": "string", "errorMessage": "string", "errorType": "string" } ], "responseRelationships": [ { "relationshipName": "string", "sourceRepositoryName": "string", "targetRepositoryName": "string", "recordId": "string",
20
TIBCO® MDM Rest Services Guide
"recordIdExt": "string", "productKeyId": "string", "responseAttributes": [ { "attributeName": "string", "attributeDisplayName": "string", "values": [ "string" ], "errorCode": "string", "errorMessage": "string", "errorType": "string" } ] } ] } ], "success": true}
The response is displayed for validation error.
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Record AddConsider the following example where a record with product ID "record1" and address "IL USA" isadded in the repository named "Company":
Example - Request
{ "record": { "repositoryName": "Company", "productIdExt": "record1", "productId": "record1", "attributes": [ { "name": "Name", "value": "TIBCO" }, { "name": "Address", "value": "IL USA" }, { "name": "Street", "multivalues": [ "11th St", "Rockford" ], "multivalue": true }, { "name": "Website", "value": "https://www.google.co.in/" }, { "name": "Rating", "value": "10.10" }, {
21
TIBCO® MDM Rest Services Guide
"name": "CompanySource", "value": "IT SOURCE" }, { "name": "CompanyRating", "value": "9" } ] }}
Example - Response
The response returns the message that the records are added successfully. { "responseMessages": [ { "code": "SVC-11025", "message": "Service 'VALIDATE_PROCESS' executed successfully.", "type": "Info" }], "records": [], "success": true}
Modify a RecordThe various details of how to modify a record is explained in this section.
HTTP Method
PUT
Endpoint URL
See Endpoint.
Resource
/records/{repositoryName}
Request Parameters
Specify the following parameters:
Name Description Type Data Type
repositoryName Specify the repositoryname.
This is Mandatory.
path string
perspectiveName Specify the perspectivename.
query string
workItemId Specify the work itemID.
query string
Request Model
Media Type: application/json.
22
TIBCO® MDM Rest Services Guide
Record to be modified record.productId and record.productIdExt are used to identify the originalrecord. The attributes PRODUCTID and PRODUCTIDEXT values are used to update the records.{ "process":false, "validate":false, "workItemId":"string", "perspectiveName":"string", "record":{ "productId":"string", "productIdExt":"string", "version":"string", "state":"string", "key":0, "attributes":[ { "name":"string", "value":"string", "displayName":"string", "multivalues":[ {
} ], "type":0, "id":0, "multivalue":false } ], "repositoryName":"string", "relationship":{ "relationshipName":[ { "relationshipAttributes":[ { "name":"string", "value":"string", "displayName":"string", "multivalues":[ {
} ], "type":0, "id":0, "multivalue":false } ], "targetRecord":{ "productId":"string", "productIdExt":"string", "version":"string", "state":"string", "key":0, "attributes":[ { "name":"string", "value":"string", "displayName":"string", "multivalues":[ {
} ], "type":0, "id":0, "multivalue":false } ], "repositoryName":"string", "relationships":{
23
TIBCO® MDM Rest Services Guide
}, "deleted":false } } ] }, "deleted":false }}
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "responseMessages": [ { "code": "string", "message": "string", "type": "string" } ], "records": [ { "repositoryName": "string", "productId": "string", "productIdExt": "string", "productKeyId": "string", "responseAttributes": [ { "attributeName": "string", "attributeDisplayName": "string", "values": [ "string" ], "errorCode": "string", "errorMessage": "string", "errorType": "string" } ], "responseRelationships": [ { "relationshipName": "string", "sourceRepositoryName": "string", "targetRepositoryName": "string", "recordId": "string", "recordIdExt": "string", "productKeyId": "string", "responseAttributes": [ { "attributeName": "string", "attributeDisplayName": "string", "values": [ "string" ], "errorCode": "string", "errorMessage": "string", "errorType": "string" } ] } ] } ], "success": true}
The response is displayed for validation error.
24
TIBCO® MDM Rest Services Guide
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Record ModifyConsider the following example where a record with Product ID "record1" and ID Extension "record1"is modified in the repository named "Company":
Example - Request
{ "record": { "repositoryName": "Company", "productIdExt": "record1", "productId": "record1", "attributes": [ { "name": "Name", "value": "TIBCO" }, { "name": "Address", "value": "UK" }, { "name": "Street", "multivalues": [ "11th St", "Rockford" ], "multivalue": true }, { "name": "Website", "value": "https://in.yahoo.com/" }, { "name": "Rating", "value": "10.10" }, { "name": "CompanySource", "value": "IT SOURCE" }, { "name": "CompanyRating", "value": "9" } ] }}
Example - Response
The response returns the message that the record was successfully modified. { "responseMessages": [ { "code": "SVC-11025", "message": "Service 'VALIDATE_PROCESS' executed successfully.", "type": "Info" }], "records": [],
25
TIBCO® MDM Rest Services Guide
"success": true}
Delete a RecordThe various details of how to delete a record is explained in this section.
You cannot delete a record with EffectiveDate attribute and when the record state is Unconfirmed.
HTTP Method
DELETE
Endpoint URL
See Endpoint.
Resource
/records/{repositoryName}/{id}
Request Parameters
Specify the following parameters:
Name Description Type Data Type
repositoryName Specify the repositoryname.
This field isMandatory.
path string
id Specify the record ID.
This field isMandatory.
path string
idExt Specify the record IDextension.
query string
deleteRelRecords Specify whether youwant to delete allrelated records.
query boolean
workItemId Specify the work itemID.
query string
Request Model
Media Type: application/json.
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "responseMessages": [
26
TIBCO® MDM Rest Services Guide
{ "code": "string", "message": "string", "type": "string" } ], "success": true}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Record DeleteConsider the following example: deleting a record having product ID "record1" and ID extension"record1" in the repository named "Company".
Example - Response
The response returns the message that all the records matching the criteria are deleted successfully.{ "responseMessages": [ { "code": "SVC-11032", "message": "SVC-11032 : 'REASON' - Record(s) deleted successfully.", "type": "Info" }], "records": [], "success": true}
Search a RecordThe various details of how to search a record is explained in this section.
HTTP Method
POST
Endpoint URL
See Endpoint.
Resource
/records/{repositoryName}/search
Request Parameters
Specify the following parameters:
Name Description Type Data Type
repositoryName Specify the repositoryname.
This field isMandatory.
path string
27
TIBCO® MDM Rest Services Guide
Name Description Type Data Type
includeSystemAttributes Specify whether youwant to include systemattributes. The defaultvalue is false.
query boolean
findRootRecord Specify whether youwant to find root recordonly. The default valueis false.
query boolean
Request Model
Media Type: application/json.{ "name": "string", "productKey": 0, "attributes": [ { "name": "string", "value": [ {} ], "operator": "string", "caseSensitive": false } ], "relationships": [ { "name": "string", "count": 0, "checkExistence": false, "relationshipAttributes": [ { "name": "string", "value": [ {} ], "operator": "string", "caseSensitive": false } ], "repository": {} } ],}
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "records": [ { "productId": "string", "productIdExt": "string", "productKeyId": "string", "version": "string", "state": "string", "key": 0, "effectiveDate": "string", "attributes": [ {
28
TIBCO® MDM Rest Services Guide
"name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "groupName": "string", "associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "repositoryName": "string", "relationships": { "": [ { "relationshipAttributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "groupName": "string", "associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "targetRecord": { "productId": "string", "productIdExt": "string", "productKeyId": "string", "version": "string", "state": "string", "key": 0, "effectiveDate": "string", "attributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "groupName": "string", "associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "repositoryName": "string", "relationships": { "": [ { "relationshipAttributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0,
29
TIBCO® MDM Rest Services Guide
"groupName": "string", "associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "targetRecord": {} } ] }, "deleted": false } } ] }, "deleted": false } ], "totalCount": 0}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Supported OperatorsThe following is a list of supported operators:
Search a Record - Supported Operators
Operator Description Data Types
eq Equals ALL
ne Not equals ALL
in In
Note: Use comma as valueseparator and doublequotes as text qualifier incase the value itselfcontains comma.
ALL except Boolean
ni Not In
Use in record query webservices to excludemultiple values in yoursearch filter. For example,if you want to retrieve allthe records withPRODUCTIDEXT not in 2 and3.
String, Number, and Date
lk Like String, File
30
TIBCO® MDM Rest Services Guide
Operator Description Data Types
nl Not Like String, File
sw Starts With String, File
ew Ends With String, File
sl Sounds like String, File
gt Greater than Number, Date, and Timestamp
ge Greater than equals Number, Date, and Timestamp
lt Less than Number, Date, and Timestamp
le Less than equals Number, Date, and Timestamp
bw Between Number, Date, and Timestamp
For the string type attributes, additionally, you can check for case sensitivity using caseSensitive. Itspecifies whether a case sensitive query is to be done. The default is false.
Example of Basic SearchConsider the following example: searching for a record where address is Illinois in the repositorynamed "Company".
Example - Request
{ "name": "Company", "productKey": -1, "attributes": [ { "name": "Address", "value": [ "IL USA" ], "operator": "eq", "caseSensitive": false } ]}
Example - Response
The response returns all the records matching the search criteria. In following response example, city isequal to "IL USA". {"records":{ ... ...{ "name": "Address", "value": "IL USA", "displayName": "Address", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null,
31
TIBCO® MDM Rest Services Guide
"multivalue": false }, ... ...}
Example of Related Record SearchConsider the following example: searching for a related record where street name is "Rockford",customer type is not equal to "NonIT", and customer's date of birth is greater than "03/10/1985" in the"Company" and "Customer" repositories.
Example - Request
{ "name": "Company", "productKey": -1, "attributes": [ { "name": "Street", "value": [ "Rockford" ], "operator": "eq", "caseSensitive": false } ], "relationships": [ { "name": "companycustomer", "count": 1, "checkExistence": true, "relationshipAttributes": [ { "name": "RCustomerType", "value": [ "NONIT" ], "operator": "ne", "caseSensitive": false } ], "repository": { "name": "Customer", "attributes": [ { "name": "DOB", "value": [ "03/10/1985" ], "operator": "gt", "caseSensitive": false } ] } } ]}
Example - Response
The response returns all the records matching the search criteria. In the following response example,street name is "Rockford", customer type is "IT", and customer's date of birth is greater than"03/10/1985".{ "records": [ { "productId": "REC1", "productIdExt": "REC1", "productKeyId": "21538",
32
TIBCO® MDM Rest Services Guide
"version": "1", "state": "CONFIRMED", "key": 21538, "effectiveDate": null, "attributes": [ ... ... { "name": "Street", "value": null, "displayName": "Street", "multivalues": [ "11th St", "Rockford" ], "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": true } ... ... ], "repositoryName": "COMPANY", "classificationSchemeDetails": null, "relationships": {"companycustomer": [ { "relationshipAttributes": [ ... ... { "name": "RCustomerType", "value": "IT", "displayName": null, "multivalues": null, "type": 4, "id": 0, "groupName": null, "associationName": null, "auxiliaryContent": null, "multivalue": false } ... ... ], "targetRecord": { "productId": "REC2", "productIdExt": "REC2", "productKeyId": "21539", "version": "1", "state": "CONFIRMED", "key": 21539, "effectiveDate": null, "attributes": [ ... ... { "name": "DOB", "value": "03/10/1986", "displayName": "DOB", "multivalues": null, "type": 1, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, ... ...
33
TIBCO® MDM Rest Services Guide
}], "totalCount": 1}
Add a Related RecordThe various details of how to add a related record is explained in this section. You cannot add a reverserelationship. Also, perspective for child record attribute is not supported.
HTTP Method
POST
Endpoint URL
See Endpoint.
Resource
records/{parentRepositoryName}/relRecord
Request Parameters
Specify either of the following parameters:
Name Description Type Data Type
repositoryName Specify the repositoryname.
This field isMandatory.
path string
workItemId Specify the work itemID.
query string
Request Model
Media Type: application/json.{ "process": false, "validate": false, "workItemId": "string", "perspectiveName": "string", "record": { "productId": "string", "productIdExt": "string", "productKeyId": "string", "version": "string", "state": "string", "key": 0, "attributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "multivalue": false }
34
TIBCO® MDM Rest Services Guide
], "repositoryName": "string", "relationships": { "relationshipAttributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "multivalue": false } ], "targetRecord": {} }, "deleted": false }}
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "responseMessages": [ { "code": "string", "message": "string", "type": "string" } ], "records": [ { "repositoryName": "string", "productId": "string", "productIdExt": "string", "productKeyId": "string", "responseAttributes": [ { "attributeName": "string", "attributeDisplayName": "string", "values": [ "string" ], "errorCode": "string", "errorMessage": "string", "errorType": "string" } ], "responseRelationships": [ { "relationshipName": "string", "sourceRepositoryName": "string", "targetRepositoryName": "string", "recordId": "string", "recordIdExt": "string", "productKeyId": "string", "responseAttributes": [ { "attributeName": "string", "attributeDisplayName": "string", "values": [ "string" ], "errorCode": "string", "errorMessage": "string", "errorType": "string"
35
TIBCO® MDM Rest Services Guide
} ] } ] } ], "success": true}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Related Record AddConsider the following example: adding a related record where street name is "Rockford", customertype is "IT", company type is "IT PVT", and the date of birth is "03/10/1986" in the "Company" and"Customer" repositories.
Example - Request
{ "record": { "repositoryName": "Company", "productId": "REC1", "productIdExt": "REC1", "attributes": [ { "name": "Name", "value": "TIBCO" }, { "name": "Address", "value": "IL USA" }, { "name": "Street", "multivalues": [ "11th St", "Rockford" ], "multivalue": true }, { "name": "Website", "value": "https://www.google.co.in/" }, { "name": "Rating", "value": "10.10" }, { "name": "CompanySource", "value": "IT SOURCE" }, { "name": "CompanyRating", "value": "9" } ], "relationships": { "companycustomer": [ { "relationshipAttributes": [ {
36
TIBCO® MDM Rest Services Guide
"name": "RCustomerType", "value": "IT" }, { "name": "RCompanyType", "value": "IT PVT" } ], "targetRecord": { "repositoryName": "Customer", "productId": "REC2", "productIdExt": "REC2", "attributes": [ { "name": "CustName", "value": "daniel reichard" }, { "name": "CustAddress", "value": "UK" }, { "name": "DOB", "value": "03/10/1986" }, { "name": "Salary", "value": "45000" }, { "name": "Gender", "value": "M" }, { "name": "CustRating", "value": "7" } ], "relationships": { }, "deleted": false } } ] }, "deleted": false }}
Example - Response
The response returns the message that the records are added successfully.{ "responseMessages": [ { "code": "SVC-11025", "message": "Service 'VALIDATE_PROCESS' executed successfully.", "type": "Info" }], "records": [], "success": true}
37
TIBCO® MDM Rest Services Guide
Modify a Related RecordThe various details of how to modify a related record is explained in this section. You cannot modify areverse relationship. Also, perspective for child record attribute is not supported.
HTTP Method
PUT
Endpoint URL
See Endpoint.
Resource
records/{parentRepositoryName}/relRecord
Request Parameters
Specify either of the following parameter:
Name Description Type Data Type
repositoryName Specify the repositoryname.
This field isMandatory.
path string
workItemId Specify the work itemID.
query string
Request Model
Media Type: application/json.{ "process": false, "validate": false, "workItemId": "string", "perspectiveName": "string", "record": { "productId": "string", "productIdExt": "string", "productKeyId": "string", "version": "string", "state": "string", "key": 0, "attributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "multivalue": false } ], "repositoryName": "string", "relationships": {
38
TIBCO® MDM Rest Services Guide
"relationshipAttributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "multivalue": false } ], "targetRecord": {} }, "deleted": false }}
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "responseMessages": [ { "code": "string", "message": "string", "type": "string" } ], "records": [ { "repositoryName": "string", "productId": "string", "productIdExt": "string", "productKeyId": "string", "responseAttributes": [ { "attributeName": "string", "attributeDisplayName": "string", "values": [ "string" ], "errorCode": "string", "errorMessage": "string", "errorType": "string" } ], "responseRelationships": [ { "relationshipName": "string", "sourceRepositoryName": "string", "targetRepositoryName": "string", "recordId": "string", "recordIdExt": "string", "productKeyId": "string", "responseAttributes": [ { "attributeName": "string", "attributeDisplayName": "string", "values": [ "string" ], "errorCode": "string", "errorMessage": "string", "errorType": "string" } ] }
39
TIBCO® MDM Rest Services Guide
] } ], "success": true}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Related Record ModifyConsider the following example: modifying a record with relationship to customer type "Non IT" in therepository named "Company".
Example - Request
{ "record": { "repositoryName": "Company", "productId": "REC1", "productIdExt": "REC1", "attributes": [ { "name": "Name", "value": "TIBCO" }, { "name": "Address", "value": "NL" }, { "name": "Street", "multivalues": [ "11th St", "Rockford" ], "multivalue": true }, { "name": "Website", "value": "https://www.google.co.in/" }, { "name": "Rating", "value": "10.10" }, { "name": "CompanySource", "value": "IT SOURCE" }, { "name": "CompanyRating", "value": "9" } ], "relationships": { "companycustomer": [ { "relationshipAttributes": [ { "name": "RCustomerType", "value": "NONIT" }, { "name": "RCompanyType",
40
TIBCO® MDM Rest Services Guide
"value": "IT PVT" } ], "targetRecord": { "repositoryName": "Customer", "productId": "REC2", "productIdExt": "REC2", "attributes": [ { "name": "CustName", "value": "John reichard" }, { "name": "CustAddress", "value": "UK" }, { "name": "DOB", "value": "03/10/1986" }, { "name": "Salary", "value": "45000" }, { "name": "Gender", "value": "M" }, { "name": "CustRating", "value": "7" } ], "relationships": { }, "deleted": false } } ] }, "deleted": false }}
Example - Response
The response returns all the records matching the search criteria.{ "responseMessages": [ { "code": "SVC-11025", "message": "Service 'VALIDATE_PROCESS' executed successfully.", "type": "Info" }], "records": [], "success": true}
Delete a Related RecordThe various details of how to delete a related record is explained in this section.
HTTP Method
DELETE
Endpoint URL
See Endpoint.
41
TIBCO® MDM Rest Services Guide
Resource
DELETE/records/{parentRepositoryName}/relRecord
Request Parameters
Specify either of the following parameter:
Name Description Type Data Type
parentRepositoryName Specify the parentrepository name.
This field isMandatory.
path string
parentId Specify the parentrecord ID.
This field isMandatory.
query string
parentIdExt Specify the parentrecord ID extension.
query string
relationshipName Specify the relationshipname.
This field isMandatory.
query string
targetRepositoryName Specify the targetrepository name.
This field isMandatory.
query string
id Specify the record ID.
This field isMandatory.
query string
idExt Specify the record IDextension.
query string
deleteRelRecords Specify whether youwant to delete allrelated records.
query boolean
Request Model
Media Type: application/json.
42
TIBCO® MDM Rest Services Guide
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "responseMessages": [ { "code": "string", "message": "string", "type": "string" } ] }
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Related Record DeleteConsider the following example: deleting a record where the product ID is "REC1" from repositoryname "Company" having relationship with product ID "REC2" from repository named "Customer".
Example - Response - Related Record Delete
The response returns the message that the record is successfully deleted.{ "responseMessages": [ { "code": "SVC-11032", "message": "SVC-11032 : 'REASON' - Record(s) deleted successfully.", "type": "Info" }], "records": [], "success": true}
Retrieve Records from a RepositoryThe various details of how to retrieve records from a repository are explained in this section. Only rootlevel records are retrieved. Classification, GroupName, AssociationName, AuxiliaryContent, andEffectiveDate are not supported.
HTTP Method
GET
Endpoint URL
See Endpoint.
Resource
GET/records/{repositoryName}
Request Parameters
Specify the following parameters:
43
TIBCO® MDM Rest Services Guide
Name Description Type Data Type
repositoryName Specify the repositoryname. This field iscase-insensitive. Thisfield is Mandatory.
path string
startIndex Specify the startingindex of the startrecord. This is used forpagination. Thedefault value is 1.
query integer (int32)
recordCount Specify the number ofrecords to be retrieved.This is used forpagination.
query integer (int32)
includeSystemAttributes
Specify whether youwant to include systemattributes. The defaultvalue is false.
query boolean
sortBy Specify the columnname on which youwant to Sort. TheSortBy works with theascending field.
query string
ascending Specify whether youwant to sort byascending ordescending order. Theascending field workswith the sortBy field.The default value istrue.
query boolean
recordState Specify the recordstate. The availableoptions areCONFIRMED,UNCONFIRMED,DELETED,and LATEST. Thedefault value isCONFIRMED.
query string
Request Model
Media Type: application/json.Endpoint:http://localhost:8080Resource:/eml/rest/records/Company
44
TIBCO® MDM Rest Services Guide
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "records": [ { "productId": "string", "productIdExt": "string", "productKeyId": "string", "version": "string", "state": "string", "key": 0, "effectiveDate": "string", "attributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "groupName": "string", "associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "repositoryName": "string", "classificationSchemeDetails": [ { "csName": "string", "classCode": "string", "schemeAction": "string", "classificationCodes": [ "string" ] } ], "relationships": { "relationshipAttributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "groupName": "string", "associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "targetRecord": {} }, "deleted": false } ], "totalCount": 0}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
45
TIBCO® MDM Rest Services Guide
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Retrieving Records of a RepositoryConsider the following example: retrieving records of a repository named "Company".
Example - Request
Endpoint:http://localhost:8080Resource:/eml/rest/records/Company
Example - Response
The response returns all the records matching the criteria.{ "records": [ { "productId": "REC1", "productIdExt": "REC1", "productKeyId": "13401", "version": "1", "state": "CONFIRMED", "key": 13401, "effectiveDate": null, "attributes": [ { "name": "PRODUCTID", "value": "REC1", "displayName": "Record ID", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "PRODUCTIDEXT", "value": "REC1", "displayName": "Record ID Extension", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "Name", "value": "TIBCO", "displayName": "Name", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false } ], "repositoryName": "COMPANY", "classificationSchemeDetails": null,
46
TIBCO® MDM Rest Services Guide
"relationships": {}, "deleted": false }, { "productId": "REC1_1", "productIdExt": "REC1_1", "productKeyId": "13403", "version": "1", "state": "CONFIRMED", "key": 13403, "effectiveDate": null, "attributes": [ { "name": "PRODUCTID", "value": "REC1_1", "displayName": "Record ID", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "PRODUCTIDEXT", "value": "REC1_1", "displayName": "Record ID Extension", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "Name", "value": "TIBCO", "displayName": "Name", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "Address", "value": "NL", "displayName": "Address", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false } ], "repositoryName": "COMPANY", "classificationSchemeDetails": null, "relationships": {}, "deleted": false } ], "totalCount": 2}
47
TIBCO® MDM Rest Services Guide
Retrieve records by ID and IDEXTThe various details of how to retrieve root records by Record ID and ID extension. Classification is notsupported.
HTTP Method
GET
Endpoint URL
See Endpoint.
Resource
GET/records/{repositoryName}/{id}
Request Parameters
Specify the following parameters:
Name Description Type Data Type
repositoryName Specify the repositoryname. This is not casesensitive. This field isMandatory.
path string
id Specify the record ID.This field isMandatory.
path string
idExt Specify the record IDextension.
path string
workItemId Specify the work itemID.
query string
includeSystemAttributes
Specify whether youwant to include systemattributes. The defaultvalue is false.
query boolean
findRootRecord Specify whether youwant to find rootrecords only. Thedefault value is false.
query boolean
recordState Specify the recordstate. The availableoptions are:CONFIRMED,UNCONFIRMED,DELETED, andLATEST. The defaultvalue is CONFIRMED.
query string
48
TIBCO® MDM Rest Services Guide
Name Description Type Data Type
relationshipDepth Specify therelationship depth.The defaultrelationship depthlevel is 2.
query integer (int32)
Request Model
Media Type: application/json.
Endpoint:http://localhost:8080Resource:/eml/rest/records/Company/REC1_1
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "productId": "string", "productIdExt": "string", "productKeyId": "string", "version": "string", "state": "string", "key": 0, "effectiveDate": "string", "attributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "groupName": "string", "associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "repositoryName": "string", "classificationSchemeDetails": [ { "csName": "string", "classCode": "string", "schemeAction": "string", "classificationCodes": [ "string" ] } ], "relationships": { "relationshipAttributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "groupName": "string",
49
TIBCO® MDM Rest Services Guide
"associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "targetRecord": {} }, "deleted": false}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Retrieving Records by Record ID and ExtensionConsider the following example: retrieving records by record ID and extensions where record ID is"REC1_1 and extension is "REC1_1 in the repository named "Company".
Example - Request
Endpoint:http://localhost:8080Resource:/eml/rest/records/Company/REC1_1
Example - Response
The response returns all the records matching the criteria.{ "productId": "REC1_1", "productIdExt": "REC1_1", "productKeyId": "13403", "version": "1", "state": "CONFIRMED", "key": 13403, "effectiveDate": null, "attributes": [ { "name": "PRODUCTID", "value": "REC1_1", "displayName": "Record ID", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "PRODUCTIDEXT", "value": "REC1_1", "displayName": "Record ID Extension", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "Name", "value": "TIBCO", "displayName": "Name", "multivalues": null,
50
TIBCO® MDM Rest Services Guide
"type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false } ], "repositoryName": "COMPANY", "classificationSchemeDetails": null, "relationships": { "companycustomer": [ { "relationshipAttributes": [ { "name": "RCustomerType", "value": "NONIT", "displayName": null, "multivalues": null, "type": 4, "id": 0, "groupName": null, "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "RCompanyType", "value": "IT PVT", "displayName": null, "multivalues": null, "type": 4, "id": 0, "groupName": null, "associationName": null, "auxiliaryContent": null, "multivalue": false } ], "targetRecord": { "productId": "REC2_2", "productIdExt": "REC2_2", "productKeyId": "13404", "version": "1", "state": "CONFIRMED", "key": 13404, "effectiveDate": null, "attributes": [ { "name": "PRODUCTID", "value": "REC2_2", "displayName": "Record ID", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "PRODUCTIDEXT", "value": "REC2_2", "displayName": "Record ID Extension", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false },
51
TIBCO® MDM Rest Services Guide
{ "name": "CustName", "value": "John reichard", "displayName": "CustName", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false } ], "repositoryName": "CUSTOMER", "classificationSchemeDetails": null, "relationships": { }, "deleted": false } } ] }, "deleted": false}
Retrieve Related Records by Parent Record ID and ID ExtensionThe various details of how to retrieve related records by parent record ID and ID extension areexplained in this section.
HTTP Method
GET
Endpoint URL
See Endpoint.
Resource
GET/records/{repositoryName}/{id}/relatedrecords/{relationshipName}
Request Parameters
Specify the following parameters:
Name Description Type Data Type
repositoryName Specify the repositoryname. This field is notcase sensitive. Thisfield is Mandatory.
path string
relationshipName Specify therelationship name.This field is casesensitive. This field isMandatory.
path string
52
TIBCO® MDM Rest Services Guide
Name Description Type Data Type
id Specify the parentrecord ID. This field isMandatory.
path string
idExt Specify the parentrecord ID extension.
query string
sortBy Specify if you want tosort by column names.This field works alongwith ascending orderfield.
query string
ascending Specify if you want tosort by ascending ordescending order. Thisfield works along withthe sortBy column.
query boolean
perspectiveName Specify the perspectivename.
query string
includeSystemAttributes
Specify if you want toinclude systemattributes. The defaultvalue is false.
query boolean
Request Model
Media Type: application/json.Endpoint:http://localhost:8080Resource:/eml/rest/records/Company/REC1_1/relatedrecords/companycustomer
Response Model
The server sends response 200 OK with HTTP status code for each successfully completed request. Thesuccess response format is as follows:{ "relationshipRecords": [ { "relationshipAttributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "groupName": "string", "associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "targetRecord": {
53
TIBCO® MDM Rest Services Guide
"productId": "string", "productIdExt": "string", "productKeyId": "string", "version": "string", "state": "string", "key": 0, "effectiveDate": "string", "attributes": [ { "name": "string", "value": "string", "displayName": "string", "multivalues": [ {} ], "type": 0, "id": 0, "groupName": "string", "associationName": "string", "auxiliaryContent": {}, "multivalue": false } ], "repositoryName": "string", "classificationSchemeDetails": [ { "csName": "string", "classCode": "string", "schemeAction": "string", "classificationCodes": [ "string" ] } ], "relationships": {}, "deleted": false } } ], "totalCount": 0}
If response is unsuccessful, either of the following error code is displayed:
● 400 Bad Request
● 404 Not Found
● 500 Internal Server Error
For error code response, see Error Handling .
Example of Retrieving Related Records by Parent Record ID and ID ExtensionConsider the following example: retrieving records with relationship by record ID and extensionswhere record ID is "REC1_1 and extension is "REC1_1 in the repository named "Company".
Example - Request
Endpoint:http://localhost:8080Resource:/eml/rest/records/Company/REC1_1/relatedrecords/companycustomer
Example - Response
The response returns all the records matching the criteria.{ "relationshipRecords": [ { "relationshipAttributes": [ { "name": "RCustomerType",
54
TIBCO® MDM Rest Services Guide
"value": "NONIT", "displayName": null, "multivalues": null, "type": 4, "id": 0, "groupName": null, "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "RCompanyType", "value": "IT PVT", "displayName": null, "multivalues": null, "type": 4, "id": 0, "groupName": null, "associationName": null, "auxiliaryContent": null, "multivalue": false } ], "targetRecord": { "productId": "REC2_2", "productIdExt": "REC2_2", "productKeyId": "13404", "version": "1", "state": "CONFIRMED", "key": 13404, "effectiveDate": null, "attributes": [ { "name": "PRODUCTID", "value": "REC2_2", "displayName": "Record ID", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "PRODUCTIDEXT", "value": "REC2_2", "displayName": "Record ID Extension", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false }, { "name": "CustName", "value": "John reichard", "displayName": "CustName", "multivalues": null, "type": 4, "id": 0, "groupName": "Unassigned", "associationName": null, "auxiliaryContent": null, "multivalue": false } ], "repositoryName": "CUSTOMER", "classificationSchemeDetails": null, "relationships": {
55
TIBCO® MDM Rest Services Guide
}, "deleted": false } } ], "totalCount": 1}
56
TIBCO® MDM Rest Services Guide
Error Handling
The errors are returned using standard HTTP error code syntax.
HTTP Error Code Description Error Response
400 Bad Request Invalid Request { "errorCode": "string", "errorType": "string", "errorMessage": "string", "errorDetails": "string"}
404 Not Found Resource Not Found { "errorCode": "string", "errorType": "string", "errorMessage": "string", "errorDetails": "string"}
500 Internal Server Error Internal Server Erroroccurred
{ "errorCode": "string", "errorType": "string", "errorMessage": "string", "errorDetails": "string"}
57
TIBCO® MDM Rest Services Guide