Skip to content

master-your-money-bw/backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

BW Money API

API for BW Money Build Weeks Project

Endpoints

/createnewuser

HTTP Method: POST

Expected Response Types

Response Reason
200 OK

Parameters

Name In Description Required? Type
username body username true User
password body password true User

Content Types Produced

Produces
application/json

Content Types Consumed

Consumes
application/json

expenses/all

HTTP Method: GET

Return all current user's expenses

Expected Response Types

Response Reason
200 OK

Parameters

Name In Description Required? Type
page=0 query Results page you want to retrieve (0..N) false object
size=0 query Number of records per page. false object
sort=expensename,desc query Sort by parameter and method false object

Content Types Produced

Produces
application/json

expenses/delete/{id}

HTTP Method: DELETE

Updates expense by ID, returns updated expense

Expected Response Types

Response Reason
200 OK

Content Types Produced

Produces
None

expenses/new

HTTP Method: POST

Adds new expense to current user

Expected Response Types

Response Reason
200 OK

Parameters

Name In Description Required? Type
expensename body true String
amount body false Int
category body false String

Content Types Produced

Produces
application/json

Content Types Consumed

Consumes
application/json

expenses/update/{id}

HTTP Method: PUT

Updates expense by ID, returns updated expense

Expected Response Types

Response Reason
200 OK

Parameters

Name In Description Required? Type
expensename body true String
amount body false Int
category body false String

Content Types Produced

Produces
application/json

Content Types Consumed

Consumes
application/json

expenses/{id}

HTTP Method: GET

Return all expense by ID, checks to make sure user has permission

Expected Response Types

Response Reason
200 OK

Content Types Produced

Produces
application/json

Content Types Consumed

Consumes
None

logout

HTTP Method: GET

logout

Expected Response Types

Response Reason
200 OK

Content Types Produced

Produces
None

oauth/token

HTTP Method: GET

getAccessToken

Expected Response Types

Response Reason
200 OK

Parameters

Name In Description Required? Type
username query true string
password query true string

Content Types Produced

Produces
None

/oauth/token

HTTP Method: POST

postAccessToken

Expected Response Types

Response Reason
200 OK

Parameters

Name In Description Required? Type
name query false string

Content Types Produced

Produces
None

Content Types Consumed

Consumes
application/json

passthrough/data

HTTP Method: POST

Takes JSON, sends it to the Data API, returns the response.

Expected Response Types

Response Reason
200 OK

Parameters

Name In Description Required? Type
request body request true string

Content Types Produced

Produces
application/json

Content Types Consumed

Consumes
application/json

users/currentuser

HTTP Method: GET

Return current user

Expected Response Types

Response Reason
200 OK

Parameters

Name In Description Required? Type
authenticated query false boolean
authorities[0].authority query false string
credentials query false object

Content Types Produced

Produces
application/json

Content Types Consumed

Consumes
None

users/currentuser

HTTP Method: PUT

updateUserUsingPUT

Updates current user

Expected Response Types

Response Reason
200 OK

Parameters

Name In Description Required? Type
authenticated query false boolean
authorities[0].authority query false string
credentials query false object
details query updateUser true object

Content Types Produced

Produces
None

Content Types Consumed

Consumes
application/json

users/users

HTTP Method: GET

Return all users, ADMIN ONLY

Expected Response Types

Response Reason
200 OK

Content Types Produced

Produces
application/json

Models

Expense Definition

Property Type Format
amount integer int32
category string
expenseid integer int64
expensename string
  {
    "expenseid": int, //Do not post this, automatically generated
    "expensename": "String",
    "amount": int,
    "category": "String"
  }

User Definition

Property Type Format
transportation integer int32
age integer int32
userid integer int64
password string
housing integer int32
username string
clothing integer int32
food integer int32
education string
location string
bills integer int32
income integer int32
{
    "userid": 16, //Do not post this, automatically generated
    "username": "String",
    "location": "String",
    "age": int,
    "income": int,
    "education": "String",
    "transportation": int,
    "food": int,
    "clothing": int,
    "bills": int,
    "housing": int
  }

External Documentation

https://bw-money-backend.herokuapp.com/swagger-ui.html#/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages