Skip to content

SP REST Create Alert API (/_api/Web/CurrentUser/Alerts/Add) #7220

@salascz

Description

@salascz

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

No response

Issue description

I am exploring the Alerts REST API (/web/alerts, /web/currentuser/alerts etc.).

I would like to ask, if there is any documentation available for /Alerts/Add endpoint.

It does not seem to be working on my end (other endpoints like list of all alerts, alert details or delete alert works correctly)

POST [site]/_api/Web/CurrentUser/Alerts/Add
BODY

{
    "alertCreationInformation": {
        "AlertFrequency": 1,
        "AlertTemplateName": "SPAlertTemplateType.WebPageLibrary",
        "AlertTime": "2021-07-29T11:56:18.9574215+02:00",
        "AlertType": 0,
        "AlwaysNotify": false,
        "DeliveryChannels":1,
        "EventType": -1,
        "EventTypeBitmask"  : 2,
        "Filter": "",
        "Status": 0,
        "Title": "Alert -- generated",
        "Properties": []
    }
}

The AlertCreationInformation type does not contain any property for List, Item or User :(
https://s-kainet.github.io/sp-rest-explorer/#/_api/web/CurrentUser/Alerts/Add

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APItype:archive-old-issueIssues which are closed as tool old for active worktype:questionQuestion... if answered, will be tagged as such.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions