Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- swagger: "2.0"
- info:
- description: "This is a sample server Petstore server. 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: "Swagger Petstore"
- termsOfService: "http://swagger.io/terms/"
- contact:
- email: "apiteam@swagger.io"
- license:
- name: "Apache 2.0"
- url: "http://www.apache.org/licenses/LICENSE-2.0.html"
- host: "petstore.swagger.io"
- basePath: "/v1"
- tags:
- - name: "Notifications"
- description: "Everything about the notifications"
- - name: "Rules"
- description: "Everything about the rules"
- schemes:
- - "https"
- - "http"
- paths:
- /v1/notifications/getNotificationsCount:
- get:
- tags:
- - "Notifications"
- summary: "Get current number of notifications"
- description: "Uses the channel and time range to fetch all from notifications table joined to channelLookUp, to create a json object for each channel {channel, sum} where sum = notifications channel"
- operationId: "getNotificationsCount"
- consumes:
- - "application/json"
- - "application/xml"
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - in: "body"
- name: "RangeAndChannel"
- description: ""
- schema:
- type: "string"
- properties:
- channel:
- type: "string"
- from_date:
- type: "string"
- format: "date-time"
- to_date:
- type: "string"
- format: "date-time"
- responses:
- 200:
- description: "Success"
- schema:
- type: "array"
- items:
- type: "object"
- properties:
- channel_id:
- type: "integer"
- channel:
- type: "string"
- sum:
- type: "string"
- /v1/RulesController/addRule:
- post:
- tags:
- - "Rules"
- summary: "Add new rule"
- description: "this request takes the rule json and creates a new rule"
- operationId: "addRule"
- consumes:
- - "application/json"
- - "application/xml"
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - in: "body"
- name: "rule"
- description: ""
- schema:
- type: "object"
- properties:
- rank:
- type: "string"
- title:
- type: "string"
- conditions:
- type: "array"
- items:
- type: "object"
- properties:
- model:
- type: "string"
- attribute:
- type: "string"
- value:
- type: "string"
- operator:
- type: "string"
- responses:
- 201:
- description: "Success"
- 400:
- description: "Failure"
- /v1/RulesController/deleteRule:
- post:
- tags:
- - "Rules"
- summary: "Get current number of notifications"
- description: "Uses the channel and time range to Fetch all from notifications table joined to channelLookUp, to create a json object for each channel {channel, sum} where sum = notifications channel"
- operationId: "deleteRule"
- consumes:
- - "application/json"
- - "application/xml"
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - in: "body"
- name: "Rule_id"
- description: ""
- schema:
- type: "object"
- properties:
- id:
- type: "integer"
- responses:
- 200:
- description: "Success"
- 400:
- description: "Failed to delete"
- /v1/notifications/editRuleTitle:
- post:
- tags:
- - "Rules"
- summary: "Edit an already existing rule"
- description: ""
- operationId: "editRuleTitle"
- consumes:
- - "application/json"
- - "application/xml"
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - in: "body"
- name: "edit_rule"
- description: ""
- schema:
- type: "string"
- properties:
- id:
- type: "string"
- title:
- type: "string"
- actions:
- type: "string"
- responses:
- 200:
- description: "Success"
- 400:
- description: "Failed"
- /v1/notifications/deleteCondition:
- post:
- tags:
- - "Rules"
- summary: "Delete condition using condition id"
- description: ""
- operationId: "deleteCondition"
- consumes:
- - "application/json"
- - "application/xml"
- produces:
- - "application/json"
- - "application/xml"
- parameters:
- - in: "body"
- name: "condition_id"
- description: ""
- schema:
- type: "string"
- properties:
- id:
- type: "string"
- responses:
- 200:
- description: "Success"
- 400:
- description: "Failed"
- securityDefinitions:
- petstore_auth:
- type: "oauth2"
- authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
- flow: "implicit"
- scopes:
- write:pets: "modify pets in your account"
- read:pets: "read your pets"
- api_key:
- type: "apiKey"
- name: "api_key"
- in: "header"
- definitions:
- Order:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- petId:
- type: "integer"
- format: "int64"
- quantity:
- type: "integer"
- format: "int32"
- shipDate:
- type: "string"
- format: "date-time"
- status:
- type: "string"
- description: "Order Status"
- enum:
- - "placed"
- - "approved"
- - "delivered"
- complete:
- type: "boolean"
- default: false
- xml:
- name: "Order"
- Category:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- xml:
- name: "Category"
- 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"
- Tag:
- type: "object"
- properties:
- id:
- type: "integer"
- format: "int64"
- name:
- type: "string"
- xml:
- name: "Tag"
- Pet:
- type: "object"
- required:
- - "name"
- - "photoUrls"
- properties:
- id:
- type: "integer"
- format: "int64"
- category:
- $ref: "#/definitions/Category"
- name:
- type: "string"
- example: "doggie"
- photoUrls:
- type: "array"
- xml:
- name: "photoUrl"
- wrapped: true
- items:
- type: "string"
- tags:
- type: "array"
- xml:
- name: "tag"
- wrapped: true
- items:
- $ref: "#/definitions/Tag"
- status:
- type: "string"
- description: "pet status in the store"
- enum:
- - "available"
- - "pending"
- - "sold"
- xml:
- name: "Pet"
- ApiResponse:
- type: "object"
- properties:
- code:
- type: "integer"
- format: "int32"
- type:
- type: "string"
- message:
- type: "string"
- externalDocs:
- description: "Find out more about Swagger"
- url: "http://swagger.io"
Add Comment
Please, Sign In to add comment