Why don't I get anything from this API call? - rest

I'm trying to get a the JSON received from this API https://70aidzp7ck-2.algolianet.com/1/indexes/*/queries?x-algolia-agent=Algolia%20for%20JavaScript%20(4.14.2)%3B%20Browser%20(lite)%3B%20instantsearch.js%20(4.49.1)%3B%20JS%20Helper%20(3.11.1)&x-algolia-api-key=a4a35644550d8855512297e93a18e30a&x-algolia-application-id=70AIDZP7CK
I copied it directly to postman and I get a 400, I've also tried copying the cUrl still the same issue. Any idea why I'm not able to replicate the request using postman? This is a POST request.

Related

Problem with updating user using keycloak rest api

I have a problem with updating user using keycloak rest api, neither my requests work.
For example, I'm trying to get all realm users based on docs. I send get-request on this endpoint
http://keycloak.my/auth/realms/my_realm/account/users
but get 404 error
How to make it work? Why do I get 404, if I take this endpoint from docs?
This URL:
http://keycloak.my/auth/realms/my_realm/account/users
is incorrect.
The correct one is:
http://keycloak.my/auth/admin/realms/my_realm/account/users
For all those endpoints the base URL is ${KeycloakIP}/auth/admin/

Github graphql replying with 405

I'm trying to get my github profile detail from github using the graphql endpoint 'https://developer.github.com/v4/explorer/' and after creating a personal token i'm getting a 405 error, this is my code please what am I doing wrong error messageenter image description here
The page you're attempting to load is a UI tool to help developers explore GraphQL. In other words, it's a normal webpage, not the GraphQL endpoint.
The error message you're getting is a 405 Method Not Allowed. That's because you're making a POST request to this page, but that isn't a valid method here. Because this is a normal webpage, you probably need to use a normal GET request if you want to load it.
If you're looking to make a GraphQL request, you'll need to use the proper endpoints, which is https://api.github.com/graphql. A POST request is correct for that endpoint.

Postman Strange 401s

I am trying to use the PostMan client to hit a REST API. Using the client, I get a 401. If I take the exact same information and use the PostMan Chrome Extension, I get a 200. Reading the forums, someone mentioned that the REST API needs to have CORS enabled (because PostMan is basically a webapp), but I am a little confused as to how I would do that. On the server side, I have the ability to plug in allowed CORS domains, but if it is coming from my local machine, it doesn't have a domain, right?

How to send a REST request to Cloud Firestore

I've build an Android app using Firebase, but I'd like to test the performance of the Cloud Firestore using REST requests (through Postman). I've looked up some info on some sites from Firebase, but everytime I send a request, I get a 404 Not Found.
The Authentication I use seems to work, by doing a POST request to
https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=MY_API_KEY I'm able to get a Firebase Id Token.
After that I tried sending a GET request to https://firestore.googleapis.com/v1beta1/parent=projects/MY_PROJECT_ID/databases/(default)/documents/MY_COLLECTION_ID with the token as Authrorization header, but everytime I seem to get 404 Page Not Found.
I'm not sure what I'm doing wrong and I hope someone can help me with this.
Thanks in advance!
Apparently I wasn't supposed to include the parent= in the URL, I removed it and now it works just fine.

REST api PUT request returns status 504 and 204 using Postman

I am testing a REST API endpoint PUT request using Postman. I get a status 504 ( in Asia), but my other team member gets a status 204 (in America). The API is hosted at AWS.
First, we thought I might be doing something wrong. My team member sent me the .postman_collection file of his request. I imported and ran it, but I'm still getting 504.
Any idea what could the reason be?
(we guessed it could be a region issue, but it shouldn't be. Do you think so? Or could it be something else?)
All POST and GET requests of that API succeed when I test them on Postman, but PUT on all endpoints of that API return 504.