{"swagger":"2.0","info":{"description":"550 project milestone4","version":"1.0.0","title":"550 project","contact":{"email":"irenekxx@seas.upenn.edu"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"tags":[{"name":"admins","description":"Secured Admin-only calls"},{"name":"developers","description":"Operations available to regular developers"}],"paths":{"/state-overview":{"get":{"tags":["developers"],"summary":"distribution of users, average cards num and transcations in each states","operationId":"StateOverview","description":"This query reflects how the number of users, average card numbers of each user and the total transcations in each state.\n","produces":["table"],"parameters":[{"in":"body","name":"state","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"200":{"description":"successfully retrieve the overall distribution of users, cards and transcations in each states","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/user-state-distribution":{"get":{"tags":["developers"],"summary":"show how users distribute in different states","operationId":"userByStates","description":"This query shows states and number of users in different states by displaying how users distribute in different state.\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve user distribution by locations","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/credit-user":{"get":{"tags":["developers"],"summary":"user's preference of credit cards' number","operationId":"userNumsByCards","description":"Num of credit cards and number of users for each. This query can show users prefer to own how many credit cards in general.\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve cards number and user number assocated with it.","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/fico-user":{"get":{"tags":["developers"],"summary":"user's credit level","operationId":"userNumByFico","description":"This query shows how many users are in different range of Fico score.\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve number of users in different range of Fico score.","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/spending-state":{"get":{"tags":["developers"],"summary":"user's spending amount in different state","operationId":"spendingByState","description":"This query shows states and average spending amount in different states. This query can reflect economic level in different state.\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve the average spending amount in different states","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/card-brand-distribution":{"get":{"tags":["developers"],"summary":"number of cards with each card brand","operationId":"cardsByBrand","description":"This query reflects the distribution of the number of cards on dark web regarding card brands and how popular each brand is.\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve the number of cards given card brands","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/user-limit":{"get":{"tags":["developers"],"summary":"credit card limit of each user","operationId":"limitByUser","description":"This query reflects total credit limit issued to each user. This can be further analyzed associated with Fico score.\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve the credit limits of each user","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/FICO-level":{"get":{"tags":["developers"],"summary":"distribution of transcations amounts on user's FICO score level","operationId":"FICOLevelView","description":"This query reflects how the number of transcations amounts distribution on users of different level of FICO score\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve the overall distribution of transcation amounts","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/transaction-birth":{"get":{"tags":["developers"],"summary":"transaction amount depending on user's birth year","operationId":"transactionByUserBirth","description":"This query reflects the distribution of transaction amounts on users' birth years.\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve the transaction amount of different user's birth year","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/transaction-gender":{"get":{"tags":["developers"],"summary":"transaction amount depending on user's gender","operationId":"transactionByUserGender","description":"This query reflects the distribution of transaction amounts on users' genders\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve the transaction amount of different user's gender","schema":{"type":"object"}},"400":{"description":"bad request"}}}},"/transcation-amount":{"get":{"tags":["developers"],"summary":"show user whose transcation amounts greater than their income","operationId":"highTranscaionAmount","description":"This query reflects those users who have higher transcation amounts than their income\n","produces":["table"],"responses":{"200":{"description":"successfully retrieve the users whose transction amounts higher than their income","schema":{"type":"object"}},"400":{"description":"bad request"}}}}},"definitions":{"User":{"type":"object","required":["UserID","Name","Gender","City","State","Address","ZipCode","Income","Debt","NumCreditCards","FICOScore","RetirementAge","BirthYear"],"properties":{"UserId":{"type":"integer","format":"integer","example":1},"Name":{"type":"string","format":"string","example":"john"},"Gender":{"type":"string","format":"string","example":"Male"},"City":{"type":"string","format":"string","example":"Portland"},"State":{"type":"string","format":"string","example":"CA"},"Address":{"type":"string","format":"string","example":"462 Rose Lane"},"ZipCode":{"type":"integer","format":"integer","example":19103},"Income":{"type":"integer","format":"integer","example":59696},"Debt":{"type":"integer","format":"integer","example":10000},"NumCreditCards":{"type":"integer","format":"integer","example":5},"FICOScore":{"type":"integer","format":"integer","example":787},"RetirementAge":{"type":"integer","format":"integer","example":60},"BirthYear":{"type":"integer","format":"integer","example":1973}}},"Card":{"type":"object","required":["User","CardIndex","CardBrand","CardType","CardNumber","Expires","CVV","HasChip","CardsIssued","CreditLimit","AcctOpenDate","YearPINLastChanged","CardOnDarkWeb"],"properties":{"User":{"type":"object","$ref":"#/definitions/User"},"CardIndex":{"type":"integer","format":"integer","example":1},"CardBrand":{"type":"string","format":"string","example":"Chase"},"CardType":{"type":"string","format":"string","example":"Visa"},"CardNumber":{"type":"integer","format":"integer","example":123456789},"Expires":{"type":"string","format":"string","example":"12/2020"},"CVV":{"type":"integer","format":"integer","example":220},"HasChip":{"type":"integer","format":"integer","example":1},"CardsIssued":{"type":"integer","format":"integer","example":1},"CreditLimit":{"type":"integer","format":"integer","example":1000},"AcctOpenDate":{"type":"string","format":"string","example":"05/2016"},"YearPINLastChanged":{"type":"integer","format":"integer","example":2017},"CardOnDarkWeb":{"type":"integer","format":"integer","example":0}}},"Transaction":{"type":"object","required":["TransactionID","User","Card","Year","Month","Day","Time","Amount","MerchantID","City","State","Zipcode"],"properties":{"TransactionID":{"type":"integer","format":"integer","example":1},"User":{"type":"object","$ref":"#/definitions/User"},"Card":{"type":"object","$ref":"#/definitions/Card"},"Year":{"type":"integer","format":"integer","example":2000},"Month":{"type":"integer","format":"integer","example":12},"Day":{"type":"integer","format":"integer","example":20},"Time":{"type":"string","format":"string","example":"0620"},"Amount":{"type":"integer","format":"integer","example":8888},"MerchantID":{"type":"integer","format":"integer","example":1234567890},"City":{"type":"string","format":"string","example":"philadelphia"},"State":{"type":"string","format":"string","example":"PA"},"Zipcode":{"type":"integer","format":"integer","example":19103}}}},"host":"virtserver.swaggerhub.com","basePath":"/xingxing95/550_project/1.0.0","schemes":["https"]}