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

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

0 votes


Accepted answer

Permanent link
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.


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:
  1. Discover the OSLC Service Provider Catalog from the GCM application root services document. See https://jazz.net/gc/doc/scenario?id=Discovery
  2. Discover the OSLC service provider for the project area you are interested in.
  3. Discover the OSLC Query capability for components.
  4. Use that query capability to query for components with a specified component name and get the component URI - see https://jazz.net/gc/doc/scenario?id=QueryComponents
  5. Discover the OSLC Query capability for configurations
  6. Use that query capability to query for components with a specified configuration name  and component URI, and get the configuration URI - see https://jazz.net/gc/doc/scenario?id=QueryConfigurations
An alternative to querying separately for component then configuration would be to query for configurations using nested properties. For example, an unencoded oslc.where of 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

1 vote

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.

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.

1 vote

 Sure, Thanks for the info!

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,937

Question asked: Jul 11 '23, 4:03 a.m.

Question was seen: 659 times

Last updated: Jul 11 '23, 6:09 a.m.

Confirmation Cancel Confirm