Update Blog Settings
Updates the blog settings of the platform.
HTTP Request
PATCH/api/settings/blog
Authorization
Authorization
- Required: Yes
- Permission: Staff or Admin
- Authentication: Token authentication
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| blog_truncated_excerpt_max_length | Integer | No | Maximum length for truncated excerpts (10-500) |
| blog_truncated_body_max_length | Integer | No | Maximum length for truncated body text (minimum: 50) |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Update blog settings
4response = requests.patch('http://www.example.com/api/settings/blog',
5 headers={'Authorization': 'Token <your_api_key>'},
6 json={
7 "blog_truncated_excerpt_max_length": 300,
8 "blog_truncated_body_max_length": 1500
9 }
10)
11print(response.json())1# Update blog settings
2curl "http://www.example.com/api/settings/blog" -H "Authorization: Token <your_api_key>" -X PATCH -d '{
3 "blog_truncated_excerpt_max_length": 300,
4 "blog_truncated_body_max_length": 1500
5}'Status Codes
| Code | Description |
|---|---|
| 200 | Request logs retrieved successfully |
| 400 | Bad request — invalid query parameters |
| 401 | Unauthorized — authentication required |
| 403 | Forbidden — insufficient permissions |
| 500 | Internal server error |
Response Fields
| Field | Type | Description |
|---|---|---|
| blog_truncated_excerpt_max_length | Integer | Maximum length for truncated excerpts (10-500, default: 200) |
| blog_truncated_body_max_length | Integer | Maximum length for truncated body text (minimum: 50, default: 1000) |