Create Announcement

post/createannouncement

Create a textual announcement visible to some set of users based on department and location.

SecurityBearerAuth
Request
header Parameters
X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

X-Scio-Actas
string <email>

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

Request Body schema: application/json
required

Announcement content

endTime
required
string <date-time>

The date and time at which the announcement expires.

startTime
required
string <date-time>

The date and time at which the announcement becomes active.

title
required
string

The headline of the announcement.

Array of objects (FacetFilter)

Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search.

object (Thumbnail)
object (StructuredText)
channel
string

This determines whether this is a Social Feed post or a regular announcement.

Enum: "MAIN" "SOCIAL_FEED"
emoji
string

An emoji used to indicate the nature of the announcement.

hideAttribution
boolean

Whether or not to hide an author attribution.

isPrioritized
boolean

Used by the Social Feed to pin posts to the front of the feed.

postType
string

This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site.

Enum: "TEXT" "LINK"
sourceDocumentId
string

The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread).

object (Thumbnail)
viewUrl
string

URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED".

Responses
200

OK

Response Schema: application/json
Array of objects (FacetFilter)

Filters which restrict who should see the announcement. Values are taken from the corresponding filters in people search.

object (Person)
object (Thumbnail)
object (StructuredText)
channel
string

This determines whether this is a Social Feed post or a regular announcement.

Enum: "MAIN" "SOCIAL_FEED"
createTimestamp
integer

Server Unix timestamp of the creation time (in seconds since epoch UTC).

draftId
integer

The opaque id of the associated draft.

emoji
string

An emoji used to indicate the nature of the announcement.

endTime
string <date-time>

The date and time at which the announcement expires.

hideAttribution
boolean

Whether or not to hide an author attribution.

id
integer

The opaque id of the announcement.

isPrioritized
boolean

Used by the Social Feed to pin posts to the front of the feed.

isPublished
boolean

Whether or not the announcement is published.

lastUpdateTimestamp
integer

Server Unix timestamp of the last update time (in seconds since epoch UTC).

object (ObjectPermissions)
postType
string

This determines whether this is an external-link post or a regular announcement post. TEXT - Regular announcement that can contain rich text. LINK - Announcement that is linked to an external site.

Enum: "TEXT" "LINK"
object (Document)
sourceDocumentId
string

The Glean Document ID of the source document this Announcement was created from (e.g. Slack thread).

startTime
string <date-time>

The date and time at which the announcement becomes active.

object (Thumbnail)
title
string

The headline of the announcement.

object (Person)
object
viewUrl
string

URL for viewing the announcement. It will be set to document URL for announcements from other datasources e.g. simpplr. Can only be written when channel="SOCIAL_FEED".

400

Invalid request

401

Not Authorized

429

Too Many Requests

Request samples
application/json
{
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "title": "string",
  • "body": {
    • "text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.",
    • "structuredList": [
      • {
        • "document": {
          • "id": "string",
          • "datasource": "string",
          • "connectorType": "API_CRAWL",
          • "docType": "string",
          • "content": {
            • "fullTextList": [
              • "string"
              ]
            },
          • "containerDocument": { },
          • "parentDocument": { },
          • "title": "string",
          • "url": "string",
          • "metadata": {
            • "container": "container",
            • "parentId": "JIRA_EN-1337",
            • "createTime": "2000-01-23T04:56:07.000Z",
            • "datasource": "datasource",
            • "author": {
              • "name": "name"
              },
            • "documentId": "documentId",
            • "updateTime": "2000-01-23T04:56:07.000Z",
            • "mimeType": "mimeType",
            • "objectType": "Feature Request",
            • "components": [
              • "Backend",
              • "Networking"
              ],
            • "status": [
              • "Done"
              ],
            • "customData": {
              • "someCustomField": "someCustomValue"
              }
            },
          • "sections": [
            • {
              • "title": "string",
              • "url": "string"
              }
            ]
          },
        • "text": "Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."
        }
      ]
    },
  • "emoji": "string",
  • "thumbnail": {
    • "photoId": "string",
    • "url": "string"
    },
  • "banner": {
    • "photoId": "string",
    • "url": "string"
    },
  • "audienceFilters": [
    • {
      • "fieldName": "type",
      • "values": [
        • {
          • "value": "Spreadsheet",
          • "relationType": "EQUALS"
          },
        • {
          • "value": "Presentation",
          • "relationType": "EQUALS"
          }
        ]
      }
    ],
  • "sourceDocumentId": "string",
  • "hideAttribution": true,
  • "channel": "MAIN",
  • "postType": "TEXT",
  • "isPrioritized": true,
  • "viewUrl": "string"
}
Response samples
application/json
{
  • "startTime": "2019-08-24T14:15:22Z",
  • "endTime": "2019-08-24T14:15:22Z",
  • "title": "string",
  • "body": {
    • "text": "From https://en.wikipedia.org/wiki/Diffuse_sky_radiation, the sky is blue because blue light is more strongly scattered than longer-wavelength light.",
    • "structuredList": [
      • {
        • "document": {
          • "id": "string",
          • "datasource": "string",
          • "connectorType": "API_CRAWL",
          • "docType": "string",
          • "content": {
            • "fullTextList": [
              • "string"
              ]
            },
          • "containerDocument": { },
          • "parentDocument": { },
          • "title": "string",
          • "url": "string",
          • "metadata": {
            • "container": "container",
            • "parentId": "JIRA_EN-1337",
            • "createTime": "2000-01-23T04:56:07.000Z",
            • "datasource": "datasource",
            • "author": {
              • "name": "name"
              },
            • "documentId": "documentId",
            • "updateTime": "2000-01-23T04:56:07.000Z",
            • "mimeType": "mimeType",
            • "objectType": "Feature Request",
            • "components": [
              • "Backend",
              • "Networking"
              ],
            • "status": [
              • "Done"
              ],
            • "customData": {
              • "someCustomField": "someCustomValue"
              }
            },
          • "sections": [
            • {
              • "title": "string",
              • "url": "string"
              }
            ]
          },
        • "text": "Because its wavelengths are shorter, blue light is more strongly scattered than the longer-wavelength lights, red or green. Hence the result that when looking at the sky away from the direct incident sunlight, the human eye perceives the sky to be blue."
        }
      ]
    },
  • "emoji": "string",
  • "thumbnail": {
    • "photoId": "string",
    • "url": "string"
    },
  • "banner": {
    • "photoId": "string",
    • "url": "string"
    },
  • "audienceFilters": [
    • {
      • "fieldName": "type",
      • "values": [
        • {
          • "value": "Spreadsheet",
          • "relationType": "EQUALS"
          },
        • {
          • "value": "Presentation",
          • "relationType": "EQUALS"
          }
        ]
      }
    ],
  • "sourceDocumentId": "string",
  • "hideAttribution": true,
  • "channel": "MAIN",
  • "postType": "TEXT",
  • "isPrioritized": true,
  • "viewUrl": "string",
  • "draftId": 342,
  • "permissions": {
    • "write": {
      • "scopeType": "GLOBAL",
      • "create": true,
      • "update": true,
      • "delete": true
      }
    },
  • "id": 0,
  • "author": {
    • "name": "George Clooney",
    • "obfuscatedId": "abc123"
    },
  • "createTimestamp": 0,
  • "lastUpdateTimestamp": 0,
  • "updatedBy": {
    • "name": "George Clooney",
    • "obfuscatedId": "abc123"
    },
  • "viewerInfo": {
    • "isDismissed": true,
    • "isRead": true
    },
  • "sourceDocument": {
    • "id": "string",
    • "datasource": "string",
    • "connectorType": "API_CRAWL",
    • "docType": "string",
    • "content": {
      • "fullTextList": [
        • "string"
        ]
      },
    • "containerDocument": { },
    • "parentDocument": { },
    • "title": "string",
    • "url": "string",
    • "metadata": {
      • "container": "container",
      • "parentId": "JIRA_EN-1337",
      • "createTime": "2000-01-23T04:56:07.000Z",
      • "datasource": "datasource",
      • "author": {
        • "name": "name"
        },
      • "documentId": "documentId",
      • "updateTime": "2000-01-23T04:56:07.000Z",
      • "mimeType": "mimeType",
      • "objectType": "Feature Request",
      • "components": [
        • "Backend",
        • "Networking"
        ],
      • "status": [
        • "Done"
        ],
      • "customData": {
        • "someCustomField": "someCustomValue"
        }
      },
    • "sections": [
      • {
        • "title": "string",
        • "url": "string"
        }
      ]
    },
  • "isPublished": true
}