summaryrefslogtreecommitdiffstats
path: root/docs/testing/user/userguide/api.rst
blob: 05b0e8f2ec2743b5c522e1d13006077b25e8c27f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0


***************
API User Manual
***************

QTIP consists of a number of benchmarking tools or metrics, grouped under QPI's. QPI's map to the different
components of an NFVI ecosystem, such as compute, network and storage. Depending on the type of application,
a user may group them under plans.

QTIP API provides a RESTful interface to all of the above components. User can retrieve list of plans, QPIs
and metrics and their individual information.


Running
=======

After installing QTIP. API server can be run using command ``qtip-api`` on the local machine.

All the resources and their corresponding operation details can be seen at ``/v1.0/ui``.

The whole API specification in json format can be seen at ``/v1.0/swagger.json``.

The data models are given below:

  * Plan
  * Metric
  * QPI

Plan::

  {
    "name": <plan name>,
    "description": <plan profile>,
    "info": <{plan info}>,
    "config": <{plan configuration}>,
    "QPIs": <[list of qpis]>,
  },

Metric::

  {
    "name": <metric name>,
    "description": <metric description>,
    "links": <[links with metric information]>,
    "workloads": <[cpu workloads(single_cpu, multi_cpu]>,
  },

QPI::

  {
    "name": <qpi name>,
    "description": <qpi description>,
    "formula": <formula>,
    "sections": <[list of sections with different metrics and formulaes]>,
  }

The API can be described as follows

Plans:

 +--------+----------------------------+-----------------------------------------+
 | Method | Path                       | Description                             |
 +========+============================+=========================================+
 | GET    | /v1.0/plans                | Get the list of of all plans            |
 +--------+----------------------------+-----------------------------------------+
 | GET    | /v1.0/plans/{name}         | Get details of the specified plan       |
 +--------+----------------------------+-----------------------------------------+

Metrics:

 +--------+----------------------------+-----------------------------------------+
 | Method | Path                       | Description                             |
 +========+============================+=========================================+
 | GET    | /v1.0/metrics              | Get the list of all metrics             |
 +--------+----------------------------+-----------------------------------------+
 | GET    | /v1.0/metrics/{name}       | Get details of specified metric         |
 +--------+----------------------------+-----------------------------------------+

QPIs:

 +--------+----------------------------+-----------------------------------------+
 | Method | Path                       | Description                             |
 +========+============================+=========================================+
 | GET    | /v1.0/qpis                 | Get the list of all QPIs                |
 +--------+----------------------------+-----------------------------------------+
 | GET    | /v1.0/qpis/{name}          | Get details of specified QPI            |
 +--------+----------------------------+-----------------------------------------+


*Note:*
    *running API with connexion cli does not require base path (/v1.0/) in url*