Hi,
Using the API, I need to retrieve all the GARs entities identifier of one Pipeline, filtering by the pipeline identifiers
How I can do it?
Many thanks
Xavier Yuste
Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
If an answer to your question is correct, click on "Verify Answer" under the "More" button. The answer will now appear with a checkmark. Please be sure to always mark answers that resolve your issue as verified. Your fellow Community members will appreciate it!  Learn more
Hi,
Using the API, I need to retrieve all the GARs entities identifier of one Pipeline, filtering by the pipeline identifiers
How I can do it?
Many thanks
Xavier Yuste
Hello Xavier,
This is a sample request using a query filter on pipeline ID field for GARs that might help:
<>/api/shared_spaces/1001/workspaces/1002/gherkin_automated_runs?fields=author,comments,description,id,pipeline,run_by,started,status,taxonomies&query="pipeline EQ {id IN 1002,1003,1004}"
*Specify the Pipeline IDs needed at the end of the query!
There is an API Interactive UI inside Octane that helps building the API requests for common entities.
You can find more details about it here:
https://admhelp.microfocus.com/octane/en/16.1.100/Online/Content/API/Interactive_API.htm
More information about query filters is here:
https://admhelp.microfocus.com/octane/en/16.1.100/Online/Content/API/query_Clause.htm
If this helps please suggest it as a valid answer.
Thanks!
Claudio
Claudio Urena
OpenText ALM & ALM Octane Support
Although I am an OpenText employee, I am speaking for myself and not for OpenText.
If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button.
Hi Claudio,
Many thanks for your answer, I am trying to apply your suggestion, I am executing a Java code with Rest Assured library.
Response respPipelines = RestAssured.given().headers("Content-Type", ContentType.JSON).relaxedHTTPSValidation()
.proxy(proxyURL).cookies(cookies).when()
.get(""https://almoctane-eur.saas.microfocus.com/.../" + workspaceId
+"/gherkin_automated_runs?query=\"pipeline={id EQ 72035}\"");
And I have the next error:
Exception in thread "main" java.lang.IllegalArgumentException: Invalid number of path parameters. Expected 1, was 0. Undefined path parameters are: id EQ 72035.
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
DO you have any idea about this error?
Many thanks again!!!!
Xavier
Hi
I have found the solution, adding the query as queryParam :
Response respPipelines = RestAssured.given().headers("Content-Type", ContentType.JSON).relaxedHTTPSValidation()
.proxy(proxyURL).cookies(cookies).when().queryParam("query", "\"pipeline={id EQ 20001}\"").
get(""https://almoctane-eur.saas.microfocus.com/.../" + workspaceId
+"/gherkin_automated_runs");
And now it works and I can retrieve the GAR's of the specified pipeline Thanks Claudio!
Regards
Xavier