DocuSign connect - docusignapi

I do not know if I missed this information, but it seems to me that nowhere is written what the REST listener should return when it is called by the DocuSign connect.
Should it return a kind of formatted response?
Thank you,
Marco

DocuSign Connect will send an HTTP POST request to the endpoint that you specify for the Connect configuration settings. When your "listener" application that resides at that endpoint receives a message from Connect, it will automatically respond via normal HTTP request/response semantics -- you shouldn't have to do anything (from a coding perspective) to make this happen, since it's just normal request/response behavior for a web application.

Related

Submit telemetry via gateway mode on HTTP & MQTT adaptors

I can create things, set up connections and apply the connection policy to the thing so I can submit telemetry from a thing via HTTP and MQTT and receive it on my MQTT server/connection. I've got all this working.
But when I try to switch to using gateway mode via HTTP or MQTT adaptor it no longer works.
I'm not sure how to authorise a thing to act on behalf of another thing.
When I use the HTTP adaptor I get "gateway unknown, disabled or not authorized to act on behalf of device".
As Kai Hudalla pointed out the when registering a device you can set the via property to authorise a gateway to act on it's behalf and its documented at https://docs.bosch-iot-suite.com/hub/general-concepts/gatewaymode.html

Making unavailable my rest service out of my domain

I have a webservice working on a domain say www.abc.com . I want to configure my server so that none of the request coming from another domain (except from www.abc.com) will be accepted. I should not use user authentication or anything related to token based authentication. So, the only option i can think is CORS but i do not exactly know how to use it. Any help would be great.
I am using nodejs and express
Don't set a CORS header. Done.
To address your comment: Postman doesn't make Ajax requests, it makes requests. If you don't indicate in Postman that it's an Ajax request, it's just a standard client request.
See also how Postman send requests? ajax, same origin policy for some more details.

How to confirm HTTP request including header, body and url parameter in azure mobile apps

Hi I have a question about azure mobile apps.
Can I confirm HTTP request including header, body and url parameter in azure mobile apps when troubleshooting?
If yes, how can I confirm that?
For example, let me assume that client send a HTTP request to azure mobile apps, and a the response is bad request(status code 400).
Then I would like to figure out the cause.
First of all I set [Diagnostics log] - [Web server logging] as Storage in portal.azure.com,and confirmed the IIS log.
But there is no header, body info in the HTTP request.
So I did not find out the cause by that log.
Finally problem is solved by client logs by taking fiddler and cause is wrong info in body of the http request.
Above all, by taking fiddler log in client side, I was able to solve the problem but I would like to know if there is a way to confirm http request's header, body and url parameter in azure mobile apps side.
You can log the inbound query on the client or server side, or use something like Fiddler. For the server side, just use regular methods for Node.js or ASP.NET - nothing special is needed. For the client side, I documented the process for all platforms on my blog. Although the documentation is for adjusting the HTTP request, it's the same recipe for logging.

NodeJS API - Broker Service Pattern to cause internal API redirection

We are currently working on a nodejs application which hosts API's (includes both get and post HTTP methods). These server API's in nodejs server are individually accessible or allowed to be called. Like /api/login (login api) is allowed to be called directly from clients.
Next, I want to introduce a service broker API which should be entry point to all API calls from client side. So, any client calling a specific API such as /api/login should go through service broker and then service broker should re-direct to requested API based on the specific service details as sent by clients.
Thereby, all clients should only be able to call only one API (i.e. broker service API - /broker/service). So, all requests from clients should first hit service broker API and then service broker should redirect to appropriate API's based on the input parameters passed to service broker from clients. Input parameters could contain the API URL and input data.
Currently, I'm able to connect directly to individual API's from clients. But, now I would like to introduce a new layer namely service broker and that broker service should decide which API the request should be redirected along with input data (sent from clients).
Note: Both broker service API and other functionality specific API's are hosted under same domain. So, there will not be any CORS issue. We are using "express" node module for handling HTTP API requests.
My initial question is whether this requirement can be achieved?
If yes, then can we perform internal redirection of API's in node server?
Can this be achieved with express node module?
Please help me in this regard.
If you really wanted to go this route, you could do something like this:
app.get('*', function(req, res){
the_route_passed = req.originalUrl;
//handle all of the routes here in your api function call.
});
What this will do is for every single route passed from the front-end will go through your function, and then you can grab the route that was passed req.originalUrl will be like /api/users/230 for user 230. Then you'll need to parse the route or however you want to do it and pass it through to your service broker.
This would be the best way to deal with not having to change anything on the front-end if you are already using Routing. The other way which might be better in the long run:
Send JSON on each request and configure it however you want, and then when you receive it you can figure out all the routing from the JSON request on each go. You'd have to rewrite all routes on the front-end to do this though which might be too much work.

DocuSignAPI call Connection Refused

I am recieving a "org.apache.http.conn.HttpHostConnectException: Connection to https://demo.docusign.net refused" exception when trying to connect to start the embedded signing envelope request using serverside java HTTP call with a proxy server in between.
Is there a limitation of the number of requests per hour?
DocuSign imposes a limitation of 1,000 API calls per hour for an account. See the DocuSign API Best Practices Guide for information about this limitation: http://www.docusign.com/sites/default/files/SOAP_REST_API_Best_Practices_with_Connect_Guide.pdf.
I was using a HTTP proxy instead of a HTTPS proxy, the proxy in between me and docusign was causing the issue.

Resources