Hi,
Im working on creating a C#.Net application which integrates RAM with TFS using REST API. In RAM when user submits an asset, some of the attributes change according to the community and asset type selected. I want to replicate the same functionality in my code. I want to know the query to be used in RESTClient to get list of attributes name, type(string, int, date etc) and default value if any. Please refer to the link below to understand using REST API for RAM.
http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m0/index.jsp?topic=%2Fcom.ibm.ram.doc%2Ftopics%2Ft_using_api.html
If we do a get operation on the query http://inblr-3dvesrvqa:13080/ram/internal/communities/{Community GUID}/types on the REST Client, the response would be as below:
<atom:feed xml:base="http://inblr-3dvesrvqa:13080/ram/">
<atom:generator>RAM 7.x:(inblr-3dvesrvqa)</atom:generator>
<atom:id>
RAM 7.x [http://inblr-3dvesrvqa:13080/ram/internal/communities/1040/types] - 7/18/12 11:51 AM
</atom:id>
|
<atom:title>Asset Types</atom:title>
<atom:updated>2012-07-18T11:51:58.199+05:30</atom:updated>
<atom:entry xml:base="http://inblr-3dvesrvqa:13080/ram/">
<atom:id>classif/assetTypesSchema.xmi#code_component</atom:id>
<atom:summary>
Source code files written in any programming language
</atom:summary>
|
<atom:title>Code Component</atom:title>
<atom:updated/>
<atom:content xml:base="http://inblr-3dvesrvqa:13080/ram/" type="application/xml">
<ram:assetType xml:base="com.ibm.ram.internal.rest.RestContext@1d5e1d5e" href= "internal/types/classif/assetTypesSchema.xmi%23code_component" identifier="classif/assetTypesSchema.xmi#code_component" dbid="1016">
<name>Code Component</name>
<description>
Source code files written in any programming language
</description>
|
<ram:communityAssetType rdf:resource="internal/types/classif/assetTypesSchema.xmi%23code_component/communities/1040">BPAM Reasearch</ram:communityAssetType>
<ram:configuration>
<?xml version="1.0" encoding="UTF-8"?> <com.ibm.ram.common.emf:AssetTypeConfiguration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:com.ibm.ram.common.emf="http:///com/ibm/ram/common/emf.ecore"> <constraints xsi:type="com.ibm.ram.common.emf:Attribute751Grouping"> <column1 xsi:type="com.ibm.ram.common.emf:AttributeConstraint" attributeName="classif/assetTypesSchema.xmi#com.ram.owners" required="true"/> <column1 xsi:type="com.ibm.ram.common.emf:AttributeConstraint" attributeName="classif/assetTypesSchema.xmi#com.ram.community" required="true"/> <column1 xsi:type="com.ibm.ram.common.emf:AttributeConstraint" attributeName="classif/assetTypesSchema.xmi#com.ram.type" required="true"/> <column1 xsi:type="com.ibm.ram.common.emf:AttributeConstraint" attributeName="classif/assetTypesSchema.xmi#com.ram.guid" required="true"/> <column1 xsi:type="com.ibm.ram.common.emf:AttributeConstraint" attributeName="classif/assetTypesSchema.xmi#asset_developer" required="true"/> <column1 xsi:type="com.ibm.ram.common.emf:AttributeConstraint" attributeName="classif/assetTypesSchema.xmi#development_context" required="true"/> <column1 xsi:type="com.ibm.ram.common.emf:AttributeConstraint" attributeName="classif/assetTypesSchema.xmi#document_list" required="true"/> <column1 xsi:type="com.ibm.ram.common.emf:AttributeConstraint" attributeName="classif/assetTypesSchema.xmi#effort_saving_index" required="true"/> <column1 xsi:type="com.ibm.ram.common.emf:AttributeConstraint" attributeName="classif/assetTypesSchema.xmi#execution_context" required="true"/> </constraints> <constraints xsi:type="com.ibm.ram.common.emf:CategoryGrouping"> <classificationSchemaURIs>classif/soamodel.xmi</classificationSchemaURIs> <classificationSchemaURIs>classif/testing.xmi</classificationSchemaURIs> </constraints> </com.ibm.ram.common.emf:AssetTypeConfiguration>
</ram:configuration>
|
<ram:restricted>true</ram:restricted>
<ram:private>false</ram:private>
</ram:assetType>
|
</atom:content>
|
</atom:entry>
|
<atom:entry xml:base="http://inblr-3dvesrvqa:13080/ram/">
<atom:id>classif/assetTypesSchema.xmi#test_asset_type</atom:id>
<atom:summary>
This is a private asset type created by community "BPAM Reasearch."
</atom:summary>
|
<atom:title>Test Asset type</atom:title>
<atom:updated/>
<atom:content xml:base="http://inblr-3dvesrvqa:13080/ram/" type="application/xml">
<ram:assetType xml:base="com.ibm.ram.internal.rest.RestContext@1d5e1d5e" href= "internal/types/classif/assetTypesSchema.xmi%23test_asset_type" identifier="classif/assetTypesSchema.xmi#test_asset_type" dbid="1035">
<name>Test Asset type</name>
<description>
This is a private asset type created by community "BPAM Reasearch."
</description>
|
<ram:communityAssetType rdf:resource="internal/types/classif/assetTypesSchema.xmi%23test_asset_type/communities/1040">BPAM Reasearch</ram:communityAssetType>
<ram:restricted>true</ram:restricted>
<ram:private>true</ram:private>
</ram:assetType>
|
</atom:content>
|
</atom:entry>
|
<atom:entry xml:base="http://inblr-3dvesrvqa:13080/ram/">
<atom:id>classif/assetTypesSchema.xmi#tfs_artefact</atom:id>
<atom:summary>
This is a private asset type created by community "BPAM Reasearch."
</atom:summary>
|
<atom:title>TFS Artefact</atom:title>
<atom:updated/>
<atom:content xml:base="http://inblr-3dvesrvqa:13080/ram/" type="application/xml">
<ram:assetType xml:base="com.ibm.ram.internal.rest.RestContext@1d5e1d5e" href= "internal/types/classif/assetTypesSchema.xmi%23tfs_artefact" identifier="classif/assetTypesSchema.xmi#tfs_artefact" dbid="1033">
<name>TFS Artefact</name>
<description>
This is a private asset type created by community "BPAM Reasearch."
</description>
|
<ram:communityAssetType rdf:resource="internal/types/classif/assetTypesSchema.xmi%23tfs_artefact/communities/1040">BPAM Reasearch</ram:communityAssetType>
<ram:restricted>true</ram:restricted>
<ram:private>true</ram:private>
</ram:assetType>
|
</atom:content>
|
</atom:entry>
|
</atom:feed>
I will parse through similar responses and get the details I needed like community names etc.
The above response has the attributename tag under ram:configuration. But, it is not having correct attribute name, attribute type etc. I want to know what query i can pass through RESTClient and do an GET operation so that i will get a response which has all the asset attribute information needed.
The headers added in the RESTClient for the above operation are:
Oslc-Core-Version : 2.0
Accept:application/rdf+xml
OSLC-Asset-Version: 2.0
The authentication used is basic authentication.
Refer the links below to understand this further:
http://publib.boulder.ibm.com/infocenter/ramhelp/v7r2m0/index.jsp?topic=/com.ibm.ram.doc/topics/t_upload.html
http://publib.boulder.ibm.com/infocenter/ramhelp/v7r5m1/index.jsp?topic=%2Fcom.ibm.ram.doc%2Ftopics%2Fc_rest_api.html
https://jazz.net/wiki/bin/view/Main/RamRestApiMain
Regards,
Kiran