API Announcements (GQL)
List an API's Announcements
Use the announcements
field of query.api
to read all of the API's announcements.
query readAPI($apiId: ID!) {
api(id: $apiId) {
id
name
slugifiedName
visibility
ownerId
announcements{
id
body
status
createdAt
updatedAt
deletedAt
}
}
}
{
"apiId": "api_81eaf459-fd5f-4239-ae64-ab9f06559888"
}
View a list of current receivers of API Announcements
Users and teams subscribed to an API receive Announcements.
Create an API Announcement
Use the postMessage
mutation to create and send announcements for an API. You must specify the apiId
and ownerDisplayName
in the variables.
mutation postMessage($message: MessageCreateInput!) {
postMessage(message: $message)
}
{
"message": {
"message": {
"apiId": "api_36f1012e-84a0-4e70-854a-441899403b32",
"body": "Version 2 of the API is available. Please update to the new version.",
"ownerDisplayName": "Team A"
},
"messageType": "announcement"
}
}
Additionally, API Announcements can be created via Studio - My APIs Inbox.
Updated 10 months ago