From 61b93d117234cf0a56b01de06edf4cbc44294a14 Mon Sep 17 00:00:00 2001 From: Jose Semedo <jose.semedo@cern.ch> Date: Wed, 30 Mar 2022 14:12:42 +0200 Subject: [PATCH] hotfix: update api docs --- src/about/components/AboutAPI.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/about/components/AboutAPI.js b/src/about/components/AboutAPI.js index ecfd45ed..ffa2357f 100644 --- a/src/about/components/AboutAPI.js +++ b/src/about/components/AboutAPI.js @@ -22,12 +22,10 @@ Authorization: Bearer '<api-key>' `} {JSON.stringify( { - notification: { - target: 'channel id that you can find in your browser url bar', - summary: 'Notification title', - priority: 'LOW|NORMAL|IMPORTANT', - body: 'Notification content', - }, + target: 'channel id that you can find in your browser url bar', + summary: 'Notification title', + priority: 'LOW|NORMAL|IMPORTANT', + body: 'Notification content', }, null, 2 @@ -41,14 +39,12 @@ Authorization: Bearer '<api-key>' -H "Authorization: Bearer <api-key>" ${'\\'} --insecure ${'\\'} --data '{ - "notification": - { "target": 'channel id that you can find in your browser url bar' "summary":"Test notification", "priority":"NORMAL", "body":"<p>This is a test notification sent via the API</p>" - } - }' `}</pre> + }' + `}</pre> </Message> Curl example for a targeted notification: <Message> @@ -57,8 +53,6 @@ Authorization: Bearer '<api-key>' -H "Authorization: Bearer <api-key>" ${'\\'} --insecure ${'\\'} --data '{ - "notification": - { "target": 'channel id that you can find in your browser url bar' "summary":"Test targeted notification", "priority":"NORMAL", @@ -67,7 +61,6 @@ Authorization: Bearer '<api-key>' "targetUsers": [{"email": ""some-member@some.domain"}, ...], "targetGroups": [{"groupIdentifier": "some-group"}, ...], "targetData": ["some-member@some.domain", "some-group", ...] - } }' `}</pre> </Message> Notes: -- GitLab