List artifact attributes of a project in Doors Next using OSLC query or Rest API
I need to read all attributes that i have in a project in Doors Next. Then write a new URI for each attribute.
2 answers
As far as I can tell, there is no project administration/type system administration API available. We toyed around with the apis to automate delivering the type system or importing it, which might a feasible approach to distribute a fixed/consolidated type system. See https://rsjazz.wordpress.com/2019/03/07/type-system-manager-part-2/ . You would have to manage the changes using the tool. Obviously this is something that you should experiment with on a test server until you are confident what you try to do is working.
Comments
I couldn't find any OSLC query cabilitities declared for artifact attributes in DN.
Also, when defining RDF URIs, you should try to reuse public vovabulary terms where possible, such as those from Dublin Core, W3C, OSLC etc, rather than inventing your own. If you do start using your own namespace for vocabulary terms, best practice is to make them readable - see https://jazz.net/wiki/bin/view/LinkedData/PublishRdfVocabularies. So deciding what URIs to use is something that has to be done manually.
What would make better sense is to define your type system in one place, get it to the desired state, and then use type export and import in DN to copy that to other project areas and components.
My understanding is, that OSLC only supports querying instances of requirements and other domain objects. You would see the attributes that have values. You can - sort of - find the attributes in the creation factories, but this is no API to e.g. modify the URI or create a new attribute etc.
Thank you for your answering. Can you provide more details on how to find the attributes in the creation factory? That would be very appreciated.
Consider to get the rootservices document, follow OSLC and discover and GET the creation factory that defines all available attributes.
Can you provide more details on how to find the attributes in the creation factory? That would be very appreciated.
See https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/discovery.html#creationFactoryShape
Hello again,
p.s. I wasn't able to use Creation Factory to list the attributes.
Sorry, I meant the resource shape, not the creation factory https://docs.oasis-open-projects.org/oslc-op/core/v3.0/os/resource-shape.html . For OSLC, that is best I can do. I do not know about the JavaScript API.
Attributes aren't directly exposed in the OSLC API. What is exposed are the shapes (i.e. artifact types) and using these you can find the OSLC properties of each shape which is basically the attributes.
Comments
David Honey
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Apr 17 '23, 9:30 a.m.Root 07
Apr 18 '23, 3:54 a.m.Thank you for your response. I have edited the code.
Hint: In the service catalog, I don't find "oslc_rm:properties"