Rest API and chef [closed] - rest

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am working on a project where in I have to build a rest api and will be using chef at the backend. How can the integration between chef and a rest api be done? For eg: I will be having chef recipes on the chef server. So how can these recipes be invoked from the rest api? Also what is the best language that can be used for developing a rest api?

There really isn't much information in your question to go on, but it seems like you may be conflating a few different concepts.
The Chef server is the central location to store your cookbooks and other config data. You do not "invoke cookbooks" on it. Though cookbooks can be uploaded to the Chef server, nodes running the Chef client are the ones that would "invoke" a cookbook. You can read more about the Chef server on the Chef website.
As far as integration between the Chef server and a RESTful API. No such "integration" needs to be done, the server already provides with one. You can see its documentation on the Chef website. You may be specifically interested in the /cookbooks endpoint:
The /cookbooks endpoint has the following methods: GET.
The GET method is used to return a hash of all cookbooks and cookbook versions.
Finally, what the "best" language for a RESTful API is an matter of opinion and depends on your needs. A similar question has been asked and closed for that reason previously.
If you're just getting started, you may also find this question about what RESTful programming is helpful.

Related

With Java, how would I use the JasperServer Reports REST API to deploy an input control to the server? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have been unable to get Tibco support to come up with a solution for this, so I am thinking it is not possible, even though they document that it is.
I want to:
deploy an input control to the JasperReports server,
putting it into a specific folder,
using Java and their REST API,
and then list all the input controls back through a HTTP request
(return a full list in json or xml)
Requirements:
Language: Java
API: JasperReports Server REST API
Authentication: POST
Then any HTTP method after the authentication via POST to send a JSON file to the server that defines and deploys the input control.
artifacts:
A single .java file (using built in JDK libraries, or minimal dependencies declared in a pom.xml)
pom.xml
To understand this, I am hoping to find a bare bones solution that uses low level HTTP calls (no frameworks other than any HTTP client in Java).
I have searched, read the manual (it's horrible), many documents, so many things, and logged a support ticket with Tibco, and they are unable to find anyone in the company that can do this.

Language for REST API [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I just wanted to know what PROS and CONS are there when reading REST APIs using Javascript, Pyhton,... what language do you recomend for this task?
I've tried with Python 3.4 but I don't think it is the best decission. I've also tried with Postman but I didn't succeed and I don't want to use google tools.
Thanks
Your question for pros and cons has been already answered by different person in this question.
Basically an application will have front-end and back-end app. All the data logic will go to back-end service and all the view logic (optionally, with some data logic as well, based on project.) will go to front-end service. Front-end applications basically needs data to show to the users which it gets from back-end service (aka api). This communication between front-end and back-end needs to follow same protocol. REST and SOAP are two most popular protocols but I recommend you REST.
Now there are many more REST frameworks like, Ruby on Rails, Django that helps you build back-end service following REST protocol. And then there comes front-end app. Basically, javascript frameworks like angular, react are mostly used to build front-end app. It has advantages over manipulating JSON object response from REST web service (REST api).
Postman is a tool that helps you test REST api's. If you have api-endpoint (like, https://jsonplaceholder.typicode.com/posts/1) and method (like, GET) then you can use postman to GET response from that api.
Front end application adds logic to these response and helps user to visualize the data.
And at last, don't hesitate to google. Because it's all about googling-stackoverflow.

why many aws service didn't provide the RESTful API but only the sdk? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I studied Amazon web service API reference, I found many services (EC2,Cloudwatch) only support the programming SDK, java/python and so on. Only little services provide RESTful API, such as S3.
I think Restful API is more easier to use than programming SDK. Why Amazon didn't provide the Restful API?
Some may say it just comes down to opinion... but imo, there's no reason to prefer lower RESTful API over SDK, when your language of choice has one.
The SDK's are hand-crafted by AWS to get the most out of their API's (and who would know how to do so better than them?), and give you abstractions that you can take advantage of.
For anything besides a trivial project toying around with AWS, choosing to work with the lower-level API's means that you will end up re-implementing many things the SDK's give you out of the box, aka reinventing the wheel...
The SDK's are there to get you productive and working, fast.
I agree that REST APIs are preferable to SDKs but, actually, all of the AWS services do expose an HTTPS interface, they're just not "RESTful." They call it the "Query API."
http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/Using_Query_API.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-query-api.html
Well, in fact, all services of AWS in the SDK communicates with POST/GET.
In the documentation of the AWS services, they provide the url of each action.
The only thing you need to do is read the documentation.
See this S3 documentation which you can see how things works:
http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html

Hosting service for PHP REST API and scheduled service [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 months ago.
Improve this question
I have implemented REST API using PHP. This API access to MySQL Database.
I was looking for hosting services but I'm not sure where to start, majority of this type of services is referring to Web Hosting, which as I understand is not what I need.
Can anyone suggest any free or cheap service that will support my requirements?
I also need the possibility to schedule service which will periodically access REST API. This one is not implemented yet, because I'm not sure what kind of languages/frameworks are usually supported by the hosting service.
Any help is truly appreciated.
I think that a regular web hosting account would actually work just fine for what you need. If you think about it, the only difference between your RESTful API and any other website is that your API does not return HTML, but rather returns data that is encoded to be consumed by another program instead of a human user directly. From a hosting perspective, though... there really is no difference. There are lots of companies that provide PHP/MySQL hosting out there - for example, Dreamhost. Lots and lots of options.
Do you need the database itself hosted or just the PHP? If the latter, most any web host with PHP will do what you desire. If the former, you'll need a database host as well as a web host.
As long as the hosting provider supports HTTP requests like DELETE,PUT,etc and you are using them in your REST application/service then you are good to go. So just ask for a confirmation about this.
If you need php + MySQL hosting then go for web hosting
And for shedule service you can use cron jobs
In cron job u can select an php script and interval of running it automatically
It will automatically execute after given interval of time

Looking for a REST-based remote filesystem [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
This is a very open/general question (I hope not too general anyway:))
I'm looking for a library/module that could be plugged in a web server (like apache) and handle REST requests to store / retrieve / delete files.
Something like Amazon's S3 or Windows Azure storage, but open-sourced.
Does such a thing exist?
mod_dav? DAV is the original generic/bare-bones REST. You PUT files, then you can GET them back or DELETE them... But that doesn't provide any management by itself, and maybe that is that you are looking for. Have you looked into OpenStack, specifically the object storage component?
There is OpenStack SWIFT which is open source clone of the Amazon's s3. It is lineary scalable and provides REST interface to the data. http://swift.openstack.org/
I solved a similar problem using Node-FSAPI, a NodeJS-based server that exposes a selected part of the file system as a REST api. (It's not an Apache module like you asked for, but it solves the same problem.)
Are you looking for a distributed file system at the same time? If so I suggest using Apache Hadoop's HDFS and the WebHDFS REST API to access the file system.
How ever I am not sure whether this can be deployed as an extension to Apache or any other web server :-( Just wanted to share this idea, if you are looking for a distributed file system with guaranteed reliability etc.