HP QC REST API for postman rest client - rest

I tried to connect HP QC using postman rest client
The followig URL(Example)
http://qc-server.com/qcbin/rest/domains/DEFAULT_773497139/projects/773497139_DEMO/defects?username=username#gmail.com&password=mypassword
It throws error as follows
**Authentication failed. Browser based integrations - to login append '?login-form-required=y' to the url you tried to access.**
when i tried adding the parameter login-form-required=y it goes back to login page how to store session and fetch data through rest api using postman rest client.

Choose Authorization type as BASIC and Enter credential and Click Update Request.
Postman snap:

Related

401 Not Authorized error in soapUI but web service works perfect in Postman

As the title states, when I send a request from soapUI to an SAP web service I am returned with an XML that contains a "401 Nicht autorisiert" error message in it. Since it is an SAP web service, I do have to input credentials when I create the new project, but those are the only credentials I have input before running the project.
With the same credentials, I am able to create a request and not receive an error message when I use the Postman interface.
Could this be an issue with the web service configuration, or is this an authorization issue with soapUI?
Links to images:
SoapUI: https://imgur.com/2ZOBMgZ
Postman: https://imgur.com/M1SOCgG
From your images it looks like the Authorization: Basic... header is not being sent as part of your HTTP request out of soapUI and I assume your service doesn't challenge for the credentials in a way that soapUI understands.
One way around this is to click the Authenticate pre-emptively radio button on the basic authorization dialog box. This will construct and send the header the same way as Postman.

WSO2 API manager returns binary response

I am very new to WSO2 API manager and trying out my very first simple restful api. which returns json response and has no security since it is an internal api.
I installed WSO2 API manager locally and trying to call the rest api on my dev server which uses http and no security as I mentioned earlier.
Here is how my get url looks like:
and here is my url looks like for production and sandbox environment:
I don't have any message mediation enabled.
I went to the API store and created a trial application (so that I can get the access token. Eventhough, my dev environment api has no security, I was reading that for throttling and other purpose, I need to pass bearer token to the WSO2 api OR it will reject the request.)
When I am trying to consume the api, I get the following binary message.
Is there any way I can see the proxy log on WSO2 server so that I can see the request and its header sent to my dev server?
How can I fix this binary response to get the proper json response?
I searched all over and can't find solution to it.
You can use below steps on WSO2 ESB or APIM to enable Wire Logs.
Uncomment below line in /repository/conf/log4j.properties
log4j.logger.org.apache.synapse.transport.http.wire=DEBUG
Restart Server.
Source - http://lakshanigamage.blogspot.com/2015/03/how-to-enable-wire-logs-in-wso2-esbapim.html

WSO2 API Manager - How to proxy a SOAP Service that has a basic Auth

Using wso2 api manager. I cannot publish an existing SOAP service that has a basic auth (in the back end). The publisher interface let you insert the wsdl location, but obviously it requires a basic auth (in fact i have a 401 error in the log).
I tried to put username and password in the url like https://username:pwd#server... but it does not work.
Thank you

debug rest call in wso2 api manager

I am connecting rest api call with wso2 api manager. I followed the steps from wso2 site
I am able to connect with rest api on my computer but following same procedure on another computer returns "Error: No Response from Server"
I had also configured the files as described here
Does anybody knows how to debug what is going wrong there ?
You can enable wirelogs and headers in API Manager to analyze the request response flow.
Open log4j.properties file in /repository/conf directory.
Uncomment the following loggers.
log4j.logger.org.apache.synapse.transport.http.headers=DEBUG
log4j.logger.org.apache.synapse.transport.http.wire=DEBUG
Save the changes and Restart the Server
Invoke the API.
Regarding your "Error: No Response from Server" response, other than the CORS issue, this can occur due to browser certificate issue as well.
Therefore, first check whether you can invoke the same API using a rest client like curl,
if yes
go to your browser, accept the certificate for the gateway URL and try out invoking the API again.

calling rest api from meteor app

How can I call a rest api with authentication from meteor, appreciate if you can guide to an example, I have added the http package to the meteor project. Using advanced rest client chrome app, I am able to get the data by passing the following URL and 2 headers. This app is using the already logged in browser session.
URL: https://xxxxx:9443/ccm/oslc/contexts/_ZoC0QNS3EeGPlow7Bl9IAw/workitems
headers: Accept", "application/json"
OSLC-Core-Version", "2.0"
How can I pass the headers and user name password of the rest api service.