Announcements endpoints

Method HTTP request Description
Get all announcements GET /announcements Get the most recent announcements
Get an announcement GET /announcements/:announcement_uuid Get details of a single announcement
Delete an announcement DELETE /announcements/:announcement_uuid Delete an announcement

Get all announcements

Parameters:

Name Type Description
page_size integer (optional) Number of announcements to return; max and default of 100
from_id string (optional) Get the Announcements logically sorted after this ID (by default, this corresponds to Announcements chronologically before this ID). Can be passed as a Layer URI layer:///announcements/uuid or simply a UUID

HTTP request:

GET/announcements

Example:

curl -X GET \
     -H 'Accept: application/vnd.layer+json; version=3.0' \
     -H 'Authorization: Layer session-token="<TOKEN>"'' \
     -H 'Content-Type: application/json' \
     https://api.layer.com/announcements

Possible responses:

Got announcements successfully | Status: 200 (OK)

[
    Announcement,
    Announcement
]

Discussion

The response will include a header indicating the total number of results available to page through:

Layer-Count: 4023

Get an announcement

Parameters:

This method takes no parameters.

HTTP request:

GET/announcements/:announcement_uuid

Example:

curl -X GET \
     -H 'Accept: application/vnd.layer+json; version=3.0' \
     -H 'Authorization: Layer session-token="<TOKEN>"'' \
     -H 'Content-Type: application/json' \
     https://api.layer.com/announcements/<announcement_uuid>

Possible responses:

Got announcement successfully | Status: 200 (OK)

Announcement

Delete an announcement

Parameters:

This method takes no parameters.

HTTP request:

DELETE/announcements/:announcement_uuid

Example:

curl -X DELETE \
     -H 'Accept: application/vnd.layer+json; version=3.0' \
     -H 'Authorization: Layer session-token="<TOKEN>"'' \
     -H 'Content-Type: application/json' \
     https://api.layer.com/announcements/<announcement_uuid>

Possible responses:

Announcement deleted successfully
Status: 204 (No Content)
(Empty body)