File: watcher-api-v1-services.inc

package info (click to toggle)
watcher 14.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,764 kB
  • sloc: python: 48,904; xml: 312; sh: 265; makefile: 75
file content (116 lines) | stat: -rw-r--r-- 1,982 bytes parent folder | download | duplicates (6)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
.. -*- rst -*-

========
Services
========

This resource represents Watcher services, their states and hosts they are
placed on.

List Service
============

.. rest_method::  GET /v1/services

Returns a list of Service resources.

Normal response codes: 200

Error codes: 400,401

Request
-------

.. rest_parameters:: parameters.yaml

   - limit: limit
   - sort_dir: sort_dir
   - sort_key: sort_key

Response
--------

.. rest_parameters:: parameters.yaml

    - id: service_id
    - name: service_name
    - host: service_host
    - status: service_status
    - links: links

**Example JSON representation of a Service:**

.. literalinclude:: samples/service-list-response.json
   :language: javascript

List Service Detailed
=====================

.. rest_method::  GET /v1/services/detail

Returns a list of Service resources with complete details.

Normal response codes: 200

Error codes: 400,401

Request
-------

.. rest_parameters:: parameters.yaml

   - limit: limit
   - sort_dir: sort_dir
   - sort_key: sort_key

Response
--------

.. rest_parameters:: parameters.yaml

    - id: service_id
    - name: service_name
    - host: service_host
    - status: service_status
    - last_seen_up: service_last_seen_up
    - links: links

**Example JSON representation of a Service:**

.. literalinclude:: samples/service-list-detailed-response.json
   :language: javascript

Show Service
============

.. rest_method::  GET /v1/services/{service_ident}

Shows details for a Service resource.

Normal response codes: 200

Error codes: 404

Request
-------

.. rest_parameters:: parameters.yaml

   - service_ident: service_ident

Response
--------

.. rest_parameters:: parameters.yaml

    - id: service_id
    - name: service_name
    - host: service_host
    - status: service_status
    - last_seen_up: service_last_seen_up
    - links: links

**Example JSON representation of a Service:**

.. literalinclude:: samples/service-show-response.json
   :language: javascript