Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

DNG OSLC Query or Rest API to get list of baselines from stream or artifact

 Hi All,


Is there any API to get the list of baseline based upon stream or Artifact ID.I also wanted to know, if there is any API to get revision details of artifacts.
If yes, please provide me that.
Thanks in advance.

I'll be looking forward for help. 
Jyoti

0 votes


Accepted answer

Permanent link

 Hi Jyoti


I don't believe DOORS Next has an API for revisions, although there is a History option in the Reportable REST API I haven't explored what this can provide. See https://jazz.net/wiki/bin/view/Main/DNGReportableRestAPI

DOORS Next doesn't provide OSLC Query for configurations.

Expanding a previous answer of mine about how to find the configurations in a project see https://jazz.net/forum/questions/266334/dng-oslcfetch-components-from-project-area

When retrieving a stream like

<rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:oslc_config="http://open-services.net/ns/config#"
    xmlns:process="http://jazz.net/ns/process#">
  <oslc_config:Configuration rdf:about="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw">
    <oslc_config:previousBaseline rdf:resource="https://jazz.ibm.com:9443/rm/cm/baseline/_RkpaQCqeEeyWb76OEa4MVA"/>
    <dcterms:description></dcterms:description>
    <dcterms:creator rdf:resource="https://jazz.ibm.com:9443/jts/users/ibm"/>
    <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
    >2020-08-06T00:10:24.92Z</dcterms:created>
    <rdf:type rdf:resource="http://open-services.net/ns/config#Stream"/>
    <oslc_config:acceptedBy rdf:resource="http://open-services.net/ns/config#Configuration"/>
    <dcterms:identifier>_OdB5gNd5EeqV5_5cfWW9rw</dcterms:identifier>
    <dcterms:title rdf:parseType="Literal">SGC AMR Production stream</dcterms:title>
  </oslc_config:Configuration>
</rdf:RDF>

use the link in <oslc_config:baselines rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_SG-bsdd5EeqV5_5cfWW9rw/baselines"/>

The result when there are two previous baselines in the stream looks like this:

<rdf:RDF
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:prov="http://www.w3.org/ns/prov#"
    xmlns:oslc_config="http://open-services.net/ns/config#"
    xmlns:ldp="http://www.w3.org/ns/ldp#"
    xmlns:process="http://jazz.net/ns/process#">
    <rdfs:member>
      <oslc_config:Configuration rdf:about="https://jazz.ibm.com:9443/rm/cm/baseline/_RkpaQCqeEeyWb76OEa4MVA">
        <dcterms:description></dcterms:description>
        <dcterms:title rdf:parseType="Literal">test1</dcterms:title>
        <oslc_config:baselineOfStream rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw"/>
        <dcterms:creator rdf:resource="https://jazz.ibm.com:9443/jts/users/ibm"/>
        <rdf:type rdf:resource="http://open-services.net/ns/config#Baseline"/>
        <dcterms:identifier>_RkpaQCqeEeyWb76OEa4MVA</dcterms:identifier>
        <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/_OclNkdd5EeqV5_5cfWW9rw"/>
        <oslc_config:previousBaseline>
          <oslc_config:Baseline rdf:about="https://jazz.ibm.com:9443/rm/cm/baseline/_aLlyY9d5EeqV5_5cfWW9rw">
            <oslc_config:previousBaseline>
              <oslc_config:Configuration rdf:about="https://jazz.ibm.com:9443/rm/cm/baseline/_R4EdBNd5EeqV5_5cfWW9rw">
                <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/_OclNkdd5EeqV5_5cfWW9rw"/>
                <dcterms:description></dcterms:description>
                <oslc_config:selections rdf:resource="https://jazz.ibm.com:9443/rm/configSelections/baseline/_R4EdBNd5EeqV5_5cfWW9rw"/>
                <dcterms:identifier>_R4EdBNd5EeqV5_5cfWW9rw</dcterms:identifier>
                <prov:wasDerivedFrom rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw"/>
                <process:projectArea rdf:resource="https://jazz.ibm.com:9443/rm/process/project-areas/_4-Qq0Nd4EeqV5_5cfWW9rw"/>
                <oslc_config:acceptedBy rdf:resource="http://open-services.net/ns/config#Configuration"/>
                <oslc_config:baselineOfStream rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw"/>
                <dcterms:title rdf:parseType="Literal">SGC AMR 1.0 Release</dcterms:title>
                <acc:accessContext rdf:resource="https://jazz.ibm.com:9443/rm/acclist#_4-Qq0Nd4EeqV5_5cfWW9rw"/>
                <oslc_config:overrides rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw"/>
                <oslc_config:streams rdf:resource="https://jazz.ibm.com:9443/rm/cm/baseline/_R4EdBNd5EeqV5_5cfWW9rw/streams"/>
                <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
                >2020-08-06T00:10:47.888Z</dcterms:created>
                <rdf:type rdf:resource="http://open-services.net/ns/config#Baseline"/>
                <dcterms:creator rdf:resource="https://jazz.ibm.com:9443/jts/users/ibm"/>
                <oslc:serviceProvider rdf:resource="https://jazz.ibm.com:9443/rm/oslc_rm/_4-Qq0Nd4EeqV5_5cfWW9rw/services.xml"/>
              </oslc_config:Configuration>
            </oslc_config:previousBaseline>
            <dcterms:description></dcterms:description>
            <dcterms:identifier>_aLlyY9d5EeqV5_5cfWW9rw</dcterms:identifier>
            <oslc_config:baselineOfStream rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw"/>
            <dcterms:creator rdf:resource="https://jazz.ibm.com:9443/jts/users/ibm"/>
            <dcterms:title rdf:parseType="Literal">SGC AMR 1.1 Release</dcterms:title>
            <process:projectArea rdf:resource="https://jazz.ibm.com:9443/rm/process/project-areas/_4-Qq0Nd4EeqV5_5cfWW9rw"/>
            <oslc:serviceProvider rdf:resource="https://jazz.ibm.com:9443/rm/oslc_rm/_4-Qq0Nd4EeqV5_5cfWW9rw/services.xml"/>
            <oslc_config:component rdf:resource="https://jazz.ibm.com:9443/rm/cm/component/_OclNkdd5EeqV5_5cfWW9rw"/>
            <oslc_config:selections rdf:resource="https://jazz.ibm.com:9443/rm/configSelections/baseline/_aLlyY9d5EeqV5_5cfWW9rw"/>
            <acc:accessContext rdf:resource="https://jazz.ibm.com:9443/rm/acclist#_4-Qq0Nd4EeqV5_5cfWW9rw"/>
            <oslc_config:acceptedBy rdf:resource="http://open-services.net/ns/config#Configuration"/>
            <oslc_config:streams rdf:resource="https://jazz.ibm.com:9443/rm/cm/baseline/_aLlyY9d5EeqV5_5cfWW9rw/streams"/>
            <prov:wasDerivedFrom rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw"/>
            <rdf:type rdf:resource="http://open-services.net/ns/config#Configuration"/>
            <oslc_config:overrides rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw"/>
            <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
            >2020-08-06T00:11:43.622Z</dcterms:created>
          </oslc_config:Baseline>
        </oslc_config:previousBaseline>
        <acc:accessContext rdf:resource="https://jazz.ibm.com:9443/rm/acclist#_4-Qq0Nd4EeqV5_5cfWW9rw"/>
        <oslc_config:overrides rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw"/>
        <oslc_config:acceptedBy rdf:resource="http://open-services.net/ns/config#Configuration"/>
        <dcterms:created rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime"
        >2021-10-11T14:19:41.428Z</dcterms:created>
        <prov:wasDerivedFrom rdf:resource="https://jazz.ibm.com:9443/rm/cm/stream/_OdB5gNd5EeqV5_5cfWW9rw"/>
      </oslc_config:Configuration>
    </rdfs:member>
  </ldp:DirectContainer>
</rdf:RDF>




jyoti mishra selected this answer as the correct answer

0 votes

Comments

 Hi Ian/David


It is working fine. Thank you so much.

Thanks,
Jyoti


One other answer

Permanent link

You should be able to get the latest baseline created from a stream using the oslc_config:latestBaseline property of the stream. See the OSLC Configuration Management Version 1.0 specification. If earlier baselines of that stream were created, you should be able to traverse through each baseline's prov:wasRevisionOf property. It may also be possible to use an OSLC query on configurations with an oslc.where that includes oslc_config:baselineOfStream property. Whether that specific query is supported is application dependent, but feel free to try it using Poster/RESTED or other browser plugin.

Best regards,
David

0 votes

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,938
× 7,495
× 1,325

Question asked: Oct 11 '21, 6:14 a.m.

Question was seen: 1,540 times

Last updated: Oct 12 '21, 10:24 a.m.

Confirmation Cancel Confirm