IBM API Connect Test and Monitor giving Invalid Request error - apiconnect-test-monitor

I am trying to use API Connect Test and Monitor tool wherein when I gave a Get request and url and with and without authorization token, I am getting this error:
Error. Invalid Request
When I do it using Postman, I get a proper 200 OK response (with and without authorization token).
I have tried for POST request also. Same works in Postman but not in IBM API Test and Monitor.

The IBM API Test and Monitor tool is a cloud-based service. Hence, it can only be used to query endpoints that are publicly available on the internet.
localhost refers to the user's computer which does not normally expose any TCP ports to the wider internet.
You can, however, use the IBM API Test and Monitor desktop app to query localhost

Related

How to trace the Api Proxy requests without using the Test console on API Gateway?

I would like to trace real-time requests coming to my API Proxy in azure. There is a facility to trace using the Test console on the API Gateway as per the article below.
https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-api-inspector
But I would like to trace the request when clients sending from their applications or when sending requests from POSTMAN.
There is a similar facility in Apigee Edge to enable the trace at runtime.
Does anyone have idea how to trace realtime API Proxy Requests?
Thanks in advance for your help.
You can enable Azure doagnostocs and use Azure monitor.
Check the below for how to and what data will be logged.
Please look at the below
https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-app-insights
https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-use-azure-monitor#diagnostic-logs

What App server to use for json and soap API

I am trying to select a app server platform to service JOSN & Soap POST requests from client app on Desktops. The app server runs on linux and use PHP code.
I searched and found PHP framework but that doesn't give you easy to use auth user/password, so you have to do the auth in app code. What is to use for simple request/response app server with secure auth like user/password on first request and then token like normal web servers.
Currently using Drupal 7 REST services module to handle request auth, but SOAP has security issues. Looking for better and light weight framework.
For your API : https://www.drupal.org/project/jsonapi (it's gonna be implemented in 8.7 anymay)
If you have an external authentication provider (like keycloak, azureAD…) : https://www.drupal.org/project/oauth2_jwt_sso
If you don't : https://www.drupal.org/project/simple_oauth

Can't connect device to Fiware Sigfox IoTAgent

I am trying to send messages from a device that uses Sigfox to the Fiware system and I am having some troubles.
I see in the sigfox backend that the sigfox cloud receives the messages but when the callback is executed I get and error.
In the sigfox cloud it says:
Error 404 - Not found
And in the log of the server:
No context element found
The callback I use is this:
Get http://IP:17428/update?id=sigfoxtest&data={data}
I can see that the device exists on the system. Also I have tried creating different devices and sending the information with different urls but I always get the same error.
Thanks.

Kubernetes pod exec API exception: Response must not include 'Sec-WebSocket-Protocol' header if not present in request

I am trying to setup a websocket connection to the Kubernetes Pod Exec API, based on the suggestions given in this SO post: How to execute command in a pod (kubernetes) using API?.
Here's what I have done so far -
Installed Simple Web Socket Client extension in Chrome.
Started kubectl proxy --disable-filter=true to run proxy with WS connections allowed. kubectl.exe version is 1.8.
Used address ws://localhost:8001/api/v1/namespaces/default/pods/nginx-3580832997-26zcn/exec?container=nginx&stdin=1&stdout=1&stderr=1&tty=1&command=%2Fbin%2Fsh in the Chrome extension to connect to the exec api.
When I click connect, Chrome reports back an error with the message -
Error during WebSocket handshake: Response must not include 'Sec-WebSocket-Protocol' header if not present in request
Apparently, kubectl is sending back empty Sec-WebSocket-Protocol header in the response and Chrome is taking offense to that.
I tried changing the code of Simple Web Socket Client open method to send empty protocols parameter to the Websocket client creation call, like - ws = new WebSocket(url, []); to coax Chrome in sending empty header in request, but Chrome doesn't send empty header.
So what can be done to directly connect to the exec in Chrome?
This is a known issue; kubectl proxy does not support websockets. (You can verify this easily by starting up kubectl proxy and then attempting kubectl --server=http://127.0.0.1:8001 exec ...; you will receive the message error: unable to upgrade connection: <h3>Unauthorized</h3> if the filter is enabled and Error from server (BadRequest): Upgrade request required if the filter is disabled).
The confusion might come from the fact that the kube-apiserver proxy does support websockets, but that proxy is different from the kubectl proxy.
As I see you have 3 options now (in order of difficulty):
Access kube-apiserver directly. You will likely need authentication that kubectl proxy is handling for you now
Use SockJS, this is what Kubernetes Dashboard does for the exec feature
Fix #25126
After reading the code in https://github.com/kubernetes-ui/container-terminal/blob/master/container-terminal.js, found that exec uses base64.channel.k8s.io protocol. The Simple Web Socket Client code wouldn't have worked because of this and also that the stream communication is in base64, not plain text.
Leaving this as an answer for other folks trying to implement a WS based terminal emulator... as #janos-lenart mentioned, the code is pretty new and there may be issues using it in different browsers, best bet at this point is to read example code and start from there.

The authentication header received from the server was 'NTLM,Negotiate'. in windows store apps

I have developed an Windows Store App consumes WCF service deployed in another server(not mine) everything works fine until i have disabled the Anonymous Authentication to off getting an error message
"The HTTP request is unauthorized with client authentication scheme 'Anonymous'.
The authentication header received from the server was 'NTLM,Negotiate'."
I have googled and found some of the solutions applied but none of the solutions worked for me.The same WCF service accessing in another project it works fine no complains but when i'm using with windows 8 store apps i'm getting the above error.
Any Solution or Explanation is much appreciated.
[Hi Dinesh Haraveer,
Please try using Enterprise authentication.
Windows domain credentials enable a user to log into remote resources using their credentials, and act as if a user provided their user name and password. The enterprise Authentication capability is typically used in line-of-business apps that connect to servers within an enterprise.
You don't need this capability for generic communication across the internet.
Please try looking into http://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx