How to get the URL of the global configuration stream using its Nam via API?
Hi Team,
I am trying to get the configuration URL using its name via API, But I can't figure it out, Could you share me a example of how to achieve it.
I am able to get the Local stream URL using the following steps:
1. get Rootservices - using server name
2. get oslc catalog - using oslc_config_component_url
3. get project url - using oslc_config_component_url and project_name
4. get component url - using project_url & component_name
5. get component stream url - using component_url and stream name. But this doesn't show the global configuration. Please share your thoughts
|
Accepted answer
David Honey (1.8k●1●7)
| answered Jul 11 '23, 5:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Multiple global configurations can have the same name if they are for different project areas or belong to different components. All the global configurations that belong to a specific component will have unique names. Global components must have unique names within a project area.
The GCM public REST APIs are documented at https://jazz.net/gc/doc/scenarios and https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding.
In general, if you know the name of the GC project area, the name of the global component, and the name of the global configuration, you might do the following:
oslc_config:component{dcterms:title="Systems Global Configuration"} and dcterms:title="SGC Production stream"
finds a global configuration named "SGC Production stream" belonging to a component named "Systems Global Configuration". Remember that HTTP parameter values must be URL encoded, so in the URI request this would be encoded as
?oslc.where=oslc_config%3Acomponent%7Bdcterms%3Atitle%3D%22Systems%20Global%20Configuration%22%7D%20and%20dcterms%3Atitle%3D%22SGC%20Production%20stream%22
.
See https://docs.oasis-open-projects.org/oslc-op/query/v3.0/os/oslc-query.html#oslc.where for the syntax of
oslc.where
.
sri K selected this answer as the correct answer
Comments Thanks, @Davidhoney, The references are really useful.
I tried the following url: https://<server>/gc/oslc-query/configurations?oslc.where=dcterms:title="<configuration>"
It is working!
@Davidhoney, Could you please share references for ETM (Quality Management) as well? You can find all the public REST APIs from https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding. It's worth bookmarking that for future reference.
1
If you query for configuration name only, then you might get multiple results. There could be multiple global configurations of some name belonging to different components. If you want to be sure of only a maximum of one result, you need to include a conditon of the component as well.
sri K
commented Jul 11 '23, 6:09 a.m.
Sure, Thanks for the info! |
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.