Setting API
The API is responsible for managing user settings/preferences.
Note
If any of the mentioned endpoint is resulting in an error please refer to the Errors section.
GET Brief Setting
An extension of setting API that specifically manages preferences and settings related to brief
Note
This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.
Warning
It is compulsory to have prefix Bearer on Authorization header.
Request
URL : /setting/brief
Method : GET
Example
curl --location 'https://platform-test.ranenetwork.com/public-api/v1/setting/brief' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer <access_token>'
Response
{
"data": [
{
"name": "add-2",
"slug": "add-2",
"show_on_wall": true,
"notify": false
},
{
"name": "Aabhiskar Test Brief",
"slug": "add-duplicate-articles-to-same-categories-of-same-brief",
"show_on_wall": true,
"notify": false
},
{
"name": "Cyber Digest",
"slug": "cyber-digest",
"show_on_wall": true,
"notify": false
},
{
"name": "Daily Cyber Brief ",
"slug": "daily-cyber-brief",
"show_on_wall": true,
"notify": false
}
]
}
Response Formatter
data : an array of all entitled brief with respective setting
name : name of brief
slug : slug related to specific brief
show_on_wall : boolean value that indicates whether or not brief is shown in wall i.e. (/brief or /brief/publication) endpoint
notify : boolean value that indicates whether or not to push the notification
GET Specific Brief Setting
An extension of setting API that specifically manages preferences and settings related to brief
Note
This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.
Warning
It is compulsory to have prefix Bearer on Authorization header.
Request
URL : /setting/brief/<brief-slug>
Method : GET
Example
curl --location 'https://platform-test.ranenetwork.com/public-api/v1/setting/brief/add-2' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer <access_token>'
Response
{
"data": [
{
"name": "add-2",
"slug": "add-2",
"show_on_wall": true,
"notify": false
}
]
}
Response Formatter
data : an array of all entitled brief with respective setting
name : name of brief
slug : slug related to specific brief
show_on_wall : boolean value that indicates whether or not brief is shown in wall i.e. (/brief or /brief/publication) endpoint
notify : boolean value that indicates whether or not to push the notification
Update Brief Setting
An extension of setting API that specifically manages preferences and settings related to brief
Note
This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.
Warning
It is compulsory to have prefix Bearer on Authorization header.
Request
URL : /setting/brief/<brief-slug>
Method : PATCH
Example
curl --location --request PATCH 'https://platform-test.ranenetwork.com/public-api/v1/setting/brief/test-riskbook' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--data '{
"show_on_wall":false,
"notify":true
}'
Response
{
"data": [
{
"brief_slug": "test-riskbook",
"notify": true,
"show_on_wall": false
}
]
}
Response Formatter
data : object after wall preference has been updated
brief_slug : slug of the brief for which setting was updated
show_on_wall : boolean value that indicates whether or not brief is shown in wall i.e. (/brief or /brief/publication) endpoint
notify : boolean value that indicates whether or not to push the notification