GET /api/admin/blogs/
- 전체 블로그 보기
- 권한: 관리자
- parameters
key |
type |
default |
required |
description |
user |
User |
|
|
작성자 |
title |
char(100) |
|
True |
제목 |
content |
Text |
|
True |
내용 |
category |
char(20) |
|
|
카테고리 |
image |
Attachment |
|
|
썸네일 |
tags |
char(1024) |
|
|
태그 (CommaSeperatedText) |
like |
int |
0 |
|
추천수 |
is_published |
bool |
True |
|
발행 여부 (False 시 임시저장) |
created_at |
datetime |
|
|
작성일 |
modified_at |
datetime |
|
|
최종 수정일 |
editable |
bool |
|
|
현재 사용자가 블로그 수정 가능 여부 |
key |
type |
default |
required |
description |
category |
char |
|
|
카테고리 |
tag |
char |
|
|
태그 (icontains) |
draft |
bool |
|
|
발행 여부 (True 시 미발행) |
q |
char |
|
|
제목, 내용, 태그로 검색 |
- sort parameters
- input sample
- GET /api/admin/blogs/?draft=false&tag=asmr&category=asmr&sort=like
- output sample
{
"pagination": {
"item_total": 3,
"page_total": 1,
"current_page": 1,
"next_link": null,
"prev_link": null,
"first_link": null
},
"data": [
{
"id": 1,
"user": {
"id": 2,
"username": "[email protected]",
"call_name": "B B"
},
"title": "test2",
"category": "asmr",
"image": null,
"tags": "asmr, hi",
"like": 3,
"is_published": true,
"created_at": "2023-11-07T11:29:17+0900",
"modified_at": "2023-11-07T11:29:17+0900"
},
{
"id": 6,
"user": {
"id": 2,
"username": "[email protected]",
"call_name": "B B"
},
"title": "post",
"category": "asmr",
"image": {
"id": 1,
"file": "<http://localhost:8000/upload/files/shield_TaNz5sY.png>",
"filename": "shield.png",
"content_type": "image/png",
"size": 48248,
"created_at": "2023-09-27T11:02:24+0900"
},
"tags": "asmr, hi",
"like": 2,
"is_published": true,
"created_at": "2023-11-16T11:00:20+0900",
"modified_at": "2023-11-16T11:00:20+0900"
},
{
"id": 4,
"user": {
"id": 2,
"username": "[email protected]",
"call_name": "B B"
},
"title": "post",
"category": "asmr",
"image": {
"id": 1,
"file": "<http://localhost:8000/upload/files/shield_TaNz5sY.png>",
"filename": "shield.png",
"content_type": "image/png",
"size": 48248,
"created_at": "2023-09-27T11:02:24+0900"
},
"tags": "asmr, hi",
"like": 1,
"is_published": true,
"created_at": "2023-11-16T10:58:55+0900",
"modified_at": "2023-11-16T10:58:55+0900"
}
],
"filter": {
"category": [
"hobby",
"asmr"
]
}
}
GET /api/admin/blogs/{blog_id}/
- 블로그 보기
- 권한: 관리자
- parameters: 상동
- input sample
- output sample