Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- description: "This is the FinTech Institution API server. This API is described in Swagger. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
- version: "1.0.0"
- title: "FinTech Institution API"
- termsOfService: "http://fintech.tecnocode.net/terms/"
- contact:
- email: "fintech@tecnocode.net"
- license:
- name: "Apache 2.0"
- url: "http://www.apache.org/licenses/LICENSE-2.0.html"
- host: "xyzbank.fintech.tecnocode.net"
- basePath: "/api"
- tags:
- - name: "institution"
- description: "Data about the institution"
- externalDocs:
- description: "Find out more"
- url: "http://fintech.tecnocode.net"
- - name: "transaction"
- description: "Access to Transactions"
- - name: "user"
- description: "Operations about user"
- externalDocs:
- description: "Find out more about our store"
- url: "http://fintech.tecnocode.net"
- schemes:
- - "http"
- paths:
- /institution:
- get:
- tags:
- - "institution"
- summary: "Institution information"
- description: "Returns the identification of this Institution"
- operationId: "getInstitution"
- produces:
- - "application/xml"
- - "application/json"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Institution"
- security:
- - fintech_auth:
- - "read:institution"
- /transaction/{id}:
- get:
- tags:
- - "transaction"
- summary: "Find transaction by ID"
- description: "Returns a single Transaction"
- operationId: "getTransactionById"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "id"
- in: "path"
- description: "ID of Transaction to return"
- required: true
- type: "integer"
- format: "int64"
- responses:
- 200:
- description: "successful operation"
- schema:
- $ref: "#/definitions/Transaction"
- 400:
- description: "Invalid ID supplied"
- 404:
- description: "Transaction not found"
- security:
- - fintech_auth:
- - "read:transactions"
- /user/login:
- get:
- tags:
- - "user"
- summary: "Logs user into the system"
- description: ""
- operationId: "loginUser"
- produces:
- - "application/xml"
- - "application/json"
- parameters:
- - name: "username"
- in: "query"
- description: "The user name for login"
- required: true
- type: "string"
- - name: "password"
- in: "query"
- description: "The password for login in clear text"
- required: true
- type: "string"
- responses:
- 200:
- description: "successful operation"
- schema:
- type: "string"
- headers:
- X-Rate-Limit:
- type: "integer"
- format: "int32"
- description: "calls per hour allowed by the user"
- X-Expires-After:
- type: "string"
- format: "date-time"
- description: "date in UTC when token expires"
- 400:
- description: "Invalid username/password supplied"
- /user/logout:
- get:
- tags:
- - "user"
- summary: "Logs out current logged in user session"
- description: ""
- operationId: "logoutUser"
- produces:
- - "application/xml"
- - "application/json"
- parameters: []
- responses:
- default:
- description: "successful operation"
- securityDefinitions:
- fintech_auth:
- type: "oauth2"
- authorizationUrl: "http://fintech.tecnocode.net/oauth/dialog"
- flow: "implicit"
- scopes:
- read:institution: "read the Institution information"
- read:transactions: "read your Transactions"
- api_key:
- type: "apiKey"
- name: "api_key"
- in: "header"
- definitions:
- Transaction:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- amount:
- type: "integer"
- format: "int32"
- date:
- type: "string"
- format: "date-time"
- status:
- type: "string"
- description: "Transaction Status"
- enum:
- - "accepted"
- - "pending"
- - "cancelled"
- complete:
- type: "boolean"
- default: false
- xml:
- name: "Transaction"
- User:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- username:
- type: "string"
- firstName:
- type: "string"
- lastName:
- type: "string"
- email:
- type: "string"
- password:
- type: "string"
- phone:
- type: "string"
- userStatus:
- type: "integer"
- format: "int32"
- description: "User Status"
- xml:
- name: "User"
- Institution:
- type: "object"
- required:
- - "name"
- - "logoUrl"
- - "status"
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- example: "XYZ Bank"
- description:
- type: "string"
- example: "XYZ Bank Description"
- logoUrl:
- type: "string"
- example: "http://cdn.xyzbank.com/images/logo.png"
- status:
- type: "string"
- description: "Institution status"
- enum:
- - "online"
- - "offline"
- - "abandoned"
- xml:
- name: "Institution"
- ApiResponse:
- type: "object"
- properties:
- code:
- type: "integer"
- format: "int32"
- type:
- type: "string"
- message:
- type: "string"
- externalDocs:
- description: "Find out more about FinTech"
- url: "http://www.tecnocode.net"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement