~ubuntu-branches/ubuntu/wily/aodh/wily

« back to all changes in this revision

Viewing changes to doc/source/webapi/v2.rst

  • Committer: Package Import Robot
  • Author(s): Thomas Goirand
  • Date: 2015-09-10 17:50:46 UTC
  • Revision ID: package-import@ubuntu.com-20150910175046-jb6cn5eo3s27um2p
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. docbookrestapi
 
2
 
 
3
============
 
4
 V2 Web API
 
5
============
 
6
 
 
7
Capabilities
 
8
============
 
9
 
 
10
The Capabilities API allows you to directly discover which functions from the
 
11
V2 API functionality, including the selectable aggregate functions, are
 
12
supported by the currently configured storage driver. A capabilities query
 
13
returns a flattened dictionary of properties with associated boolean values -
 
14
a 'False' or absent value means that the corresponding feature is not
 
15
available in the backend.
 
16
 
 
17
.. rest-controller:: aodh.api.controllers.v2.capabilities:CapabilitiesController
 
18
   :webprefix: /v2/capabilities
 
19
 
 
20
.. autotype:: aodh.api.controllers.v2.capabilities.Capabilities
 
21
   :members:
 
22
 
 
23
.. _alarms-api:
 
24
 
 
25
Alarms
 
26
======
 
27
 
 
28
.. rest-controller:: aodh.api.controllers.v2.alarms:AlarmsController
 
29
   :webprefix: /v2/alarms
 
30
 
 
31
.. rest-controller:: aodh.api.controllers.v2.alarms:AlarmController
 
32
   :webprefix: /v2/alarms
 
33
 
 
34
.. autotype:: aodh.api.controllers.v2.alarms.Alarm
 
35
   :members:
 
36
 
 
37
.. autotype:: aodh.api.controllers.v2.alarm_rules.threshold.AlarmThresholdRule
 
38
   :members:
 
39
 
 
40
.. autotype:: aodh.api.controllers.v2.alarm_rules.combination.AlarmCombinationRule
 
41
   :members:
 
42
 
 
43
.. autotype:: aodh.api.controllers.v2.alarm_rules.gnocchi.MetricOfResourceRule
 
44
   :members:
 
45
 
 
46
.. autotype:: aodh.api.controllers.v2.alarm_rules.gnocchi.AggregationMetricByResourcesLookupRule
 
47
   :members:
 
48
 
 
49
.. autotype:: aodh.api.controllers.v2.alarm_rules.gnocchi.AggregationMetricsByIdLookupRule
 
50
   :members:
 
51
 
 
52
.. autotype:: aodh.api.controllers.v2.alarms.AlarmTimeConstraint
 
53
   :members:
 
54
 
 
55
.. autotype:: aodh.api.controllers.v2.alarms.AlarmChange
 
56
   :members:
 
57
 
 
58
Filtering Queries
 
59
=================
 
60
 
 
61
The filter expressions of the query feature operate on the fields of *Alarm*
 
62
and *AlarmChange*. The following comparison operators are supported: *=*, *!=*,
 
63
*<*, *<=*, *>*, *>=* and *in*; and the following logical operators can be used:
 
64
*and* *or* and *not*. The field names are validated against the database
 
65
models.
 
66
 
 
67
.. note:: The *not* operator has different meaning in Mongo DB and in SQL DB engine.
 
68
   If the *not* operator is applied on a non existent metadata field then
 
69
   the result depends on the DB engine. For example if
 
70
   {"not": {"metadata.nonexistent_field" : "some value"}} filter is used in a query
 
71
   the Mongo DB will return every Sample object as *not* operator evaluated true
 
72
   for every Sample where the given field does not exists. See more in the Mongod DB doc.
 
73
   On the other hand SQL based DB engine will return empty result as the join operation
 
74
   on the metadata table will return zero rows as the on clause of the join which
 
75
   tries to match on the metadata field name is never fulfilled.
 
76
 
 
77
Complex Query supports defining the list of orderby expressions in the form
 
78
of [{"field_name": "asc"}, {"field_name2": "desc"}, ...].
 
79
 
 
80
The number of the returned items can be bounded using the *limit* option.
 
81
 
 
82
The *filter*, *orderby* and *limit* are all optional fields in a query.
 
83
 
 
84
.. rest-controller:: aodh.api.controllers.v2.query:QueryAlarmsController
 
85
   :webprefix: /v2/query/alarms
 
86
 
 
87
.. rest-controller:: aodh.api.controllers.v2.query:QueryAlarmHistoryController
 
88
   :webprefix: /v2/query/alarms/history
 
89
 
 
90
.. autotype:: aodh.api.controllers.v2.query.ComplexQuery
 
91
   :members: