Is there an Acumatica rest API endpoint that I can use to test if there is a connection - acumatica

I would like to build an integration using the Acumatica REST API. However, before logging in or anything. I would like to know if there is a way to test that the server is up and running.
I've tried logging in and I looked at the swagger.json to look at all the endpoints but I think they require to be logged in.
I would expect a 200 response when the server is up and a 500 when the server is not. 5XX if there is server issues and an error if it is completely down.

There is no Test function that I know of. I would recommend doing a HTTP GET request on the endpoint URL. If the request succeeds it will return the WSDL schema with 200 success code.

Related

Serving a HTTP request response as a dialog response - Composer Framework

We are developing a chatbot to handle internal and external processes for a local authority. We are trying to display contact information for a particular service from our api endpoint. The HTTP request is successful and delivers, in part, exactly what we want but there's still some unnecessary noise we can't exclude.
We specifically just want the text out of the response ("Response").
Logically, it was thought all we need to do is drill down into ${dialog.api_response.content.Response} but that fails the HTTP request and ${x.content} returns successful but includes Tags, response and the fields within 1.
Is there something simple we've missed using composer to access what we're after or do we need to change the way our endpoint is responding 2? Unfortunately the MS documentation for FrwrkComp is lacking to say the very least.
n.b. The response is currently set up as a (syntactically) SSML response, this is just a test case using an existing resource.
Response in the Emulator
Snippet from FwrkComp
Turns out it was the first thing I tried just syntactically correct. For the case of the code given it was as simple as:
${dialog.api_response.content[0].Response}

Cloud run can't handle POST method

I just deployed an application into cloud run, but the application running in cloud run can't handle the request in the form of POST method and always returns 404 not found. After I checked the log, whatever request was given it was always translated into the get method. What should I do to prevent the given method from being translated like that?
the log:
Notice the HTTP 302 response on your POST. That means the client is being instructed to go to a new Location. Your client is then converting the POST into a GET and making another request at the new location.
Cloud Run only supports HTTPS. Your POST request is being sent to an HTTP endpoint. The Cloud Run frontend will automatically redirect the client to the HTTPS endpoint.
Change your request from using HTTP to HTTPS.

JMeter - API test Plan - Service unavailable. Please try again later error

I created an API test plan in JMeter.
(Post) Login Authentication API
(Get) API to search for data (Authenticated with the help of correlation)
The Login API works fine I am able to see the response. But, the Search API is returning an error "Service unavailable. Please try again later." with error code 500. My API request has got all the data required Can someone help me to fix the issue.
Thanks,
As per 500 Internal Server Error description:
The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.
This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response. Sometimes, server administrators log error responses like the 500 status code with more details about the request to prevent the error from happening again in the future.
So my expectation is that you should rather check your server logs to figure out the root cause of the problem rather than looking for a solution from JMeter side.
In general if something is wrong with your request the server should respond with 4xx status code
If you have another way of sending the "search" request you can inspect it and cross check all the associated data including:
URL
Headers (can be passed via HTTP Header Manager), pay attention to Content-Type one
Request body
The value you correlated which can be checked using Debug Sampler and View Results Tree listener combination

NodeJS spam GET - REST API

I'm new to this API, node fun stuff.
I just setup my node application for a school project and hooked it to a domain. Already it's showing some weird spam GET commands, should I be worried? Is it the server that is getting redirected to those spam sites?
Image to explain:
https://i.gyazo.com/a21b0acf9e3749f7ebabb2d1e6fed4d6.png
- Do not enter the link from the console.
Are these logs being created by your server code? I'm assuming they are, in which case, it is showing the requests being made to the server, the request method (GET,POST,PUT,etc.), and response codes per request that were sent from your server back to the requester.
I'm also assuming these logs are coming from your server code thats deployed on a machine and hooked up to your domain name, in which case, it means that requests were made at
{your_domain_name}/assets/title.png (http status code - 200)
{your_domain_name}/status (http status code - 200)
{your_domain_name}/w00tw00t.at.ISC.SANS.DFind: (http status code - 200)
/assets/title.png, /status, /w00tw00t.at.ISC.SANS.DFind: are all called paths and are the destination at which a requester would communicate with your server. Your server code should expose "endpoints" that requesters can interact with - often a SOAP or REST API.
If I've made too many assumptions or you have more questions I'll be happy to adjust or add input.

Azure's Mobile App Service URL response

Azure gives a URL of the App Service when an App Service is created in it. I use a URL Ping test (a feature provided by App Insights) in Azure to test the availability of my Mobile App Service. I ping the URL of the app service and check for a 200 HTTP response. If I receive 200 response, I decide that the test has passed. However, recently I noticed that the URL was giving me a 200 response, but the site gave me a message saying 'Critical service is unhealthy'.
This was a problem for me because I thought 200 was synonymous with 'everything being OK'. I want to know whether the URL will always give a 200 response and it is only the text message appearing on the site which will say whether the app service is running fine, unhealthy or down. If not, what are the different cases in which the URL responds with 200 HTTP code?
EDIT:
I think I couldn't clearly communicate my need in the question. I will try to do that now. The fact that I need to go through the diagnostic logs to debug the issue with my mobile service is clear to me and I am not asking for help on that front.
I am using the URL Ping Test to test the outside-in availability of the mobile service (synthetic availability check). Now, I check for the HTTP response 200 and deduce that the mobile app service is available. Now, that I have discovered that 200 is sent even when the app service is unhealthy, I need to modify my test. How can I do that to ensure that my availability test fails in such scenarios?
Additionally, the following is the webpage of the app service URL when all is fine. This webpage gives a 200 HTTP response.
Now, is there a place where all the different webpage display of the app service URLs and the corresponding HTTP response codes are compiled?
A "URL Ping Test" is more than just a test for 200 - it will also (optionally) try to download all the images and files, do content matching, and retry if a failure is encountered.
Firstly, make sure you have a home page. The home page can be turned off - that is dependent on your site. Also, as #Alex suggested, turn on diagnostic logs and see what the error is produced. Use Postman to send a request to the home page and see what you get back.
Now, got the idea, i think. For being able to do what you want, i would offer you to customize a little your URL web test as described here. If your web app returns 200 OK, and you suspect that there is something wrong, use the payload of the response. For example, if the payload of the response is not equal to "everything is OK", even if that is 200 OK the test should fail. I think that for now it is the only one way to implement that using URL tests from Appinsights.

Resources