Welcome to the Jazz Community Forum
Modify Attributes, Types and Artifact Types in DNG with the API

Hello,
Does anyone know if this sspecification of the DNG API works?
It sais that is in Draft since february 2024, I tried to use it but I think it does not work. I would like to know if is there anything similar to use for ceate attributes in DOORS Next, or maybe to know how to contact with Louise Elliott, the last modifier of this specification.
Thanks!
Accepted answer

2 other answers

Hello,
Sorry for the little information I have given.
I am on the 7.1 version.
This were my steps, first to get an attribute definition, and later to try to create it:
1. I get from the services of my Project with "https://ibmjazz:9443/rm/oslc_rm/_kCvjYO3fEe-UnPrhStI6WQ/services.xml"
2. I see that I can get all the attributes of my project area with this Query Capability:
<oslc:queryCapability>
<oslc:QueryCapability>
<oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/types#AttributeDefinition"/>
<oslc:queryBase rdf:resource="https://ibmjazz:9443/rm/attributeDefinitionQuery"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">AttributeDefinition Query Capability</dcterms:title>
</oslc:QueryCapability>
</oslc:queryCapability>
3. With this service, I get all the attributes: https://ibmjazz:9443/rm/attributeDefinitionQuery?projectURL=https%3A%2F%2Fibmjazz%3A9443%2Frm%2Frm-projects%2F_kCvjYO3fEe-UnPrhStI6WQ
<rdf:RDF
xmlns:dng_types="http://jazz.net/ns/rm/dng/types#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:acp="http://jazz.net/ns/acp#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:oslc_config="http://open-services.net/ns/config#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:acc="http://open-services.net/ns/core/acc#">
<rdf:Description rdf:about="https://ibmjazz:9443/rm/attributeDefinitionQuery">
<rdfs:member>
<dng_types:AttributeDefinition rdf:about="https://ibmjazz:9443/rm/types/AD_tNWRzu3fEe-UnPrhStI6WQ"/>
</rdfs:member>
<rdfs:member>
<dng_types:AttributeDefinition rdf:about="https://ibmjazz:9443/rm/types/AD_tNWRz-3fEe-UnPrhStI6WQ"/>
</rdfs:member>
........
</rdf:Description>
<oslc:ResponseInfo rdf:about="/rm/attributeDefinitionQuery">
<dcterms:title>AttributeDefinition Query Result</dcterms:title>
</oslc:ResponseInfo>
</rdf:RDF>
4. With this URL I can get the Attribute information: https://ibmjazz:9443/rm/types/AD_tNWRzu3fEe-UnPrhStI6WQ
<rdf:RDF
xmlns:dng_types="http://jazz.net/ns/rm/dng/types#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:acp="http://jazz.net/ns/acp#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:oslc_config="http://open-services.net/ns/config#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:acc="http://open-services.net/ns/core/acc#">
<dng_types:AttributeDefinition rdf:about="https://ibmjazz:9443/rm/types/AD_tNWRzu3fEe-UnPrhStI6WQ">
<dng_types:affectsLinkValidity rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>true</dng_types:affectsLinkValidity>
<oslc:serviceProvider rdf:resource="https://ibmjazz:9443/rm/oslc_rm/_kCvjYO3fEe-UnPrhStI6WQ/services.xml"/>
<acp:accessControl rdf:resource="https://ibmjazz:9443/rm/accessControl/_kCvjYO3fEe-UnPrhStI6WQ"/>
<rdfs:label>Test Status</rdfs:label>
<dng_types:multiValued rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>false</dng_types:multiValued>
<dcterms:contributor rdf:resource="https://ibmjazz:9443/jts/users/ibm"/>
<oslc_config:component rdf:resource="https://ibmjazz:9443/rm/cm/component/_nUluoO3fEe-UnPrhStI6WQ"/>
<dcterms:creator rdf:resource="https://ibmjazz:9443/jts/users/ibm"/>
<dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
>2025-02-18T10:04:14.750Z</dcterms:created>
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/>
<acc:accessContext rdf:resource="https://ibmjazz:9443/rm/acclist#_kCvjYO3fEe-UnPrhStI6WQ"/>
<dng_types:range rdf:resource="https://ibmjazz:9443/rm/types/AT_tIYSNu3fEe-UnPrhStI6WQ"/>
<dcterms:modified rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
>2025-02-18T10:04:14.750Z</dcterms:modified>
</dng_types:AttributeDefinition>
</rdf:RDF>
-----------------------------------
5. Now I tried to create an attribute, I see that I can get create attributes on my project area with this Factory get from the services.xml, same that I get the Query Capability:
<oslc:creationFactory>
<oslc:CreationFactory>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceType rdf:resource="http://jazz.net/ns/rm/dng/types#AttributeDefinition"/>
<oslc:creation rdf:resource="https://ibmjazz:9443/rm/attributeDefinitionFactory"/>
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">AttributeDefinition Factory</dcterms:title>
</oslc:CreationFactory>
</oslc:creationFactory>
6. So I tried a POST request with this:
-Body:
<rdf:RDF
xmlns:acc="http://open-services.net/ns/core/acc#"
xmlns:acp="http://jazz.net/ns/acp#"
xmlns:oslc="http://open-services.net/ns/core#"
xmlns:oslc_config="http://open-services.net/ns/config#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:dng_types="http://jazz.net/ns/rm/dng/types#">
<rdf:Property>
<dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2024-01-29T20:53:26.511Z</dcterms:created>
<dng_types:affectsLinkValidity rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</rm:affectsLinkValidity>
<dng_types:defaultValue rdf:datatype="http://www.w3.org/2001/XMLSchema#string">MyInititalValue</dng_types:defaultValue>
<dng_types:multiValued rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">false</rm:multiValued>
<oslc_config:component rdf:resource="https://ibmjazz:9443/rm/cm/component/_nUluoO3fEe-UnPrhStI6WQ"/>
<oslc:serviceProvider rdf:resource="https://ibmjazz:9443/rm/oslc_rm/_kCvjYO3fEe-UnPrhStI6WQ/services.xml"/>
<rdfs:comment>This is a new artifact attribute</rdfs:comment>
<rdfs:label>AArtifactAttribute</rdfs:label>
</rdf:Property>
</rdf:RDF>
And the result is "Error 404: Not Found".
Maybe I am not doing correctly the POST request, if you need more information just let me know.
Thanks!!
Comments

I do not have experience with that API, but in general,
I would not provide a user, nor a creation date. These are usually assigned by the API operation.
I would do a GET and try the absolute minimum of attributes, including namespaces, in a POST and add stuff if needed.
If you get a 404 I would consider if the project area needs to be in the request as parameter. Maybe it should be in the post request body.
It would be desirable to have more examples in the documentation.
1 vote
Comments
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 19, 5:08 a.m."doesn't work" is far too vague to help with.
1 vote