Forum Discussion

Gunjan Datta's avatar
Gunjan Datta
Copper Contributor
Oct 17, 2016

REST API Event Receiver Invalid URI

I believe the metadata uri returned from the REST api for event receivers is incorrect. The uri is in the format:

 

[SP Url]/_api/Web/EventReceiver/GetById(guid'[GUID]')

 

which is invalid. The correct uri should be:

 

[SP Url]/_api/Web/EventReceivers/GetById(guid'[GUID]')

 

If this is true, how would you report this bug?

1 Reply

  • Gunjan Datta's avatar
    Gunjan Datta
    Copper Contributor

    Event Receiver Invalid URI

    I wanted to add a screen shot to help explain this. Above is the raw output from the REST api:

     

    https://[SP Url]/_api/web/eventreceivers

     

    The "id" which is equal to the __metadata.uri value is incorrect. On a side note, I wrote a blog post of adding event receivers using the REST api http://dattabase.com/add-an-event-receiver-using-rest/.

Resources