ahampriyanshu / cc-backend-task

Home Page:https://cosmo-cloud.onrender.com/docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

User Access Management

Setup

git clone https://github.com/ahampriyanshu/cc-backend-task.git cosmo
cd cosmo
pip3 install -r requirements.txt
  • Setup and run mongo server
  • Update the .env variables
  • Run uvicorn main:app --reload

Collections

db

Endpoints

Users

POST Create new user - Execute

{
  "name": "Priyanshu Tiwari",
  "email": "ahampriyanshu@gmail.com"
}

GET Get user by ID - Execute

GET Get user by Email - Execute

GET List of oraganisations for a user - Execute

GET List of users - Execute

Organisation

POST Create new organisation - Execute

{
  "name": "Cosmo Cloud"
}

GET Get organisation by ID - Execute

GET Get organisation by Name - Execute

GET List of users from an organisation - Execute

GET List of organisations - Execute

Permissions

POST Add user(s) to an organisation - Execute

[
  "6449157fbc73adf705e6c418", "6449123dbc73adf705e6c417"
]

PUT Update user(s) permissions - Execute

[
  "6449157fbc73adf705e6c418", "6449123dbc73adf705e6c417"
]

DELETE Delete user(s) from an organisation - Execute

[
  "6449157fbc73adf705e6c418", "6449123dbc73adf705e6c417"
]

Responses

200, 201

{
"data": {

}
}
{
"data": [ ],
"metadata": {
"count": 0,
"limit": 0,
"offset": 0
}
}

400, 404, 405, 409, 422, 500

{
    "error_message" : ""
}

About

https://cosmo-cloud.onrender.com/docs


Languages

Language:Python 100.0%