-
Notifications
You must be signed in to change notification settings - Fork 5
MOAMOA API details
TaeYoon edited this page Oct 19, 2022
·
77 revisions
HTTP request
POST /api/studies/{study-id}/notice/articles
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
{
"title" : "๊ณต์ง์ฌํญ ๊ธ ์ ๋ชฉ",
"content" : "๊ณต์ง์ฌํญ ๊ธ ๋ด์ฉ"
}
HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Location: /api/studies/{study-id}/notice/articles/{article-id}
Content-Type: application/json
Content-Length: 47
Access-Control-Allow-Headers: Location
HTTP request
GET /api/studies/{study-id}/notice/articles/{article-id}
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 47
{
"id" : 1,
"author" : {
"id" : 2,
"username" : "jaejae-yoo",
"imageUrl" : "images/123",
"profileUrl" : "https://github.com/user/jaejae-yoo"
},
"title" : "๊ณต์ง์ฌํญ ๊ธ ์ ๋ชฉ",
"content" : "๊ณต์ง์ฌํญ ๊ธ ๋ด์ฉ",
"createdDate" : 2022-08-09,
"lastModifiedDate" : 2022-08-09
}
HTTP request
GET /api/studies/{study-id}/notice/articles?page=0&size=5
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 47
{
"articles" : [{
"id" : 1,
"author" : {
"id" : 2,
"username" : "jaejae-yoo",
"imageUrl" : "images/123",
"profileUrl" : "https://github.com/user/jaejae-yoo"
},
"title" : "์ปค๋ฎค๋ํฐ ๊ธ ์ ๋ชฉ",
"createdDate" : 2022-08-09,
"lastModifiedDate" : 2022-08-09,
}
...
],
"currentPage" : 0,
"lastPage" : 5,
"totalCount" : 100
}
HTTP request
PUT /api/studies/{study-id}/notice/articles/{article-id}
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
{
"title" : "๊ณต์ง์ฌํญ ๊ธ ์ ๋ชฉ",
"content" : "๊ณต์ง์ฌํญ ๊ธ ๋ด์ฉ"
}
HTTP response
HTTP/1.1 204 No content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 47
HTTP request
DELETE /api/studies/{study-id}/notice/articles/{article-id}
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
HTTP response
HTTP/1.1 204 No content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 47
POST /api/studies/{study-id}/community/draft-articles
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
{
"title" : "๊ฒ์๊ธ ์ ๋ชฉ",
"content" : "๊ฒ์๊ธ ๋ด์ฉ"
}
HTTP response
HTTP/1.1 201 Created
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 47
Location: /api/studies/{study-id}/community/draft-articles/23
{
"draftArticleId": 23
}
HTTP request
PUT /api/studies/{study-id}/community/draft-articles/23
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
{
"title" : "๊ฒ์๊ธ ์ ๋ชฉ",
"content" : "๊ฒ์๊ธ ๋ด์ฉ"
}
HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 47
HTTP request
GET /api/draft/community/articles
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 47
{
"draftArticles" : [ {
"id" : 5,
"title" : "์๋ฐ ๊ฒ์๊ธ ์ ๋ชฉ4",
"createdDate" : "2022-09-02",
"lastModifiedDate" : "2022-09-02",
"study": {
"id": 1,
"title": "์๋ฐ ์คํฐ๋"
},
}, {
"id" : 4,
"title" : "์๋ฐ ๊ฒ์๊ธ ์ ๋ชฉ3",
"createdDate" : "2022-09-02",
"lastModifiedDate" : "2022-09-02",
"study": {
"id": 1,
"title": "์๋ฐ ์คํฐ๋"
},
}, {
"id" : 3,
"title" : "์๋ฐ ๊ฒ์๊ธ ์ ๋ชฉ2",
"createdDate" : "2022-09-02",
"lastModifiedDate" : "2022-09-02",
"study": {
"id": 2,
"title": "์๋ฐ ์คํฐ๋2"
},
} ],
"currentPage" : 0,
"lastPage" : 1,
"totalCount" : 4
}
HTTP request
GET /api/studies/{study-id}/community/draft-articles/{draft-article-id}
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
HTTP response
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 47
{
"id" : 5,
"title" : "์๋ฐ ๊ฒ์๊ธ ์ ๋ชฉ",
"content" : "์๋ฐ ๊ฒ์๊ธ ๋ด์ฉ"
"createdDate" : "2022-09-02",
"lastModifiedDate" : "2022-09-02"
}
HTTP request
DELETE /api/studies/{study-id}/community/draft-articles/23
Content-Type: application/json
Accept: application/json
Content-Length: 35
Host: localhost:8080
Authorization: Bearer XXXXXXXX
HTTP response
HTTP/1.1 204 No Content
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 47