URL Shortner

shorten given url

POST/egov-url-shortening/shortener
Body

shortenRequest

idstring
urlstring

url to be shortened

validFrominteger (int64)
validTillinteger (int64)
Response

shortened url returned

Body
string
Request
const response = await fetch('/egov-url-shortening/shortener', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
text

redirects user to orignal url identified by id

GET/egov-url-shortening/{id}
Path parameters
id*string

The uniqueue id field to find original url

Response

user redirected to original url

Request
const response = await fetch('/egov-url-shortening/{id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.