I have a api set up with api gateway for PATCH method which is integrated with an lambda function.
I am trying to test my api with POSTMAN.
As you can see i am facing the above error.
I have used the same method to pull the query parameter in other methods like GET,PUT,DELETE worked like a charm.
I am using Python to script my lambda.
I figure this error is more related to API end than of the code.
Could any one help me out of this?
Apparently i had missed to click on the radio button to have a proxy integrate while integrating with my lambda function.
PATCH can work with query parameters.
Related
Whenever a webhook subscription is created for ServiceM8 the previous one is deleted - meaning you can only ever have 1 webhook running at a time.
This happens
When creating a scenario in Make.com(formerly Integromat) using the pre-built trigger modules (which create a webhook automatically).
When creating a webhook via the ServiceM8 API in Postman.com
When creating custom webhooks in Zapier.
If you run an API GET request in the Make.com ServiceM8 module to the ‘webhook_subscriptions’ endpoint then it only ever returns 1 result. (Which is always the last webhook you created in Make.com)
If you then create another webhook in another application (such as Postman) then run a GET request to the ‘webhook_subscriptions’ endpoint, it will only ever return 1 result (the last webhook created in Postman)
Neither application is able to see webhooks created in the other application (even though the GET request should return a list of ALL ‘webhook_subscrptions’
Both of these webhooks will actually now work if you point a separate scenario to each of them in Make.com
But if you create a new webhook in either application, then the old webhook that you had created in that application will stop working.
The only place that you can create and use multiple webhooks from seems to be Zapier.
But even then, it only works if you create the webhooks via the pre-built trigger modules.
If you create any custom webhooks, the same thing happens.
I have tried contacting ServiceM8 support, and their response was;
I understand you came across an issue with our API. I'm afraid we cant provide solutions for the issue here. All information regarding our API is available online through our developer portal you should be able to find any information you need there - https://developer.servicem8.com
You might also be able to find the solutions to your issue on our developer forum (https://developer.servicem8.com/discuss ), or on StackOverflow (https://stackoverflow.com/questions/tagged/servicem8 )
If the solution is not there we recommend that you post the problem in the discussion board on either stack overflow or on our forum the developer community is usually very active and will respond it.
everytime I deploy with AWS-SAM my Settings in API-Gateway get reset.
I have an Open Api 3.0 Spec.yml I imported into API-Gateway and it loaded just fine. After deploying using SAM it only shows the hello world function (only one i currently have).
What I want is that the settings imported via the Open API spec stay and i develop the lambdas locally and push them via SAM. I then want to connect the function manually via AWS-Cloud-Console to the specific lambda, not using the SAM's yaml format. How can i deploy only the function, without destroing the API-Gateway Config everytime?
FYI:
I dont want to use the browser IDE to deploy / test my function.
I am using Node.js / Typescript
I've read the useless Documentation # AWS
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/scheduled-events-invoking-lambda-deploy-function.html
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/lambda-create-table-deploy-function.html
I know this question is similar, but doesnt solve the problem:
how to develop a lambda on SAM but deploy without api gateway
I tried uploading via ZIP File, but upon testing the function it always fails at finding the Entrypoint, even after ajusting the Entrypoint in the Cloud Console
Thank you in advance!
I'm considering using GraphQL with a Django backend service but I couldn't find much information regarding the API documentation. I need some solution to dynamically generate the documentation, perhaps like npm's graphql-docs with a result similar to GitHub's API docs.
Is it feasible to accomplish with graphene-django? If not, what's a good alternative for a python environment?
Yes, it's very easy to do by using GraphiQL, which is embedded in to Graphene.
The instructions on how to integrate this with Graphene are here in the graphene-python documentation. --- basically you need to add the parameter graphiql=True when setting up the API route in your urls.py file.
After it is set up, if go to your API endpoint in your browser, you'll see a nice interface for sending API calls, getting API responses, and reading documentation for both queries and mutations. The documentation is initially hidden on the right until you click on the "< Docs" link.
It might be a silly question for many, but why can't I instead
Create a view in django that takes a request and returns HttpResponse in, say, JSON format
Map the view to a URL
Hit the URL from my browser or another server and use the result?
Thanks.
EDIT - Two approaches: Import some djangorestframework or tastypie and build an api in my application which will throw json responses VS building a view and tell it to return json response. Is there any huge advantage of using the first one?
I think you could make the same argument about any extension library. It just depends on how much you want to rebuild and what the existing library has that would be beneficial to your project.
Many times I've created custom endpoints without an API library when working with ajax requests inside my project. For that instance, using an API package is overkill. But for having a full API server, Django rest framework offers a lot of functionality.
Sure, you can make views that do what you suggested. But at some point are you going to want to authenticate through an HTTP request? Are you going to want to filter? Are you going to want to make permissions, or just have all endpoints open? Are you going to want to protect against CORS?
You can kind of go down the list of all the features of an API library and ask these questions about what you want to accomplish with your project. If you're working with any type of external application and your django project is just for an API server, usually it's best to go with Rest Framework. If you just have some one-off endpoints to receive ajax requests, usually you just want to build custom endpoints.
I am trying to use the a curl command to add a API to the publisher site. I am using the sample code listed in the guide, but I am getting a timeout error code right away.
Here is the guide I am using: https://docs.wso2.com/display/AM170/Publisher+APIs
I am using the Add API call, with the youtube sample. Is there a bug in the example?