summaryrefslogtreecommitdiffstats
path: root/qtip/api/swagger/swagger.yaml
diff options
context:
space:
mode:
authorakhilbatra898 <akhil.batra@research.iiit.ac.in>2017-03-10 15:35:04 +0530
committerzhihui wu <zhihui.wu2006+zte@gmail.com>2017-03-11 02:43:21 +0000
commit8d56e59c70f15897e366a0dbddefda43107b61c6 (patch)
treee76f22cfb9dc4b0be373fd5cabb9e73e7fdc9ac1 /qtip/api/swagger/swagger.yaml
parentc5f64d5114be98cbe6a74c2078b22b741ae984a4 (diff)
Implement Retrieval of plans, QPIs, and metrics
- All specs can be listed - All specs can be individually retrieved - API can be installed alongside qtip - API can be hosted using command `qtip-api` JIRA: QTIP-221 JIRA: QTIP-222 Change-Id: I1e80e6609cae1252cb2fcdc38c71b4bf6d02e8c9 Signed-off-by: akhilbatra898 <akhil.batra@research.iiit.ac.in> (cherry picked from commit 15fceada86ad0d5dabe26365451aae9c95b36be1)
Diffstat (limited to 'qtip/api/swagger/swagger.yaml')
-rw-r--r--qtip/api/swagger/swagger.yaml132
1 files changed, 123 insertions, 9 deletions
diff --git a/qtip/api/swagger/swagger.yaml b/qtip/api/swagger/swagger.yaml
index 96d34681..fb10317f 100644
--- a/qtip/api/swagger/swagger.yaml
+++ b/qtip/api/swagger/swagger.yaml
@@ -4,7 +4,7 @@
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
+# http://www.apache.org/licenses/LICENSE -2.0
##############################################################################
swagger: '2.0'
@@ -22,11 +22,14 @@ paths:
operationId: qtip.api.controllers.plan.list_plans
tags:
- Plan
- - standalone
+ - Standalone
responses:
200:
description: A list of plans
- #TODO (akhil) add item with properties and parameters
+ schema:
+ type: array
+ items:
+ $ref: '#/definitions/Plans'
501:
description: Resource not implemented
schema:
@@ -41,7 +44,7 @@ paths:
operationId: qtip.api.controllers.plan.get_plan
tags:
- Plan
- - standalone
+ - Standalone
parameters:
- name: name
in: path
@@ -51,7 +54,8 @@ paths:
responses:
200:
description: Plan information
- #TODO (akhil) define schema
+ schema:
+ $ref: '#/definitions/Plan'
404:
description: Plan not found
schema:
@@ -112,7 +116,9 @@ paths:
responses:
200:
description: A list of QPIs
- #TODO (akhil) add item with properties and parameters
+ schema:
+ items:
+ $ref: '#/definitions/QPIs'
501:
description: Resource not implemented
schema:
@@ -138,7 +144,8 @@ paths:
responses:
200:
description: QPI information
- #TODO (akhil) define schema
+ schema:
+ $ref: '#/definitions/QPI'
404:
description: QPI not found
schema:
@@ -162,7 +169,9 @@ paths:
responses:
200:
description: A list of metrics
- #TODO (akhil) add item with properties and parameters
+ schema:
+ items:
+ $ref: '#/definitions/Metrics'
501:
description: Resource not implemented
schema:
@@ -188,7 +197,8 @@ paths:
responses:
200:
description: Metric information
- #TODO (akhil) define schema
+ schema:
+ $ref: '#/definitions/Metric'
404:
description: Metric not found
schema:
@@ -202,6 +212,110 @@ paths:
schema:
$ref: '#/definitions/Error'
definitions:
+ PlanContent:
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ type: string
+ description:
+ type: string
+ info:
+ type: object
+ config:
+ type: object
+ QPIs:
+ type: array
+ items:
+ type: object
+ Plans:
+ type: object
+ required:
+ - name
+ - abspath
+ properties:
+ name:
+ type: string
+ abspath:
+ type: string
+ Plan:
+ allOf:
+ - $ref: '#/definitions/Plans'
+ - type: object
+ - required:
+ - content
+ properties:
+ content:
+ $ref: '#/definitions/PlanContent'
+ MetricContent:
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ type: string
+ description:
+ type: string
+ links:
+ type: array
+ items:
+ type: string
+ workloads:
+ type: array
+ items:
+ type: string
+ Metrics:
+ type: object
+ required:
+ - name
+ - abspath
+ properties:
+ name:
+ type: string
+ abspath:
+ type: string
+ Metric:
+ allOf:
+ - $ref: '#/definitions/Metrics'
+ - required:
+ - content
+ properties:
+ content:
+ $ref: '#/definitions/MetricContent'
+ QPIContent:
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ type: string
+ description:
+ type: string
+ formula:
+ type: string
+ sections:
+ type: array
+ items:
+ type: object
+ QPIs:
+ type: object
+ required:
+ - name
+ - abspath
+ properties:
+ name:
+ type: string
+ abspath:
+ type: string
+ QPI:
+ allOf:
+ - $ref: '#/definitions/QPIs'
+ - required:
+ - content
+ properties:
+ content:
+ $ref: '#/definitions/QPIContent'
Error:
type: object
properties: