I am looking for a way to discover a USB zstick "/dev/ttyACM0" using OpenHab command line interface as I am not going to be using a GUI and I need to create a script to automate few things.
In their website here and here OpenHab have some documentation, and that's what I found for discovery:
GET /discovery
POST /discovery/bindings/{bindingId}/scan
however I was unable to make that into a useful curl command. any idea on where to start?
I would suggest to try out the REST Documentation, for finding the right endpoint/expression.
You can install it through paper ui:
It will then be available through <YOUR_OH_IP>:<PORT>/doc/index.html.
It provides some ui with explanations and examples for the endpoints and you can test them live through it.
This should help you find the correct rest call to use with curl afterwards.
I don't know if adding devies through REST is possible. If so you can find it in the REST Documentation.
If it doesn't work though the REST API you might want to write a small bash script which adds the things you want. Then you can call your script with
executeCommandLine in a rule
Related
I am new to openbmc and trying to understand the basic details.
As I am checking docs, I found two docs, REST-cheatsheet.md & REDFISH-cheatsheet.md
They both are using the curl to get and set the entries in openbmc.
But, the path used is different.
REST-cheetsheet.md uses, xyz/openbmc_project as path but REDFISH-cheatsheet.md uses redfish/v1/ as path to get details.
If we get same details with both what exactly is the difference??
ALso I need to populate the /redfish/v1 details, how to do that??
Thank you in advance.
When OpenBMC first started, Redfish had fairly minimal industry buy-in so OpenBMC made a dection to make a custom REST API to manage itself. This is the "REST-cheatsheet". After a few years, Redfish via the DMTF began to mature and get a lot more industry buy-in. The decision was made within the OpenBMC community to deprecate the REST interfaces and move to being a Redfish managed system.
There's actually a commit up for review that would disable the REST based interface by default (https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/29344).
Try and utilize Redfish for any work you're doing, it's the direction of OpenBMC from an out of band management perspective.
Redfish is defined and secure.
The REST API is deprecated, mostly; just go with the future and that is Redfish.
I need to call ResolveCustomer and GetEntitlements services using aws-sdk-go. There is no code samples available on how to configure the aws clients for such calls.
Can someone help with the go code examples?
It will be helpful if someone has done unit testing for such calls; in terms of how to mock the ResolveCustomer and GetEntitlements API calls in golang?
The MarketPlaceMetering package's New function, https://docs.aws.amazon.com/sdk-for-go/api/service/marketplacemetering/#New, has a short example of creating a MarketPlaceMetering client.
GetEntitlements is part of the MarketplaceEntitlementService package, so see that package's New function, https://docs.aws.amazon.com/sdk-for-go/api/service/marketplaceentitlementservice/#New, for a short example of creating a MarketPlaceEntitlementService client.
For more info on configuring the SDK, see https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/making-requests.html.
Note that these are both in the V1 version of the Go SDK. Feel free to browse the V2 version, https://github.com/aws/aws-sdk-go-v2, which has some differences in how you create a client (you should be able to figure it out from the DynamoDB example there).
I am interested in learning to use the Smartsheets API. In the past I created workflows in Google Apps Script, which has a built in IDE that houses the script. Does Smartsheets have something similar? If not, where is a common place to keep your code and have it react to webhooks/events?
Regards,
Shawn
The API is just a way to communicate between your application and Smartsheet - there is no hosting for your executable code. Smartsheet provides a number of SDKs to help make the calls easier to perform, but in theory you could use any language to make the REST commands. So, pretty much any service that allows executable code would work, such as Amazon AWS, Google Cloud, Microsoft Azure, or others. Here's a brief comparison of services.
You can start developing on your own computer before you worry about cloud deployment. See the getting started guide and samples here: https://github.com/smartsheet-platform/getting-started
If you really need to respond to webhooks, your code will have to run somewhere that accepts incoming HTTP calls from the Internet without being blocked by a firewall. This could be in your data center, any of cloud services, or via a tunnel such as https://ngrok.com/
Unable to get Requirements coverage information from QC 12 via REST api?
I am using QC 12 in my project. Can anyone tell me is it possible to get test coverage information from requirements via QC 12 using REST api?
Rest api is preview version and not fully available as OTAClient api. Many functions are not available. Few enhancements are made in 11.5 and 12.0/2 but still it lacks many of the function. Better you use OTAClient which is full fledged api to communicate with HP.
Only requirement traceability links are added in rest version of 12.0/2
there is a possible workaround for that. First point should be the usage of a QC version higher than 11.
Having said that, it is possible to use a call to "requirement-coverages" and check for the required "required-id", for instance:
1)
GET https://SERVER/qcbin/rest/domains/DOMAIN/projects/PROJECT/requirement-coverages?query={requirement-id[10];}
This will give you back an xml file (in case requirement exist) with a list of "test-ids" linked to that requirement.
Already at this point you have the knowledge of "test-coverage"--> each test cases will have his own "pass or fail".
2) If you are looking for a specific test-id, then you can check if in those test-ids is available the test-id you are looking for.
Hopefully the command above solve your query. I know that this is quite late reply, but hope to help somebody else! Have a nice day.
Try this api. You will get all the requirement to requirement mappings.
http://SERVER/qcbin/rest/domains/DOMAIN/projects/PROJECT/req-traces?login-form-required=y
Also if you need a list of all the api's exposed in REST, use the below link:
http://SERVER/qcbin/rest/resource-list .
i am developing a website where i intend to provide the search feature. I am developing it in PHP/MYSQL and i have written the script to perform the search. I wish to provide autocomplete or suggested searches option in the search box as the user types, can i know what are my choices and how can i make use of them?
I had tried YUI Autocomplete, it looks good to me, however i do not understand when it says using a local proxy for the datasource. Can any one help me out here?
Consider trying the Scriptaculous autocomplete. It's very easy to implement.
what does it exactly say on the documentation? (can you provide a link)
by local proxy I would think it means a proxy to a remote web service or API on another domain. (you can't make requests unless scripts are executed on the same domain). http://developer.yahoo.com/javascript/howto-proxy.html
I used jQuery autocompletex