REST API Event Receiver Invalid URI

Copper Contributor

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

Event Receiver Invalid URIEvent 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 here.