Can't find example nether in official site nor anywhere else.
Which key to use to attach yaml file to post request. For example, for xml is xmlBatch
Related
I want to implement custom metric API server to use with HPA. we have proprietary monitoring system that have client library in C# but all the implementation i saw online are in Go.
Is there a definition of REST API (request and response) that the HPA call? or this can be only in Go (for some reason)?
I can use this to create a proxy server between Go and my C# server but i rather go straight to my server from HPA
types.go files are the source of truth for Kubernetes API definitions. All other definition formats are generated from these files. You can find files with definitions of custom metrics API here:
v1beta1
v1beta2
Script to generate swagger API definitions can be found here but is probably not worth the trouble since the API is so simple.
"Is there a definition of REST API (request and response) that the HPA
call? or this can be only in Go (for some reason)?"
From what I was able to find the original API definitions in types.go are in GO code. For some APIs other API definitions are available, but they're all generated from types.go files and this particular API doesn't have any other definitions pre-generated because it's not an official part of k8s APIs. I'm not 100% sure but it certainly looks like currently GO is the only way to go.
I want to generate a swagger file for rest v2 connector in informatica cloud with these details.
POST CALL:
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Raw Body:
token=XXXXXXX&content=record&format=csv
But informatica cloud does not have an option of application/x-www-form-urlencoded.
I am able to do the same request in POSTMAN as POSTMAN has all the functionalities.
I even tried to put the Content-Type separately in the headers section while generating the swagger file in Informatica-cloud, but still didn't work.
Someone told me to use this website: http://specgen.apistudio.io for creating the swagger file, but the site does not seem secure and thus I cannot enter any sensitive data
Is there any way I could generate the file through a website or through informatica itself?
Swagger file cannot be generated for the header “Content-Type: application/x-www-form-urlencoded” in Informatica cloud.
What can be done instead is to use 'Curl' for the rest api call in the pre/post processing command in the Mapping Task/Data Synchronization Task. You can take a look at the curl commands in here:
https://www.baeldung.com/curl-rest
Other way if you want to avoid using Curl then, you can create a 'service connector' for the REST call in the application integration.
It is also possible to run data integration tasks from application integration if you want to run them after using the service connector.
The way it works is:
Create a service connector
Create the connection for the service connector
Create a process.
Inside the process, use various services. First service can run your API connection that you just made, then you can use other service to run a data integration task which is available inside 'System service: -> Run cloud task'.
This way you can make the work done without creating a swagger file as it does not accept “Content-Type: application/x-www-form-urlencoded”.
I'm using the Serverless framework, and I want to be able to reference my API Gateway URL in my acceptance tests.
My test environment is regularly destroyed and then recreated, so hardcoding a URL into the tests is not possible.
I can see there are ways to reference API Gateway as an AWS environment variable, but this doesnt help me to locally get the URL for my tests.
I was hoping that the cloudformation output would be referenced in the .serverless package, and accessible via json, but this doesnt seem to be the case.
Any idea how I can reference the API Gateway URL in my acceptance test files?
NOTE: These tests need to be run on AWS, not using a local server to mimic API Gateway
The serverless-plugin-test-helper plugin can help here. It will generate a YAML file containing all of the outputs of your stack. This includes a couple of standard ones - the S3 bucket that was used (ServerlessDeploymentBucketName) and the base service endpoint (ServiceEndpoint).
If you are using Node and have your tests in the same directory as the stack being tested then there's also a module to read this file. Otherwise, it's just standard YAML and you can use whatever tools are convenient.
Consider adding an APIGateway custom domain for your API. You can then use a known DNS name for your acceptance tests.
You will need to add an ApiGateway base path mapping, apigateway domain name, and a route53 recordset to the resources section of your serverless.yml.
I have my REST Service name getRates. Which accepts few inputs and gives out the loan rates. I wanted to use the API that I have with WSO2 Api Manager. I am not able to do it. I am not sure where and how to define the sample request/response code to check if my service is being hit or not. I have a URL to my Service but I want it to be used via WSO2 APi manager. Help me out with this
Question is too generic to give an exact answer. Please follow this guide to create a new API from scratch and add your backend service URL as 'Production Endpoint'. If you already have set this up and want to get an idea if the message flow is working correctly, enable wire logs as follows,
open log4j.properties file from a text editor.
log4j.properties file is located in /repository/conf directory.
Un-comment the following entry.
log4j.logger.org.apache.synapse.transport.http.wire=DEBUG
Get an idea about the wire logs from here. Explain the steps you tried already and mention if you get any errors.
/r1
|- POST <-- accidentally deleted, want to restore
|- GET <-- new method, will remove the POST from the previous deploy
One of the methods in one of our resources has been deleted. The resource is of course still in the most recent deploy, and we want to restore it so we can add, say, a GET method to the same resource.
If we just add the new GET and deploy, the POST will be removed. Is there no way to save and restore an API?
2017- You can now export a stage as Swagger + API Gateway Extensions (Stages > [your stage] > Export > Swagger + API Gateway Extensions)and import it through Actions > Import API
You can easily restore your AWS API Gateway from a previous deployment. Go to API Gateway and select your API. Then select Stages. Pick a stage that has the last version of your deployment that you want to restore. Select it and click the Export tab, and export the JSON + Swagger file. Then select the Resources tab and under actions click Import. Once you import your swagger file, your API Gateway resources will be restored to the version that was deployed to that aforementioned Stage. I hope this helps.
Unfortunately this is not possible. You may want to manage your API moving forward using a Swagger or RAML definition and using the API import tool. Doing so will allow you to treat your API definition like source code, with tracking and ability to revert changes.
We can restore the previous state of the API gateway by changing deployment. If any resource is deleted then we can't restore that resource under API gateway Resources. but we can restore the previous deployment state and Also, we can export the restored deployment state using the Export option in Stages. You can see in the image that we can restore by choosing deployment and click on Change Deployment.
You can also try to use the CLI tool to retrieve configuration details for your deployed API (Get-Deployment CLI).
aws apigateway get-deployment --rest-api-id "value" --deployment-id "value"
The output contains a field "apiSummary" which will show you some details about the api configuration.
Best,
Jurgen