I want to retrieve data from a data warehouse that has a web-based API, I need to use an API key for authentication and use the GET / Customers command to retrieve the list of customers data, but when I am using that same thing in postman, it's returning the same documentation page of the data warehouse?
I am new to this any help will be really appreciated.
CodePudding user response:
The URL doesn't look valid:
You need a base URL, endpoint, http method, authentication scheme, and credential or a token etc.
I don't know details about your system and API, so let's see an example:
- base url is
https://stackoverflow.com
; your current base url islocalhost:4444
, is your server running on your machine? If so, it might be correct, but I assumer you're talking about a server running somewhere else, not on your computer - endpoint (path parameter) is
/questions/69883697
, in your case/customers
- http method is
GET
and you find it here in Postman; it also means it will not go into query parameters where you put it: - authentication scheme - your docs mentions an api key that goes into a header called
Authorization
, so you have to set it in Headers, not as a query parameter:
Read carefully what's on your screen, Postman uses the same language as your API documentation, so if your doc speaks about headers, you need to go into Headers tab in Postman.