It's all about the answers!

Ask a question

How to Create/Define SCM Custom Attributes in a Project Area via API

Marko Tomljenovic (31643107) | asked Aug 25 '15, 4:15 a.m.
edited Sep 04 '18, 11:58 a.m. by David Lafreniere (4.8k7)


custom attributes on scm artefacts have been introduced.
Here I can see that the attributes can be defined using the Web UI.

Is there any other official or unofficial (resp. unsupported) way of defining the attributes?
API, ...?

Thank you

Geoffrey Clemm commented Aug 25 '15, 9:34 a.m.

There are always internal Java API methods for RTC SCM operations, but it is preferable to have RTC scm command line (external) methods for anything that you would want to script, so I would suggest submitting an enhancement request for the RTC scm command line for this.   If you don't get an answer here in a reasonable timeframe about the internal API to use, send me email, and I'll ping the SCM team.

Accepted answer

permanent link
David Lafreniere (4.8k7) | answered Sep 04 '18, 11:55 a.m.
edited Sep 04 '18, 11:56 a.m.
There is no API available to create/define a new custom attribute in a project area. This has to be done manually by the Project Administrator using the Web-UI. As Geoffrey already mentioned, please submit an RFE or enhancement for this request of API.

Note: there is however API to 'add' a pre-defined custom attribute, along with it's value, to files/components/baselines/streams (along with API to modify the value, or remove the custom attribute).
See the following article from Ralph that shows how some of the API works:

In RTC 6.0.6 API was added to return the list of available custom attributes in a project area (given an SCM item type). See IScmService.getDefinedCustomAttributeIdentifiers(...).

Marko Tomljenovic selected this answer as the correct answer

Your answer

Register or to post your answer.