Announcement API

includes announcements created after the user joined

GET /api/v1/announcements/

Request

Headers

Accept: application/json
X-Api-Token: ucfW8tg3jeoY8Mh-7hxGG9Y7yPTdieZM1A
X-Api-Email: user-385@example.com

Route

GET /api/v1/announcements/

Query Parameters

{}: 

cURL

curl "http://localhost:3000/api/v1/announcements/" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: ucfW8tg3jeoY8Mh-7hxGG9Y7yPTdieZM1A" \
	-H "X-Api-Email: user-385@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 230

Status

200 OK

Body

{
  "announcements": [
    {
      "id": 14,
      "title": "MyText",
      "body": "MyText",
      "button_text": "MyText",
      "released_at": "2019-10-31T22:10:43Z",
      "show_until": "2019-11-30T23:10:43Z",
      "created_at": "2019-10-31T22:10:43Z",
      "updated_at": "2019-10-31T22:10:43Z"
    }
  ]
}