Public
Documentation Settings

DSC Portal APIS

Index controller

GETApi index

https://api.dsckiet.com/dev

Gives 200 response which states that api is running

Example Request
curl
curl --location 'https://api.dsckiet.com/dev'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

GETGet birthdays

https://api.dsckiet.com/dev/birthdays
  • Internal api for birthday wisher to get all the users birthday
  • Requires secret key to get all the birthdays
Example Request
curl
curl --location 'https://api.dsckiet.com/dev/birthdays'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

Users Controller

GETGet all users / user (w/ id)

https://api.dsckiet.com/dev/users?uid=5ed5fec6f597eb1db5a3e0bc
  • /users -> all users expect the lead
  • /users?uid=123 -> specific user data matching the id
Response codeMessageErrorData
200successfalseArray of users(w/o uid), object of user (w/ uid)
500server error messagetruenull
PARAMS
uid

5ed5fec6f597eb1db5a3e0bc

Example Request
curl
curl --location 'https://api.dsckiet.com/dev/users?uid=5ed5fec6f597eb1db5a3e0bc'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POSTAdd a user

https://api.dsckiet.com/dev/users
  • Adds a user and sends them an email with default login creds
  • Requires lead/core auth token
Response codeMessageErrorData
200successfalsecreated user
401Specific messagetruenull
HEADERS
x-auth-token

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlZDVmZWM2ZjU5N2ViMWRiNWEzZTBiYyIsIm5hbWUiOiJEc2MgTGVhZCIsImVtYWlsIjoibGVhZEBkc2NraWV0LmNvbSIsInJvbGUiOiJsZWFkIiwiaWF0IjoxNTkxMTY3MzY4fQ.kASC4soyAvlfbL8Xbpp2WNgY210peRqbRGahaVJVw8c

Bodyurlencoded
name

Rohan Mehta

email

rhnmht30@gmail.com

role

core

core, member

designation

Tech Lead

Example Request
curl
curl --location 'https://api.dsckiet.com/dev/users' \
--header 'x-auth-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlZDVmZWM2ZjU5N2ViMWRiNWEzZTBiYyIsIm5hbWUiOiJEc2MgTGVhZCIsImVtYWlsIjoibGVhZEBkc2NraWV0LmNvbSIsInJvbGUiOiJsZWFkIiwiaWF0IjoxNTkxMTY3MzY4fQ.kASC4soyAvlfbL8Xbpp2WNgY210peRqbRGahaVJVw8c' \
--data-urlencode 'name=Rohan Mehta' \
--data-urlencode 'email=rhnmht30@gmail.com' \
--data-urlencode 'role=core' \
--data-urlencode 'designation=Tech Lead'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers