We have an API that we would like to try connecting with the Amazon API Gateway. I've been trying some very basic calls, but to no avail. For example, if we don't pass any authentication data in the query strings during the GET call using Postman:
GET https://<host>/<resource>
Then I correctly receive an error message:
{
"error": "Invalid authentication key",
"errorcode": 0
}
In the Gateway I have the following settings for the method:
Method Request
No Authorization, API Key not required
Some query string parameters which are not being set in either Postman or the API Gateway call
No request headers
no request models
Integration Request
HTTP Proxy Integration type, GET
Endpoint URl is the same URL I call using Postman above
No parameter, header or body mappings
Integration Response
Single 200 OK passthrough
Method response
Various HTTP Statuses
Response model as per our API's Swagger definition
All other methods have mock integration. Calling the method via Postman at our backend domain works as intended (i.e. gives the error message above).
Calling the deployed API Gateway method, however, results in:
"message": "Unknown endpoint error." if done using the Method Test in the API Gateway
"message": "Internal server error", if called from the browser or Postman.
Has anyone experienced this issue before?
EDIT: I just noticed that one of the response headers that are set when using Postman or Browser is:
X-Cache: Error from cloudfront
The docs says that this errror is set if the origin server returns an expired certificate, an invalid certificate or a self-signed certificate, or if the origin server returns the certificate chain in the wrong order, but our certificate is valid and I cannot note and problems with the certificate chain...
Related
When calling the /{realm}/logout-all endpoint, the request always results in a "500 - Internal Server Error" and "error": "unknown_error" in the body. All other endpoints work as they should.
I made sure to call the endpoint with a new token and the Authorization-key in the header of the request. All calls are made from postman for testing.
Did I miss something?
Edit 1:
Keycloak Version: 12.0.2
The call: (generated the token with the admin-cli client and the admin user, so pribvileges shoudln't be a problem (?))
The log:
For future reference and anyone who has the same problem with Keycloak:
In some of the requests (e.g. logout-all) you have to provide a Accept: application/json header, otherwise Keycloak defaults back to application/octet-stream, for which Keycloak is missing the necessary classes.
I have an API instance in AZURE where the configurations are as below.
API endpoint : corol.abpparking.domain.com
API suffix : myaboutpage
Backend Webservice URL : http://10.20.10.2:8080/api/v1/
What works
If i call the webservice URL directly as below for the operation GET to /about, i get response code 200
http://10.20.10.2:8080/api/v1/about
Response: 200
What does not work
If i perform the same operation via APIM, i get a 404 resource not found.
http://corol.abpparking.domain.com/myaboutpage/about
Response: 404 Resource not found
I could not figure our what could be the reason. Note that i do not have any basepath in the Swagger definition.
Make sure to check that your API in Azure APIM is configured to accept HTTP in addition to HTTPS. You can set this in API settings, on the same page where you set API backend URL
In Azure Data Factory V2, I created a new http dataset an added a url and basic login details to connect to a https endpoint, when use the the Test Connection the response is "Connection successful"
When i try to "Preview data" it fails, the message from more is
The credential to read http file is invalid. Activity ID:89ae4de1-e6be-46fd-abb9-39360fe5323b.
How do i find out more about this error?
When I try the same url and basic login details in Postman I get back the expected results.
thanks
In Azure data factory, if basic auth type is specified, the http connector honor basic auth protocol, that means:
* It would send out a request without any credential first
* when the http server return 401 response with correct WWW-Authenticate header, it will continue enclose credential into next http request
So if your http server can't handle the request, you will get unauthorize error.
Postman can do it because postman ignored the first http request and send out the second one directly.
you can manually add header to your request:
Authorization: Basic ......
If you don't know how to generate it, you can copy it from postman, after passing credentials.
Best,
Pawel
I am building a program that will list albums/folders and images from my Amazon Cloud Drive. I am able to authenticate and get a token by following the instructions here at amazon public apis.
I am having trouble with the next call to get my endpoints described here under Account API.
Using get
GET : {{metadataUrl}}/account/endpoint Gets the customer end-point against
which REST queries will be executed.
So my request looks just like this in fiddler and on my site just like it is described on the Amazon site here under Get Endpoint. The only differences is the token for obvious reasons.
Sample Request:
GET /drive/v1/account/endpoint HTTP/1.1
Host: drive.amazonaws.com
Authorization: Bearer
Atza|IQEBLjAsAhQ5zx7pKp9PCgCy6T1JkQjHHOEzpwIUQM
My response is:
{
"message":"Authorization header requires 'Credential' parameter.
Authorization header requires 'Signature' parameter.
Authorization header requires 'SignedHeaders' parameter.
Authorization header requires existence of either a 'X-Amz-Date'
or a 'Date' header. Authorization=Bearer"
}
What I am expecting:
{
"customerExists": true,
"contentUrl": "https://content-na.drive.amazonaws.com/cdproxy/",
"metadataUrl": "https://cdws.us-east-1.amazonaws.com/drive/v1/"
}
I did find some information about building the objects in my response from amazon, however, it's not listed in the documentation on the amazon developer site. Is this something new that has not been updated in the docs or am I doing something wrong?
I had a new line between Authorization: Bearer and my token Atza|IQEBLjAsAhQ5zx7pKp9PCgCy6T1JkQjHHOEzpwIUQM. After removing the new line my issue was fixed..
There is no authentication on server side so authentication should not be issue.
URL format: PUT
https://localhost/api/v1/protections?integrationKey=111&userKey=1111&group=111&category=foo
Payload:
{"action":"BLOCK"}
This is working fine in Postman.
In SOAP UI , I am giving input as under:
EndPoint: https://localhost
Resource: /api/v1/protections
Parameters:?integrationKey=111&userKey=1111&group=111&category=foo
in Media type, I am selecting "application/json"
and entering {"action": "BLOCK"} but getting "Wed Jan 20 16:25:27 PST 2016:DEBUG:Receiving response: HTTP/1.1 403 Forbidden
"
Is there any suggestion to get the output in SOAP UI.
Depending on the server where the rest is exposed service generates an HTTP 403, you should verify that server is and thus find the fastest response.
Also try making a GET request from the browser to see if you can answer correctly because problem lock your machine to the server.
As is https, it may be that you lack some certificate set SOAPUI. possibly Postman you use already has configured. Try to check this setting.
In my case, I missed the Header "User-Agent" and "accept". I put in Soap UI and Works.
In Postman, this headers it put automatically.