Does a description file exist for coap services? - protocols

Is there an equivalent of WADL or WSDL for COAP? APIs for Rest services like Restlet have functions like addQueryParameter for Request which can be used to make the request JSON after knowing the query or path parameters through the WADL. But COAP just gives and takes strings. So what delimiter is used to separate different parameters? Shouldn't a description file be giving information about this?

Related

can i use one backend request for couple endpoints?

http://localhost:4200/product-list?gender=2&category=4
http://localhost:4200/product-list?gender=2
http://localhost:4200/product-list?category=4
i want to use one backend controller for the endpoints.
can i do that? i tried but with no success. (using angular)
What exactly did you try with angular? The backend controller? Angular is a frontend framework.
However, you could indeed have one single controller (e.g. ProductController) for your endpoints. I would suggest implementing a "getProducts" method that can be filterable. That way you can use single endpoint and provide optional filter options as needed.
I may not understand your question entirely, so please stat otherwise. But, Yes. You have one endpoint stated above, with different query params. Depending on the different query params (their value or even if they are present), your singular endpoint can do something different.
So your endpoint is
http://localhost:4200/product-list
This endpoint (which there is only one), can have as many query params as you like. As per the response above, Angular does not handle this, this would be some backend functionality for your end point, to read the request, and based on what query params are 'found' then trigger a different response.

Azure Remote Monitoring - How to add parameters to CloudToDeviceMethods?

In Azure Remote Monitoring, you can create your own CloudToDeviceMethods. How do you add parameters to those methods?
Usually those methods look like this:
function main(context, previousState, previousProperties) { ... }
...in a .js file that has the name of a specific method. But I don't see how I can add parameters to a method like that. I also want to see those parameters in the Azure Remote Monitoring Solution Accelerator web, so I can call that method and send in some parameters.
A CloudToDeviceMethod supports exactly one parameter, and that is the JSON payload that you can give to it. Of course you can add many properties to that payload to act like separate parameters. On the device side, reading that parameter looks like this in C# and like this in JavaScript (Node example)
You mentioned that you want to be able to add those parameters in the Remote Monitoring Solution Accelerator. This is entirely possible with some changes to the ReactJS code. The main files you need to look at are the Job page, right now it calls the device method without a body. Eventually the request is built here, you can see the JsonPayload is left empty.

Can API.AI take input other than JSON?

I'm new in Dialogflow and I have a report in the XML format, which is generated from my internal application. I want to use that XML file data as an input for my Agent (created in Dialogflow). Is it possible?
Yes, this is possible. What you would do in your fulfillment webhook is something like the following:
Determine which Intent was called and any parameters you may need to make the call to your internal application.
Call your internal application using REST or something similar. If you're using something like node.js, you'll need to do this as an asynchronous function with Promises.
When you get the results back, present them as part of your response.

Generating object structure from SOAP WSDL

I need to call a SOAP service and I'm having trouble comming up with the correct input parameters for a call. I inspect the WSDL and it seems - to me - like the nesting for the input goes deep (looks like I have to send a very complex data structure to get a result).
I was thinking, isn't there a program or a way i can have the WSDL parsed and display the object structure? It's for a nodejs project, so i can't just import the WSDL and have Java generate the objects. If i could somehow get type completion in my editor VSC, that would be great, but i just need some way to display the hieraki.
Would importing the WSDL into a testing tool like soapUI get you what you are looking for? You could then see the structure of all of the requests expected by the web service endpoint.

Can Azure Functions be used with URI path IDs?

I am wondering if it is possible to configure an Azure Function App to accept a URI-path ID as is typically used in RESTful services, e.g. /api/foo/1, where the function is foo. I haven't been able to find documentation on this and the binding information that I have found suggests that this isn't possible (I don't see a way to map it). It doesn't "just work" with the typical HTTP trigger (which supports /api/foo?id=1). In that configuration one receives a 404 response, I'm guessing because it doesn't know to call the foo function with the ID suffix in the URI.
In case it matters, I'm using C# to write my function.
You are correct that URI parameters are not supported at this time. If you'd like, you can create a feature suggestion for this here in our repo. Thanks :)

Resources