It's all about the answers!

Ask a question

how to know which prefix to use against fieldnames while accessing Rest API for IBM RTC

Ashish Singh (1122) | asked Feb 07 '17, 1:36 a.m.

While creating a new workitem or accessing the existing workitem, how to decide which prefix to use along with fieldsname, because each request has its own prefix response(mostly fix like OSLC,RDF etc.), are they subject to change in future.
For e.g. when I get the rest response of a workitem
list of prefixes

 "prefixes": {
    "process": "",
    "acp": "",
    "oslc_cmx": "",
    "rtc_cm": "",
    "oslc_pl": "",
    "oslc_cm": "",
    "oslc": "",
    "rdf": "",
    "acc": "",
    "dcterms": "",
    "rtc_ext": ""

so how to decide which prefix to use for accessing fields say for eg. title will come as dcterms:title and any custom field of RTC will come as rtc_ext,
one way is to use the URL of prefix and decide, but what will happen if the URL also changes.

let me know if there is a better/robust way of achieving this.

One answer

permanent link
Jim Amsden (29337) | answered Feb 07 '17, 11:53 a.m.

The OSLC standards define the namespaces and preferred prefixes for OSLC Core and each of the Domains (Requirements Management, Architecture Management, Change Management, Quality Management, etc.). The namespaces for these specifications is not subject to change, but any given tool might choose to use a different prefix as these don't carry any semantic meaning - they're just text substitution.

For tools that provide extension and their own namespaces and prefixes, you have the prefixes specified in the RDF resource representations. To know what actual resources are in that namespace, you can look at the various ServiceProvider documents provided by the tools through OSLC discovery, and see what namespaces and prefixes are used in the creation factories and query bases, as well as the associated resource shapes (if any).

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.