CMS API : Retrieving child type attributes
In the Contract Approval tutorial we have two types : The Loan Contract type definition model which is a subtype of the Contract type definition model .
When executing the API call GET {{base_url}}/cms/type-definitions/ca_loan_contract/attributes , shouldn't it return the attributes of the loan_contract + attributes of contract as Loan Contract is a subtype of Contract , I can only see the attributes of loan_contract ("monthly_installments" and "yearly_income") in the response
Shouldn't the inherited attributes(the attributes of Type Contract ) be included in the response?
Answers
-
@Med_2024, the GET {{base_url}}/cms/type-definitions/ca_loan_contract/attributes call returns the attributes that are defined by the type definition. I.e.: it provides you with the attributes defined at this specific level (loan contract). If you want the other attributes of the type definition you will have to go up the inheritance tree (do the same call for each individual super type), or use GET {{base_url}}/cms/type-definitions/ca_loan_contract/attributes-all.
Note that this is documented in the API spec (available from https://developer.opentext.com/imservices, and more specifically https://developer.opentext.com/imservices/products/contentmetadataservice/apis/contentmetadata).
Also, if you want the attribute values of a loan contract instance, you need to perform the {{base_url}}/cms/instances/file/ca_loan_contract/<paste loan contract instance id here> call.
0 -
@gvicari , I tested the CMS API
GET {{base_url}}/cms/type-definitions/ca_loan_contract/attributes-all
MS but it returns a long list of system properties with cms_any prefix in addition to ca_loan_contract and ca_contract , maybe add a param to filter the attributes in to enhance this api call .0 -
@Med_2024 you can filter the system ones and internal ones in your code. They have the system and internal attributes set to true:
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 150 General Questions
- 147 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 184 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 7 XM Fax
- Follow Categories