API Works on Postman- Imported Request to Ready API Doesnt work
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
API Works on Postman- Imported Request to Ready API Doesnt work
Hi
My API woks in Postman it is a simple get request, under authorization tab passing in credentials [username & password] and default headers -
In Readyapi imported the collection through the integration tab , no luck with ready api, using the authorization tab from the root level [parent level] added the authorization using the basic auth - still no luck
could you please fill in what i am missing
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @smynam
we're gonna need more info to help.
when you say "no luck" - what actually happens? are you getting a response but with a 400 series response code? (e.g. 400 bad request? 401 unauthorized?), no response?
what does it say in the ReadyAPI! log and the Errors log?
cheers,
rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HTTP/1.1 405 Method Not Allowed
Date: Wed, 09 Sep 2020 13:48:20 GMT
Content-Length: 0
Connection: keep-alive
x-amz-cognito-request-id: 6caf1366-167e-40b4-b1a5-0fdd653ca52e
X-Application-Context: application:prod:8443
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Server: Server
Allow: GET
content type : null
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @smynam
you got a 405 - that's method not allowed meaning you tried using a method that isn't supported by the API you're poking.
This is REST - not SOAP - right? - you tend to have less control wiht the methods with SOAP than REST.
SO! - you have a 405 at the top of the RAW response and at the bottom you have an 'Allow' header and this indicates the methods that are supported by the endpoint you are hitting.
Are you sure you did the request using a GET method? According to the response header details you're getting, I'd suggest you used a different method - not a GET....maybe a POST?
have a look at the following pic - you can see the Method value is defined as GET here.
If you are definitely submitting a GET request against your endpoint, I'd suggest there's a defect with endpoint itself, but I wouldn't expect this.
ta
rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for helping Richie!
Hi @smynam ! Please note that you replied straight to the automatic email notification - this way your reply won't reach the Community.
Let me copy the contents this time, please make sure to reply inside the forum in the future:
>>
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey @smynam
so you changed the POST to a GET and now rather than 405 you're getting a 400 bad request?
OK - so you're getting through the auth and the content of the request itself is being treated as malformed.
This is a GET, right - and you haven't got a payload I'm assuming - so I'd suggest looking at the URI you are submitting. Compare the URI you are submitting (via the RAW request details) and compare with your requirements.
I expect they'll be some mismatch - there may be a problem with your headers (you can get headers that are too long that cause a 400), but it's more likely that theres a problem with your REST parameters in the URI you are submitting. Double check what you are submitting (via the RAW) against your requirements - you should see the problem
ta
rich
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is how we solved the issue. the request which we are passing through is going through Akamai gateway.
The Akamai has allowed the request coming from Postman as valid request, while the same request content when requested from Ready API - here Akamai flagged it as an Anomaly library [chat bot] and blocked the request which is making it to fail.
Resolution : The team has proposed adding an user-agent header in the preferences setting under http and that did the trick
Please mark it as an solution once validated - happy to learn and contribute back!!
