While trying to fetch all components of a project area in GCM, 400 Bad request error
Hi,
We were trying to fetch all components of a GCM projetc area using Rest API,
This above query fetches all components perfectly fine but later after 10 or 15 mins same server call is requested then we get 400 Bad request error.
We are using cookies to authenticate. We have an application created in low code platform which integrates GCM project area data.
Please let us know how to fix this issue.
Thanks & Regards,
Thiru
Accepted answer
Since this works using RESTclient and Postman, this suggests this is not a GCM server issue, but an error with your Java client code, perhaps relating to authentication. I can't help you further with that.
One other answer
Hi,
We have tried in Rest Client and it works fine.
Please find the answers for the questions asked by Ian,
you're using the OSLC Query capability for components offered by GCM - there's one to query within a project and another to query components across the application, this particular query is within a project.
---- Yes, We need to query for a project. Find all components of a project area.
What version and ifix are you using? Have you tried updating to the latest ifix?
----- We are using ALM 7.0.2 ifix008
How do you get your authentication cookies? Could they have expired between the requests?
------ From the last request made we try to fetch cookie and store it local variable.
------ No. it does not expires between the requests. Request is made after few minutes.
Have you confirmed by checking the messages sent (i.e. not by assuming that they're correct) that the URL/headers/cookies on the failing request are the same as the succeeding request?
------- Yes. Keeping the latest success request and after few minutes again another request is made. it fails with 400 response error. (Bad request)
Have you made the identical request (URL, headers) using a logged-in browser REST client, twice, 10 minutes apart - does it work there? If so you're doing something wrong in your code probably to do with headers/cookies.
------- In Rest Client and Postman is working fine, but in both we don't need to send any cookie to authenticate the API, But in our integrated application we need to send because they use cookies as an authentication.
Comments
Ian Barnard
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 09 '22, 12:41 p.m.David Honey
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 09 '22, 1:03 p.m.David Honey
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Feb 09 '22, 1:09 p.m.