notexOPENOverview
Notex/Systems/API Endpoints
08.05LESSON 05 OF 13 · 1 MIN READ

API Endpoints

Always free to read
SECTION VIDEOAPI Endpoints

Video coming soon. Start with the reading below.

COMING SOON

API endpoints facilitate the communication between clients and servers. We will design the APIs REST-style. If you are unfamiliar with restful API, you can consult external materials, such as the one in the reference material [1]. A URL shortener primary needs two API endpoints. 1.URL shortening. To create a new short URL, a client sends a POST request, which contains one parameter: the original long URL. The API looks like this:

POST api/v1/data/shorten

  • request parameter: {longUrl: longURLString}
  • return shortURL

2.URL redirecting. To redirect a short URL to the corresponding long URL, a client sends a GET request. The API looks like this:

GET api/v1/shortUrl

  • Return longURL for HTTP redirection
Progress is saved on this device.
KEEP EXPLORING

One note leads to another.

Back to the library →
⌕
Search across the entire library ⌘ K