Skip to content

Announcement

Siyuan Zhang | 张豆 edited this page Oct 11, 2019 · 1 revision

Get All Announcements

HTTP Request

GET /api/v1/announcements

Response

[
    {
        "id": 116,
        "authorId": 111,
        "authorName": "Sylvia",
        "content": "sixth announcement22",
        "title": "sixth",
        "modifiedDate": "2018-09-10 16:40:59"
    }
]

Get a Specific Announcement

HTTP Request

GET /api/v1/annoucements/:id

Response

{
    "id": 116,
    "authorId": 111,
    "authorName": "Sylvia",
    "content": "sixth announcement22",
    "title": "sixth",
    "modifiedDate": "2018-09-10 16:40:59"
}

Create an announcement

ADMIN Required

HTTP Request

POST /api/v1/announcements

Request Parameters

Parameter Default Description
content null
title null Unique

Response

{
    "id": 121,
    "authorId": 20,
    "authorName": "kastnerorz",
    "content": "test announce",
    "title": "test",
    "modifiedDate": "2018-10-03 12:02:06"
}

Update a Specific Announcement

ADMIN Required

HTTP Request

PUT /api/v1/announcements/:id

Request Parameters

Parameter Default Description
content null
title null Unique

Response

{
    "id": 121,
    "authorId": 20,
    "authorName": "kastnerorz",
    "content": "test announce",
    "title": "test",
    "modifiedDate": "2018-10-03 12:02:06"
}

Delete a Specific Announcement

ADMIN Required

HTTP Request

DELETE /api/v1/announcements/:id

Response

{
    "id": 121,
    "authorId": 20,
    "authorName": "kastnerorz",
    "content": "test announce",
    "title": "test",
    "modifiedDate": "2018-10-03 12:02:06"
}