How to get Baseline Module Artifacts using OSLC
Hello,
One answer
Let me rephrase it, hopefully this clarifies my position
Which has this format
<?xml version="1.0" encoding="UTF-8"?>
<oslc_rm:ServiceDescriptor xmlns:oslc_rm="http://open-services.net/xmlns/rm/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" rdf:about="https://rtc-rm2-tpd.gm.com:XXXX/rm/oslc_rm/_dSOn4M7fEeihvZ3ZnaL_3Q/services.xml">
<oslc_rm:links>
<oslc_rm:LinkCreationServices>
<oslc_rm:validatedByLinkFactory rdf:resource="https://rtc-rm2-tpd.gm.com:XXXX/rm/links/oslc/validatedByLinks"/>
<oslc_rm:implementedByLinkFactory rdf:resource="https://rtc-rm2-tpd.gm.com:XXXX/rm/links/oslc/implementedByLinks"/>
</oslc_rm:LinkCreationServices>
</oslc_rm:links>
<oslc_rm:collections>
<oslc_rm:CollectionSelectionDialog>
<oslc_rm:heightHint>550px</oslc_rm:heightHint>
<oslc_rm:widthHint>800px</oslc_rm:widthHint>
<oslc_rm:widget rdf:resource="https://rtc-rm2-tpd.gm.com:XXXX/rm/pickers/com.ibm.rdm.web.CollectionPicker?projectURL=https%3A%2F%2Frtc-rm2-tpd.gm.com%3AXXXX%2Frm%2Frm-projects%2F_dSOn4M7fEeihvZ3ZnaL_3Q"/>
<dc:title xmlns:dc="http://purl.org/dc/terms/">Collection Selection</dc:title>
</oslc_rm:CollectionSelectionDialog>
</oslc_rm:collections>
<oslc_rm:requirements>
<oslc_rm:SelectionDialog>
<oslc_rm:heightHint>550px</oslc_rm:heightHint>
<oslc_rm:widthHint>800px</oslc_rm:widthHint>
<oslc_rm:widget rdf:resource="https://rtc-rm2-tpd.gm.com:XXXX/rm/pickers/com.ibm.rdm.web.RRCPicker?projectURL=https%3A%2F%2Frtc-rm2-tpd.gm.com%3AXXXX%2Frm%2Frm-projects%2F_dSOn4M7fEeihvZ3ZnaL_3Q"/>
<dc:title xmlns:dc="http://purl.org/dc/terms/">Requirement Selection</dc:title>
</oslc_rm:SelectionDialog>
</oslc_rm:requirements>
<dc:description xmlns:dc="http://purl.org/dc/terms/">Service Descriptor for Project: ECS Sandbox Project (RM2)</dc:description>
<dc:title xmlns:dc="http://purl.org/dc/terms/">ECS Sandbox Project (RM2)</dc:title>
</oslc_rm:ServiceDescriptor>
What should be my next step to get Baseline artifacts?
Comments
Doesn't make any difference querying for things in a stream or a baseline - you just provide the configuration URL whatever it is.
Comments
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 09 '23, 8:33 a.m.Are you specifying the baseline configuration URL when accessing the OSLC API? Also when accessing the OSLC APIs you must provide headre OSLC-Core-Version: 2.0 with every operation.
If you still need help provide the URL you are accessing complete with all parameters (you can XXX the hostname) and also list all the headers you're providing. And show the response body.
Pratyush Sharma
Aug 09 '23, 12:26 p.m.Hello,
Pratyush Sharma
Aug 09 '23, 12:23 p.m.However, after getting the Folder this response correlates to (the response is a ClientResponse object), we get the Folder that is related to the stream, not to the baseline itself (in other words, the folder has artifacts the baseline shouldn't have captured)
Pratyush Sharma
Aug 10 '23, 9:43 a.m.I posted my followup as an answer (even though its not an answer), due to character limit
Pratyush Sharma
Aug 10 '23, 9:42 a.m.Pratyush Sharma
Aug 10 '23, 9:42 a.m.Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 10 '23, 10:14 a.m.This is some java code I'm unaware of so I can't help you with that. But the URL you're using looks like an OSLC Query because it has oslc.where, but the query in oslc.where for public_rm:parent=(a folder url) isn't correctly formatted, the URI MUST be surrounded by < > example below. Also there MUST be a definition of the prefix you've used public_rm in an oslc.prefix= statement
This is an OSLC Query for contents of a folder::
https://jazz.ibm.com:9443/rm/views?oslc.query=true&projectURL=https%3A//jazz.ibm.com%3A9443/rm/process/project-areas/_tg0CsFEhEe2d5dG-54qhbg&oslc.prefix=rm_nav%3D%3Chttp%3A//jazz.net/ns/rm/navigation%23%3E%2Cdcterms%3D%3Chttp%3A//purl.org/dc/terms/%3E&oslc.where=rm_nav%3Aparent%3D%3Chttps%3A//jazz.ibm.com%3A9443/rm/folders/FR_ttGLRVEhEe2d5dG-54qhbg%3E&oslc.select=dcterms%3Aidentifier%2Crm_nav%3Aparent
this has: oslc.where=rm_nav%3Aparent%3D%3Chttps%3A//jazz.ibm.com%3A9443/rm/folders/FR_ttGLRVEhEe2d5dG-54qhbg%3E
which URL-decoded is:
oslc.where=rm_nav:parent=<https://jazz.ibm.com:9443/rm/folders/FR_ttGLRVEhEe2d5dG-54qhbg>
Pratyush Sharma
Aug 10 '23, 10:20 a.m.I got a little stuck using this process and rephrased my question,
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 10 '23, 3:48 p.m.If the folder didn't exist in the stream when the baseline was taken then obviously you won't find it in the baseline; it simply won't be there. But you would discover this by trying to find it and failing - very fragile and poor style to hardcode a URL for a folder and then expect it to be there because it might not.