Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Prior Knowledge of Java/J2EE.

  2. Prior Knowledge of SpringBoot.

  3. Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.

Key Functionalities

  1. Compress long URLs.

  2. Converted short URLs contains id, which is used by this service to identify and get longer URLs.

Environment Variable

Description

host.name

Host name to append in short URL

db.persistance.enabled

The boolean flag to store the short URL in database when flag is set as TRUE.

Deployment Details

  • Deploy latest version of URL Shortening service

API Details

a) POST /egov-url-shortening/shortener

Receive long urls and converts them to shorter urls. Shortened urls contains urls to endpoint mentioned next. When user clicks on shortened URL, user is redirected to long URL.

b) GET /{id}

This shortened urls contains path to this endpoint. The service uses id used in last endpoint to get long URL. As response the user is redirected to long URL.

Reference Docs

Title

Link

Swagger API Contract

API Contract

Local Setup

URL Shortening Local Setup