Commit f5a15651 authored by Caetan Tojeiro Carpente's avatar Caetan Tojeiro Carpente Committed by Carina Antunes
Browse files

Changed example order

parent 75dd1105
Pipeline #3888859 skipped with stages
......@@ -32,7 +32,8 @@ Authorization: Bearer '<api-key>'
)}
</pre>
</Message>
Curl example:
<br />
Curl example for a targeted notification:
<Message>
<pre>{`curl -X POST ${process.env.REACT_APP_BASE_URL}/notifications ${'\\'}
-H "Content-Type: application/json" ${'\\'}
......@@ -40,13 +41,16 @@ Authorization: Bearer '<api-key>'
--insecure ${'\\'}
--data '{
"target": 'channel id that you can find in your browser url bar'
"summary":"Test notification",
"summary":"Test targeted notification",
"priority":"NORMAL",
"body":"<p>This is a test notification sent via the API</p>"
}'
`}</pre>
"body":"<p>This is a test targeted notification sent via the API</p>",
"private": true,
"targetUsers": [{"email": ""some-member@some.domain"}, ...],
"targetGroups": [{"groupIdentifier": "some-group"}, ...],
"intersection": true,
}' `}</pre>
</Message>
Curl example for a targeted notification:
Curl example for a basic (untargeted) notification:
<Message>
<pre>{`curl -X POST ${process.env.REACT_APP_BASE_URL}/notifications ${'\\'}
-H "Content-Type: application/json" ${'\\'}
......@@ -54,15 +58,11 @@ Authorization: Bearer '<api-key>'
--insecure ${'\\'}
--data '{
"target": 'channel id that you can find in your browser url bar'
"summary":"Test targeted notification",
"summary":"Test notification",
"priority":"NORMAL",
"body":"<p>This is a test targeted notification sent via the API</p>",
"private": true,
"targetUsers": [{"email": ""some-member@some.domain"}, ...],
"targetGroups": [{"groupIdentifier": "some-group"}, ...],
"targetData": ["some-member@some.domain", "some-group", ...],
"intersection": true,
}' `}</pre>
"body":"<p>This is a test notification sent via the API</p>"
}'
`}</pre>
</Message>
Notes:
<br />
......@@ -71,9 +71,6 @@ Authorization: Bearer '<api-key>'
<tt>targetGroups</tt>: can contain only group objects with a groupIdentifier containing the
name,
<br />
<tt>targetData</tt>: can contain mixed strings emails and group names (but degraded
performance therefore not the recommended option),
<br />
<tt>intersection</tt>: if <code>true</code>, the notification will be sent only to the
intersection between specified users or groups and channel members. If <code>false</code>, the
notification will be sent to all specified users or groups (users or groups will be added as
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment