-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ApiGateway::GetApiKeys not returning any items #398
Comments
I just ran into a similar issue today with the GetRestApis method. After some troubleshooting I discovered that the amazon apigateway api was returning a Content-Type of 'application/hal+json' when called through Paws, while the awscli was getting 'application/json' returned. If I set the header 'Accept: application/json' in the request then Paws worked as expected. e.g.
Searching through botocore I found this line https://github.com/boto/botocore/blob/1.20.21/botocore/handlers.py#L983, where they are explicitly setting the Accept header for apigateway calls. Update: Changed botocore link to reference a specific tag in case the line numbers change in the future (was referencing the develop branch previously) |
Thank you @msven , great detective work. There may be another way to do it, but adding the following code after creating the ApiGateway service worked for me.
This worked in my case because calling Hopefully this will help the Paws developer team to alter the relevant module and include the right request header. |
I will have to check but I think in one of my many many patches (not released) I found and fixed that one. Cheers John |
Just reporting odd behaviour with ApiGateway::GetApiKeys
The above code returns:
I had expected this to return all available API keys and values (there are 5 already present in the AWS console).
Note that I am able to create new API keys using Paws as expected (i.e. a new one is created in the AWS console) using:
However, GetApiKeys still doesn't return anything.
Also, equivalent Python code using boto3 pulls back all the keys as expected.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: