Config Options

To get a list of options and their default values, simply send GET request to /config-options path and provide a comma separated list of option names:

Response: HTTP 200, application/json (Hide)
GET /config-options

Query Parameters:

1
2
3
{
    "names": "notifications_user_send_morning_paper,morning_paper_last_activity"
}

Response:

1
2
3
{
    "notifications_user_send_morning_paper": true
}

Notice that options that are not available via API are not listed. Only options that can be accessed via API will be returned.

To update default values, you can PUT new values:

Response: HTTP 200, application/json (Hide)
PUT /config-options

Payload:

1
2
3
4
{
    "notifications_user_send_morning_paper": false,
    "morning_paper_last_activity": false
}

Response:

1
2
3
{
    "notifications_user_send_morning_paper": false
}

Protected options (like morning_paper_last_activity are ignored).

To get user specific values, send GET request to /personalized-config-options:

Response: HTTP 200, application/json (Hide)
GET /personalized-config-options

Query Parameters:

1
2
3
{
    "names": "notifications_user_send_morning_paper"
}

Response:

1
2
3
{
    "notifications_user_send_morning_paper": false
}

In this request, we got default value. Lets save a value just for us:

Response: HTTP 200, application/json (Hide)
PUT /personalized-config-options

Payload:

1
2
3
{
    "notifications_user_send_morning_paper": true
}

Response:

1
2
3
{
    "notifications_user_send_morning_paper": true
}

Now, lets confirm that the default value remained the same:

Response: HTTP 200, application/json (Hide)
GET /config-options

Query Parameters:

1
2
3
{
    "names": "notifications_user_send_morning_paper"
}

Response:

1
2
3
{
    "notifications_user_send_morning_paper": false
}