@@ -453,6 +453,68 @@ Example Request
453453 -H ' Content-type: application/json' \
454454 -d ' { "note": "This is the sample note" }'
455455
456+ List alert notes
457+ ~~~~~~~~~~~~~~~~~
458+
459+ Lists all notes for an alert.
460+
461+ ::
462+
463+ GET /alert/:id/notes
464+
465+ Example Request
466+ +++++++++++++++
467+
468+ .. code-block :: bash
469+
470+ $ curl http://localhost:8080/alert/17d8e7ea-b3ba-4bb1-9c5a-29e60865f258/notes \
471+ -H ' Authorization: Key demo-key'
472+
473+ Update an alert note
474+ ~~~~~~~~~~~~~~~~~~~~
475+
476+ Updates an existing note on an alert.
477+
478+ ::
479+
480+ PUT /alert/:id/note/:note_id
481+
482+ Input
483+ +++++
484+
485+ +-----------------+----------+----------------------------------------------+
486+ | Name | Type | Description |
487+ +=================+==========+==============================================+
488+ | ``note `` | string | **Required ** updated note text |
489+ +-----------------+----------+----------------------------------------------+
490+
491+ Example Request
492+ +++++++++++++++
493+
494+ .. code-block :: bash
495+
496+ $ curl -XPUT http://localhost:8080/alert/17d8e7ea-b3ba-4bb1-9c5a-29e60865f258/note/ab01c02d-1234-5678-abcd-ef0123456789 \
497+ -H ' Authorization: Key demo-key' \
498+ -H ' Content-type: application/json' \
499+ -d ' { "note": "Updated note text" }'
500+
501+ Delete an alert note
502+ ~~~~~~~~~~~~~~~~~~~~
503+
504+ Permanently deletes a note from an alert.
505+
506+ ::
507+
508+ DELETE /alert/:id/note/:note_id
509+
510+ Example Request
511+ +++++++++++++++
512+
513+ .. code-block :: bash
514+
515+ $ curl -XDELETE http://localhost:8080/alert/17d8e7ea-b3ba-4bb1-9c5a-29e60865f258/note/ab01c02d-1234-5678-abcd-ef0123456789 \
516+ -H ' Authorization: Key demo-key'
517+
456518 Delete an alert
457519~~~~~~~~~~~~~~~
458520
@@ -2120,6 +2182,196 @@ Example Request
21202182 $ curl -XDELETE http://localhost:8080/user/166b41d6-849f-440d-ba30-1a5345d86fb6 \
21212183 -H ' Authorization: Key demo-key'
21222184
2185+ .. _groups :
2186+
2187+ Groups
2188+ ------
2189+
2190+ .. _create_group :
2191+
2192+ Create a group
2193+ ~~~~~~~~~~~~~~
2194+
2195+ Creates a new group.
2196+
2197+ ::
2198+
2199+ POST /group
2200+
2201+ Input
2202+ +++++
2203+
2204+ +-----------------+----------+----------------------------------------------+
2205+ | Name | Type | Description |
2206+ +=================+==========+==============================================+
2207+ | ``name `` | string | **Required ** group name |
2208+ +-----------------+----------+----------------------------------------------+
2209+ | ``text `` | string | description of the group |
2210+ +-----------------+----------+----------------------------------------------+
2211+
2212+ Example Request
2213+ +++++++++++++++
2214+
2215+ .. code-block :: bash
2216+
2217+ $ curl -XPOST http://localhost:8080/group \
2218+ -H ' Authorization: Key demo-key' \
2219+ -H ' Content-type: application/json' \
2220+ -d ' {
2221+ "name": "alerta_ops",
2222+ "text": "Operations team"
2223+ }'
2224+
2225+ .. _get_group :
2226+
2227+ Get a group
2228+ ~~~~~~~~~~~
2229+
2230+ Retrieves a group with the given group ID.
2231+
2232+ ::
2233+
2234+ GET /group/:id
2235+
2236+ Example Request
2237+ +++++++++++++++
2238+
2239+ .. code-block :: bash
2240+
2241+ $ curl http://localhost:8080/group/5c0c5c8e-1b2a-3c4d-5e6f-7a8b9c0d1e2f \
2242+ -H ' Authorization: Key demo-key'
2243+
2244+ .. _get_groups :
2245+
2246+ List all groups
2247+ ~~~~~~~~~~~~~~~
2248+
2249+ Returns a list of groups.
2250+
2251+ ::
2252+
2253+ GET /groups
2254+
2255+ Example Request
2256+ +++++++++++++++
2257+
2258+ .. code-block :: bash
2259+
2260+ $ curl http://localhost:8080/groups \
2261+ -H ' Authorization: Key demo-key'
2262+
2263+ .. _put_group :
2264+
2265+ Update a group
2266+ ~~~~~~~~~~~~~~
2267+
2268+ Updates the specified group by setting the values of the parameters
2269+ passed. Any parameters not provided will be left unchanged.
2270+
2271+ ::
2272+
2273+ PUT /group/:id
2274+
2275+ Input
2276+ +++++
2277+
2278+ +-----------------+----------+----------------------------------------------+
2279+ | Name | Type | Description |
2280+ +=================+==========+==============================================+
2281+ | ``name `` | string | group name |
2282+ +-----------------+----------+----------------------------------------------+
2283+ | ``text `` | string | description of the group |
2284+ +-----------------+----------+----------------------------------------------+
2285+
2286+ Example Request
2287+ +++++++++++++++
2288+
2289+ .. code-block :: bash
2290+
2291+ $ curl -XPUT http://localhost:8080/group/5c0c5c8e-1b2a-3c4d-5e6f-7a8b9c0d1e2f \
2292+ -H ' Authorization: Key demo-key' \
2293+ -H ' Content-type: application/json' \
2294+ -d ' {
2295+ "name": "alerta_ops",
2296+ "text": "Updated description"
2297+ }'
2298+
2299+ .. _delete_group :
2300+
2301+ Delete a group
2302+ ~~~~~~~~~~~~~~
2303+
2304+ Permanently deletes a group.
2305+
2306+ ::
2307+
2308+ DELETE /group/:id
2309+
2310+ Example Request
2311+ +++++++++++++++
2312+
2313+ .. code-block :: bash
2314+
2315+ $ curl -XDELETE http://localhost:8080/group/5c0c5c8e-1b2a-3c4d-5e6f-7a8b9c0d1e2f \
2316+ -H ' Authorization: Key demo-key'
2317+
2318+ .. _get_group_users :
2319+
2320+ List group members
2321+ ~~~~~~~~~~~~~~~~~~
2322+
2323+ Returns a list of users that are members of the specified group.
2324+
2325+ ::
2326+
2327+ GET /group/:id/users
2328+
2329+ Example Request
2330+ +++++++++++++++
2331+
2332+ .. code-block :: bash
2333+
2334+ $ curl http://localhost:8080/group/5c0c5c8e-1b2a-3c4d-5e6f-7a8b9c0d1e2f/users \
2335+ -H ' Authorization: Key demo-key'
2336+
2337+ .. _add_group_user :
2338+
2339+ Add user to group
2340+ ~~~~~~~~~~~~~~~~~
2341+
2342+ Adds a user to the specified group.
2343+
2344+ ::
2345+
2346+ PUT /group/:id/user/:user_id
2347+
2348+ Example Request
2349+ +++++++++++++++
2350+
2351+ .. code-block :: bash
2352+
2353+ $ curl -XPUT http://localhost:8080/group/5c0c5c8e-1b2a-3c4d-5e6f-7a8b9c0d1e2f/user/166b41d6-849f-440d-ba30-1a5345d86fb6 \
2354+ -H ' Authorization: Key demo-key'
2355+
2356+ .. _remove_group_user :
2357+
2358+ Remove user from group
2359+ ~~~~~~~~~~~~~~~~~~~~~~
2360+
2361+ Removes a user from the specified group.
2362+
2363+ ::
2364+
2365+ DELETE /group/:id/user/:user_id
2366+
2367+ Example Request
2368+ +++++++++++++++
2369+
2370+ .. code-block :: bash
2371+
2372+ $ curl -XDELETE http://localhost:8080/group/5c0c5c8e-1b2a-3c4d-5e6f-7a8b9c0d1e2f/user/166b41d6-849f-440d-ba30-1a5345d86fb6 \
2373+ -H ' Authorization: Key demo-key'
2374+
21232375 .. _perms :
21242376
21252377Permissions
@@ -2307,6 +2559,30 @@ Example Request
23072559 "match": "alerta_rw"
23082560 }'
23092561
2562+ .. _scopes :
2563+
2564+ Scopes
2565+ ------
2566+
2567+ .. _get_scopes :
2568+
2569+ List all scopes
2570+ ~~~~~~~~~~~~~~~
2571+
2572+ Returns a list of all available permission scopes.
2573+
2574+ ::
2575+
2576+ GET /scopes
2577+
2578+ Example Request
2579+ +++++++++++++++
2580+
2581+ .. code-block :: bash
2582+
2583+ $ curl http://localhost:8080/scopes \
2584+ -H ' Authorization: Key demo-key'
2585+
23102586 .. _customers :
23112587
23122588Customers
@@ -2904,3 +3180,59 @@ Example Response
29043180 # HELP alerta_uptime_msecs milliseconds since app has started
29053181 # TYPE alerta_uptime_msecs counter
29063182 alerta_uptime_msecs 1422377
3183+
3184+ .. _mgmt_housekeeping :
3185+
3186+ Housekeeping
3187+ ~~~~~~~~~~~~
3188+
3189+ Triggers housekeeping to expire timed-out alerts and delete old closed/expired alerts.
3190+
3191+ ::
3192+
3193+ GET /management/housekeeping
3194+
3195+ Example Request
3196+ +++++++++++++++
3197+
3198+ .. code-block :: bash
3199+
3200+ $ curl http://localhost:8080/management/housekeeping \
3201+ -H ' Authorization: Key demo-key'
3202+
3203+ .. _mgmt_switchboard :
3204+
3205+ Switchboard
3206+ ~~~~~~~~~~~
3207+
3208+ Get or set feature switches used to toggle runtime features.
3209+
3210+ ::
3211+
3212+ GET /management/switchboard
3213+
3214+ Example Request
3215+ +++++++++++++++
3216+
3217+ .. code-block :: bash
3218+
3219+ $ curl http://localhost:8080/management/switchboard \
3220+ -H ' Authorization: Key demo-key'
3221+
3222+ .. _client_config :
3223+
3224+ Client Configuration
3225+ ~~~~~~~~~~~~~~~~~~~~
3226+
3227+ Get client configuration settings used by the web UI.
3228+
3229+ ::
3230+
3231+ GET /config
3232+
3233+ Example Request
3234+ +++++++++++++++
3235+
3236+ .. code-block :: bash
3237+
3238+ $ curl http://localhost:8080/config
0 commit comments