This is a Django Rest Framework application for the Online Project Proposal System.
To run the application make sure that you have installed all the packages in the requirements.txt file
pip install requirements.txt
After installing the packages you can now run:
python manage.py runserver
The following are the Apis used in the application:
POST:https://oops-n5cn.onrender.com/api/v1/account/login/
Check the credentials and return the REST Token if the credentials are valid and authenticated. Calls Django Auth login method to register User ID in Django session framework
Accept the following POST parameters: username, password Return the REST Framework Token Object's key.
AUTHORIZATIONS:> Token
REQUEST BODY SCHEMA: application/json
{
"username": "string",
"email": "user@example.com",
"password": "string"
}
Responses
Status:201
{
"username": "string",
"email": "user@example.com",
"password": "string"
}
GET:https://oops-n5cn.onrender.com/api/v1/account/logout/
Calls Django logout method and delete the Token object assigned to the current User object.
Accepts/returns nothing
AUTHORIZATIONS:> Token
Responses
Status: 200
POST:https://oops-n5cn.onrender.com/api/v1/account/logout/
Calls Django logout method and delete the Token object assigned to the current User object.
Accepts/Returns nothing.
AUTHORIZATIONS:> Token
Responses
Status:201
POST:https://oops-n5cn.onrender.com/api/v1/account/password/reset/
Calls Django Auth PasswordResetForm save method.
Accepts the following POST parameters: email Returns the success/fail message.
AUTHORIZATIONS:>Token
REQUEST BODY SCHEMA: application/json
{
"email": "user@example.com"
}
Response Samples
Status:201
RESPONSE SCHEMA: application/json
{
"email": "user@example.com"
}
POST:https://oops-n5cn.onrender.com/api/v1/account/password/reset/confirm/
Password reset e-mail link is confirmed, therefore this resets the user's password.
Accepts the following POST parameters: token, uid, new_password1, new_password2 Returns the success/fail message.
AUTHORIZATIONS>Token
REQUEST BODY SCHEMA: application/json
{
"new_password1": "string",
"new_password2": "string",
"uid": "string",
"token": "string"
}
Reponse Samples
Status:201
RESPONSE SCHEMA: application/json
{
"new_password1": "string",
"new_password2": "string",
"uid": "string",
"token": "string"
}
POST:https://oops-n5cn.onrender.com/api/v1/account/register/ This is used when one wants to create an account.
AUTHORIZATIONS: >Token
REQUEST BODY SCHEMA: application/json
{
"username": "string",
"email": "user@example.com",
"password1": "string",
"password2": "string"
}
Response Samples
Status:201
RESPONSE SCHEMA: application/json
{
"username": "string",
"email": "user@example.com",
"password1": "string",
"password2": "string"
}
POST:https://oops-n5cn.onrender.com/api/v1/account/register/resend-email/ Account Register Resend Email
This is for requesting for the Email from the user.
AUTHORIZATIONS:> Token
REQUEST BODY SCHEMA: application/json
{
"email": "user@example.com"
}
Response Samples
Status:201
RESPONSE SCHEMA: application/json
{
"email": "user@example.com"
}
Account Verify Email when Creating an Account
POST:https://oops-n5cn.onrender.com/api/v1/account/register/verify-email/
AUTHORIZATIONS:> Token
REQUEST BODY SCHEMA: application/json
{
"key": "string"
}
Response Samples
Status:201
RESPONSE SCHEMA: application/json
{
"key": "string"
}
This allows one to fill the available proposals and also create proposals.This is based on the user it may be the Proposer or the Coordinator.
POST:https://oops-n5cn.onrender.com/api/v1/proposal/add_proposal/
This allows the user to select the desired proposal that they would want to fill.
AUTHORIZATIONS: > Token
Responses
Status:201
POST:https://oops-n5cn.onrender.com/api/v1/proposal/add_proposal/answer/
This allows one to create answers to the selected proposal.
AUHORIZATIONS:> Token
REQUEST BODY SCHEMA: application/json
{
"answer": "string",
"proposal": 0,
"question": 0
}
Response Samples
Status:201
RESPONSE SCHEMA: application/json
{
"id": 0,
"answer": "string",
"proposal": 0,
"question": 0
}
POST:https://oops-n5cn.onrender.com/api/v1/proposal/assign/
This allows assigning proposals to reviewers.
AUTHORIZATIONS:> Token
REQUEST BODY SCHEMA: application/json
{
"proposal": 0,
"reviewer": 0
}
Response Samples
Status:201
RESPONSE SCHEMA: application/json
{
"id": 0,
"proposal": 0,
"reviewer": 0
}
GET:https://oops-n5cn.onrender.com/api/v1/proposal/assignments/
Returns the assigned proposals to the respective reviewer.
AUTHORIZATIONS:> Token
Responses
Status: 200
GET:https://oops-n5cn.onrender.com/api/v1/proposal/get_questions/{id}/
Returns the questions available for the selected Template identified by the id .
AUTHORIZATIONS:> Token
Responses
Status:200
GET:https://oops-n5cn.onrender.com/api/v1/proposal/my_proposal/
Returns a list of all submitted proposals from the user making the request.
AUTHORIZATIONS:> Token
Responses
Status:200
GET:https://oops-n5cn.onrender.com/api/v1/proposal/preview_proposal/{id}/
This allows the user to view the questions and the responses given to each question.
AUTHORIZATIONS:> Token
Responses
Status:200
GET:https://oops-n5cn.onrender.com/api/v1/proposal/review/{id}
Returns the review of a proposal identified by ID.
AUTHORIZATIONS:> Token
Responses
Status:200
GET:https://oops-n5cn.onrender.com/api/v1/proposal/reviewers/
This is used to list all the reviewers in the system.
AUTHORIZATIONS:> Token
Responses
Status:200
GET:https://oops-n5cn.onrender.com/api/v1/proposal/template/
It shows the specific proposals created based on their ids.
AUTHORIZATIONS:> Token
Responses
Status:200
[
{
"id": 0,
"title": "string",
"category": "string"
}
]
POST:https://oops-n5cn.onrender.com/api/v1/proposal/template/
This is to create proposals.
AUTHORIZATIONS:> Token
REQUEST BODY SCHEMA: application/json
{
"title": "string",
"category": "string"
}
Responses
Status:201
RESPONSE SCHEMA: application/json
{
"id": 0,
"title": "string",
"category": "string"
}
GET:https://oops-n5cn.onrender.com/api/v1/proposal/template/{id}/
This is to view a specific template that has been created.
AUTHORIZATIONS:> Token
Responses
Status:200
RESPONSE SCHEMA: application/json
{
"id": 0,
"title": "string",
"category": "string"
}
PUT:https://oops-n5cn.onrender.com/api/v1/proposal/template/{id}/
AUTHORIZATIONS:> Token
{
"title": "string",
"category": "string"
}
Responses
Status:200
RESPONSE SCHEMA: application/json
{
"id": 0,
"title": "string",
"category": "string"
}
PATCH:https://oops-n5cn.onrender.com/api/v1/proposal/template/{id}/
This is to help in updating a proposal Template.
AUTHORIZATIONS:> Token
REQUEST BODY SCHEMA: application/json
{
"title": "string",
"category": "string"
}
Responses
Status:200
RESPONSE SCHEMA: application/json
{
"id": 0,
"title": "string",
"category": "string"
}
DELETE:https://oops-n5cn.onrender.com/api/v1/proposal/template/{id}/
This is to help in deleting the proposal Templates.
AUTHORIZATIONS:> Token
Responses
Status:204
GET:https://oops-n5cn.onrender.com/api/v1/proposal/templates/{cat}/
return a list of templates from the selected category.
AUTHORIZATIONS:> Token
Responses
Status:200