[RM] Creation of Baseline in Non-GC RM Project using OSLC
Hello,
I am looking for some examples to create baseline for non-GC projects of DNG PA.
I read this : https://jazz.net/forum/questions/249582/is-there-a-rest-api-for-dng-to-create-a-local-streamcomponent-and-baseline
Tried for Baseline : Response is 202 Accepted.
But Baseline was not created. Any leads here ?
|
7 answers
POST
URI : https://xxx/rm/cm/stream/_ovO15tKLEeuaG5VmJAdw1w/baselines
Headers : Accept : application/rdf+xml
OSLC-Core-Version : 2.0
Content-Type : application/rdf+xml
X-Jazz-CSRF-Prevent : JSessionID
Body
<rdf:RDF xmlns:dcterms="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:oslc="http://open-services.net/ns/core#" 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:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:acc="http://open-services.net/ns/core/acc#" xmlns:process="http://jazz.net/ns/process#">
<oslc_config:Baseline>
<dcterms:description>Description</dcterms:description>
<dcterms:title rdf:parseType="Literal">Power BI - example Initial Stream</dcterms:title>
<prov:wasDerivedFrom rdf:resource="https://xxx/rm/cm/stream/_ovO15tKLEeuaG5VmJAdw1w" />
</oslc_config:Baseline>
</rdf:RDF>
Response :
Status Code : 202 Accepted
GET
Headers : Accept : application/rdf+xml
OSLC-Core-Version : 2.0
Response
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:err="http://jazz.net/xmlns/prod/jazz/foundation/1.0/">
<rdf:Description>
<err:detailedMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">com.ibm.rdm.fronting.server.exception.NotFoundException</err:detailedMessage>
<err:errorMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Not found</err:errorMessage>
<err:errorStatus rdf:datatype="http://www.w3.org/2001/XMLSchema#long">404</err:errorStatus>
</rdf:Description>
</rdf:RDF>
Comments Most likely the POST request body contains incorrect data. Note that some objects need to have a about URI that is NOT NULL. E.g. about="https://nowhere.net/". It might not matter what the URI is, it just has to be a URI and can not be empty.
David Honey
commented Jul 21 '22, 10:20 a.m.
| edited Jul 21 '22, 10:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In Turtle, the POST request is:
@prefix acc: <http://open-services.net/ns/core/acc#> . @prefix process: <http://jazz.net/ns/process#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix dcterms: <http://purl.org/dc/terms/> . @prefix ldp: <http://www.w3.org/ns/ldp#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix oslc_config: <http://open-services.net/ns/config#> . @prefix prov: <http://www.w3.org/ns/prov#> . @prefix oslc: <http://open-services.net/ns/core#> . In essence, the subject is a blank node. As Ralph suggests, try a proper URI for the suibject. |
David Honey (1.8k●1●7)
| answered Jul 21 '22, 6:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Jul 21 '22, 7:02 a.m. @Chandan I'm not going to respond to any more posts on this topic until you include the following information:
But until you provide the above details, it's unlikely anyone is going to help you further. |
David Honey (1.8k●1●7)
| answered Jul 20 '22, 9:27 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Your POST body is very sparse. Try doing a GET on the stream you want to create a baseline from, and using the RDF from that with changes to the RDF types, title, description and POST that modified content.
Comments Did the get and performed the POST Operation. Its stating method not allowed 405
<rdf:RDF xmlns:dcterms="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:oslc="http://open-services.net/ns/core#" xmlns:oslc_config="http://open-services.net/ns/config#" xmlns:j.0="http://jazz.net/ns/rm/dng/config#"
<oslc_config:Baseline rdf:about="https://xxx/rm/cm/stream/_ovO15tKLEeuaG5VmJAdw1w">
<dcterms:description>Description</dcterms:description>
<dcterms:title rdf:parseType="Literal">Power BI - example Initial Stream</dcterms:title>
</oslc_config:Baseline>
</rdf:RDF>
Still not successful
Body
<oslc_config:Baseline>
<dcterms:description>Description</dcterms:description>
<dcterms:title rdf:parseType="Literal">Power BI - example Initial Stream</dcterms:title>
<prov:wasDerivedFrom rdf:resource="https://xxx/rm/cm/stream/_ovO15tKLEeuaG5VmJAdw1w" />
</oslc_config:Baseline>
</rdf:RDF>
Performing GET on location header leads to "Not Found"
|
David Honey (1.8k●1●7)
| answered Jul 20 '22, 9:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Comments I tried to doing a get on content location for an activity.
Exception is
<oslc_config:Activity rdf:about="https://xxx/rm/taskTracker/0bb1b38e-4ef8-449a-b06f-8a6d9b8c4b96">
<dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Create Child Configuration Task</dcterms:title>
<oslc_auto:state rdf:resource="http://open-services.net/ns/auto#complete" />
<dcterms:references>
<oslc:Error>
<oslc:statusCode>0</oslc:statusCode>
<oslc:message>Unexpected exception while executing task</oslc:message>
</oslc:Error>
</dcterms:references>
<oslc_auto:verdict rdf:resource="http://open-services.net/ns/auto#error" />
</oslc_config:Activity>
|
URI : https://xxx/rm/cm/stream/_ovO15tKLEeuaG5VmJAdw1w/baselines
Headers :
Accept : application/rdf+xml
OSLC-Core-Version : 2.0
Content-Type : application/rdf+xml
X-Jazz-CSRF-Prevent : JSessionID
Body
<rdf:RDF xmlns:dcterms="http://purl.org/dc/terms/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:oslc="http://open-services.net/ns/core#" xmlns:oslc_config="http://open-services.net/ns/config#" xmlns:j.0="http://jazz.net/ns/rm/dng/config#"
xmlns:acc="http://open-services.net/ns/core/acc#" xmlns:process="http://jazz.net/ns/process#">
<oslc_config:Baseline>
<dcterms:title rdf:parseType="Literal">Create Via OSLC</dcterms:title>
<dcterms:description rdf:parseType="Literal">Test description</dcterms:description>
</oslc_config:Baseline>
</rdf:RDF>
|
Ralph Schoon (63.6k●3●36●47)
| answered Jul 20 '22, 8:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER If you have API questions, provide the details of what you have done. Request, URI, headers. Do not expect the forum users to assume stuff from references to other posts. If you are not willing to spend the time creating a useful question, do not hope for a useful answer. |
David Honey (1.8k●1●7)
| answered Jul 20 '22, 10:50 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER POST to what URI? You cannot POST to the stream.
See https://docs.oasis-open-projects.org/oslc-op/config/v1.0/psd01/config-resources.html#shape-stream.
So the sequence would be:
Comments URI : https://xxx/rm/cm/stream/_ovO15tKLEeuaG5VmJAdw1w/baselines
Body
<oslc_config:Baseline>
<dcterms:description>Description</dcterms:description>
<dcterms:title rdf:parseType="Literal">Power BI - example Initial Stream</dcterms:title>
<prov:wasDerivedFrom rdf:resource="https://xxx/rm/cm/stream/_ovO15tKLEeuaG5VmJAdw1w" />
</oslc_config:Baseline>
Even though Response is 202 and GET on location header
Response os Not found on activity.
What headers are you including in the 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.