What does consume an API mean? - rest

I am fairly new to APIs and I keep seeing this phrase "consume an API", and have looked it up however I am unable to understand it clearly.
To my understanding "consume an API" means I have an application, I am trying to retrive data from another external application. The API would be transforming the data for my application. Im just confused because it's saying consume an API, but wouldn't the API be consuming the data?
Please forgive me if I'm not making sense, this subject is very new to me and I am just trying to get a basic understanding. Please give me the longest answer you can. Thank you in advance.

Please refer to the defination of API https://en.wikipedia.org/wiki/Application_programming_interface
The API would be transforming the data for my application
Api won't be transforming the data for your application, rather your application would be transforming the data that an API sends, so your application is acting as a client and consuming the data.

Related

Google Classroom API with Swift

I am developing an education-related app and I am planning on integrating the Google Classroom API to import information about the student's classes and assignments. I already have Google Sign-In working, but I do not know where to go now. I cannot find any documentation regarding using the Classroom API with Swift. If anyone can give me some pointers on how to set this up, it would be much appreciated!
It doesn't look like there is a library to use Classroom in swift. You are going to have to write your own code to hit the API and consume the JSON. I would use something like alamofire to make the network requests for the JSON. Then use codables to parse the JSON. The google documentation is going to be your friend to learn how to hit the API. If you don't know what an API is this youtube video should give a nice overview. If it still doesn't make sense, keep researching REST API's.
Best of Luck!

Is it possible to use Appery to access data from Neo4J Graph Database?

I have a web application that has to be linked with a graph database (Neo4J). Is it possible to read or write data to Neo4J using Appery?
I have chosen Appery because I am a beginner when it comes to databases and Appery seems to be easy in using REST API, as well as there is a free trial.
Feedback would be highly helpful. Thanks in advance.
Edit: I am aware that Neo4J uses Cypher queries. I would like to know if Appery supports Cypher as well.
Side note: The reason I am asking the question here without trying it out is because I dont have an active DB and my application is private due to my company's security policy
You can do that as long as Neo4J database has a REST API. If it does, then you can make calls to it from an Appery app (from Server Code or API Express). Hope this helps.

How to setup a REST service with a result as hhtprespon on Hadoop

actually I'm using a big data Environment where I ingest and process data with Apache Nifi. The results a saved in an HBase table and I want to access the stored data with Hive. Now I want to setup a REST service to read from the HBase table. Example
get http://localhost:50111/userid/42 --> http-response { "userid": 42, "name": "foobar" }
I thought that this is a standard problem with a existing solution, but it isn't. The problem is, that I can not send the result as http-response.
First I try it with Nifi and the webservice is working, but only with static content such as "200 OK", or "404 Not found". So I try it without Nifi. I read and everybody was saying, that WebHCat is the tool to go, because it is the REST API tool for Hive. Great! But... the same problem: I can execute queries over a REST service with WebHCat and Hive on HBase, but there is no option to retreive the result.
With my current knowledge there is no ready-made solution and I have to develop my own REST service. Right? Really?!
Do I have to develop my own REST service, or what is the best practice in this case? Nifi? Hiveserver2? Additionally I want to secure the REST service with Knox and Ranger.
I hope someone could help me and show me the right(!) way to go, because I don't want to make something new and special, if there is a better or best practice solution.
thanks
~n3
#n-3 - You have a number of options here.
Have a look at http://hortonworks.com/blog/hbase-via-hive-part-1/ for a basic hbase interaction with hive. You are also probably better off looking at Phoenix for this sort of usecase http://phoenix.apache.org/.
If you do go the direction of WebHCat and/or HiveServer2 you can already process access to both through Apache Knox with access control provided by Apache Ranger.
In addition, Apache HBase has a REST server of its own which you can also access through Apache Knox and protect with Apache Ranger. http://hbase.apache.org/book.html#_rest
Hope this provides some help.

Calling import.io dataset created with "Chain API" via REST

I created a dataset using 2 extractors: a "many rows" extractor which is then called by a "just one row" extractor via the "URLs from another API / Chain APIs" option. This has given me the data that I need and I have saved it as a dataset. Although the dataset is working I'm lost as to how to use the REST API to retrieve it?
I'm aware that there used to be an "integrate" button on the dataset page which would outline how to use an external client library to get the data but in it's absence now I don't know which of the APIs to use and how to use them?
I've attempted at using the "Query Methods" GET call "/store/connector/{id}/_query" but it requires an "id" which I don't know where to find from? I attempted to use the "_connectorVersionGuid" value when I saved the dataset as JSON but that didn't work.
Any help and advice would be much appreciated.
Thanks,
AJ
AJ,
Francesco here, from import.io.
First of all, thanks for formulating the question so clearly.
I have bad news and good news.
The bad news is at the moment Bulk and Chain are only available as client side feature, so it's not really possible to call a chain with a single REST call.
The good news is that we are actually working on it :)
Bulk as an API is actually in beta testing, and I hope to have a Chain as an API as well.
A workaround I sometimes use myself is to use an external integration as a service platform, like Node-RED (http://nodered.org/) or built.io (https://www.built.io/)

If I want my iOS app to use a RESTful WebService that returns XML data, which APIs do I want to start learning?

I'd like to build in some weather functionality into my app and I'm going to be using the NOAA weather web service to retrieve the weather information. The NOAA website has a great deal of information on how the data should be requested and how the resulting data is structured. I'm new to iOS development, so I just need a little direction because I'm not sure which APIs I should be using to request and process this data. My questions are...
What's the proper way to request access to the user's location?
If the user allows access to their location, which APIs would I use to access it?
To make an HTTP request to the RESTful webservice, which APIs should I use?
To process/parse the resulting XML data, which API's should I use?
And if anyone can suggest any good examples online that demonstrate any of this functionality, that would also be helpful.
Thanks so much so much in advance for your wisdom!
For location data, look into CoreLocation
http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CoreLocation_Framework/index.html
For HTTP requests I like to use the ASIHTTPRequest class
http://allseeing-i.com/ASIHTTPRequest/
TouchXML makes it easy to work with XML data
http://code.google.com/p/touchcode/wiki/TouchXML
Just today, Luke Redpath posted a complete iPhone REST client he wrote. I can't vouch for it, I only saw today that it even exists. But Luke does good work, so I assume it's pretty decent.
See here:
http://lukeredpath.co.uk/blog/some-code-that-i-wrote.html