Reject Cloud Events - Reject Cloud Events
Reject a batch of Cloud Events. The response will include the set of successfully rejected lock tokens, along with other failed lock tokens with their corresponding error information. Successfully rejected events will be dead-lettered and can no longer be received by a consumer.
POST {endpoint}/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:reject?api-version=2024-06-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (uri) |
The host name of the namespace, e.g. namespaceName1.westus-1.eventgrid.azure.net |
|
event
|
path | True |
string |
Event Subscription Name. |
|
topic
|
path | True |
string |
Topic Name. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| lockTokens | True |
string[] |
Array of lock tokens. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The request has succeeded. |
|
| Other Status Codes |
An unexpected error response. Headers x-ms-error-code: string |
Security
OAuth2Auth
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| https://eventgrid.azure.net/.default |
Examples
Reject Cloud Event
Sample request
POST myNamespaceName.westus-1.eventgrid.azure.net/topics/myTopic/eventsubscriptions/myEventSubscription:reject?api-version=2024-06-01
Sample response
{
"failedLockTokens": [],
"succeededLockTokens": [
"CgMKATESCQoHdG9rZW4tMQ=="
]
}
Definitions
| Name | Description |
|---|---|
|
Azure. |
The error object. |
|
Azure. |
A response containing error details. |
|
Azure. |
An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors. |
|
Failed |
Failed LockToken information. |
|
Reject |
The result of the Reject operation. |
Azure.Core.Foundations.Error
The error object.
| Name | Type | Description |
|---|---|---|
| code |
string |
One of a server-defined set of error codes. |
| details |
An array of details about specific errors that led to this reported error. |
|
| innererror |
An object containing more specific information than the current object about the error. |
|
| message |
string |
A human-readable representation of the error. |
| target |
string |
The target of the error. |
Azure.Core.Foundations.ErrorResponse
A response containing error details.
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
Azure.Core.Foundations.InnerError
An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.
| Name | Type | Description |
|---|---|---|
| code |
string |
One of a server-defined set of error codes. |
| innererror |
Inner error. |
FailedLockToken
Failed LockToken information.
| Name | Type | Description |
|---|---|---|
| error |
Error information of the failed operation result for the lock token in the request. |
|
| lockToken |
string |
The lock token of an entry in the request. |
RejectResult
The result of the Reject operation.
| Name | Type | Description |
|---|---|---|
| failedLockTokens |
Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description). |
|
| succeededLockTokens |
string[] |
Array of lock tokens for the successfully rejected cloud events. |