Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

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!

0 votes

Comments

"doesn't work" is far too vague to help with.


I believe this API is new in 7.1, is that the version you're using? The DNG server API page DNGServerAPI < Main < TWiki describes this API as "Work in progress" so maybe it's not finished enough for actual use to create/update types - certainly it's not listed in the New and Noteworthy for 7.1, so my guess is it isn't a finished/supported API.

I know this API works (for 7.1) to GET type details, haven't attempted PUT/POST.

1 vote


Accepted answer

Permanent link

Hi Juan


The status of the API here and here  has been changed to "Not yet available, under consideration" - it's incomplete, and unsupported.

In the fullness of time as the API is updated the docs will be updated and completed.

Regards
Ian

Juan Fernandez García selected this answer as the correct answer

1 vote

Comments

Ok, thanks for the info Ian, and thanks to all people thar reply something.


Did you know if there is any way to suscribe to jazz pages to know when it changes the status?

Thanks!!


2 other answers

Permanent link
When you say "it doesn't work" what do you mean? What have you tried?

You need to give us a lot more information than just it doesn't work - show us what you're trying to do, the calls you made, the responses....

1 vote


Permanent link

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>


<rdf:RDF
    xmlns:dng_types="http://jazz.net/ns/rm/dng/types#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:acp="http://jazz.net/ns/acp#"
    xmlns:oslc_config="http://open-services.net/ns/config#"
    <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:dcterms="http://purl.org/dc/terms/"
    xmlns:acp="http://jazz.net/ns/acp#"
    xmlns:oslc_config="http://open-services.net/ns/config#"
    <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:acp="http://jazz.net/ns/acp#" 
    xmlns:oslc="http://open-services.net/ns/core#" 
    xmlns:oslc_config="http://open-services.net/ns/config#" 
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:dng_types="http://jazz.net/ns/rm/dng/types#">
    
    <rdf:Property>
        <dcterms:creator rdf:resource="https://ibmjazz:9443/jts/users/ibm"/>
        <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>
        <dng_types:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
        <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!!

0 votes

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

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,986
× 7,526
× 1,356
× 163

Question asked: Feb 18, 7:12 a.m.

Question was seen: 434 times

Last updated: Feb 19, 12:40 p.m.

Confirmation Cancel Confirm