Announcement API

excludes announcements that the user has a receipt for

GET /api/v1/announcements/

Request

Headers

Accept: application/json
X-Api-Token: K44MyVyk86DT_xPnt324zJswVFp7dPzB8A
X-Api-Email: user-383@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: K44MyVyk86DT_xPnt324zJswVFp7dPzB8A" \
	-H "X-Api-Email: user-383@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

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

Status

200 OK

Body

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