List all private settings. Learn how this can be used in configuring your server in this guide.
URL | Requires Auth | HTTP Method |
---|---|---|
/api/v1/settings |
yes |
GET |
{% tabs %} {% tab title="Curl" %}
curl --location --request GET 'http://localhost:3000/api/v1/settings' \
--header 'X-Auth-Token: w4KGA2YwTmz4k0cEwa58F6T-gyN4p4MLLWPDfDE8Sgi' \
--header 'X-User-Id: g8aroJivN5R32TxCm'
{% endtab %}
{% tab title="Javascript" %}
var myHeaders = new Headers();
myHeaders.append("X-Auth-Token", "w4KGA2YwTmz4k0cEwa58F6T-gyN4p4MLLWPDfDE8Sgi");
myHeaders.append("X-User-Id", "g8aroJivN5R32TxCm");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("http://localhost:3000/api/v1/settings", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
{% endtab %}
{% tab title="Python" %}
import http.client
conn = http.client.HTTPSConnection("localhost", 3000)
payload = ''
headers = {
'X-Auth-Token': 'w4KGA2YwTmz4k0cEwa58F6T-gyN4p4MLLWPDfDE8Sgi',
'X-User-Id': 'g8aroJivN5R32TxCm'
}
conn.request("GET", "/api/v1/settings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
{% endtab %} {% endtabs %}
{
"settings": [
{ "_id": "API_Allow_Infinite_Count", "value": true },
{ "_id": "API_CORS_Origin", "value": "*" }
],
"count": 50,
"offset": 0,
"total": 299,
"success": true
}
The following error can occur on the endpoint.
- Authorization: Requires an authentication token for the request to be made.
{% tabs %} {% tab title=" Authorization" %}
{
"status": "error",
"message": "You must be logged in to do this."
}
{% endtab %} {% endtabs %}