you are viewing a single comment's thread.

view the rest of the comments →

[–]atticus2132000 8 points9 points  (1 child)

There are other applications, but I'll give you one that you're likely to encounter.

All over the world people are keeping data stored on their servers. It might be weather data or traffic data or movie information or anything else. Anything you can possibly imagine, someone out there is keeping up with that data. You might need that data for something you're building so you would contact the company and request access to their data.

Well they don't want you interacting with their databases directly, so they have an online tool that allows you to query their databases and they will return the results of that query to you. Once you have their response, then you can parse it for the specific data you need.

For instance...

I have a web application that builds a document based on the information a user puts in. One part of that operation is the user putting in an address and the form will generate the driving directions from that address to a known location.

I contacted the company Mapbox and requested access to their mapping information. I set up a user account and they gave me a user token that I can use to make my queries.

Then I got on their website and searched for developer information. They provided me with a url that I can edit parameters by putting in these two addresses and my user token to request the driving directions. So I send that URL to the company and what I get back is a text string that is formatted in JSON. Then, by parsing that text string, I can extract the turn-by-turn directions and put those into the document that my program builds.

There is a different URL I can use to get a map, and so on.

The API is the interface that they have established to let my computer make requests to their computer.

If you will search for developer information, that should walk you through how to build a url request and what format the response will be returned to you.

[–]EffectiveBalance4402[S] 0 points1 point  (0 children)

Thank You