Search code examples
javascriptnode.jsmongodb

Does an API store data that is extracted from an web site permanently?


I want to extract data from my university's server (like grades and attendance) and display it in an Android app. The problem with that server is that it is not always online. So I want to know that if I extract data from the server though my custom built API then does API stores the data extracted from the server so that I can use it anytime even when the server is offline.


Solution

  • I'm not sure you fully understand the purpose of an API. Generally, an API is simply an interface for fetching/manipulating data.

    For example, you may use a web API which accepts credentials and data via HTTP then updates a database, for example, MongoDB.

    Another function of the API may allow the user to view this data using a GET HTTP request, which similarly fetches the data from the database.

    Think of an API as the middleman between the client application and the data within MongoDB. Hope this helps:

    What is an API?