Help Center/ EventGrid/ API Reference/ APIs/ Event Stream Management/ Starting/Stopping an Event Stream
Updated on 2025-11-07 GMT+08:00

Starting/Stopping an Event Stream

Function

This API is used to start or stop an event stream.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

URI

POST /v1/{project_id}/eventstreamings/operate/{eventstreaming_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant resource space ID.

eventstreaming_id

Yes

String

Event stream ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

operation

No

String

Operation type.

Response Parameters

Status code: 200

Table 4 Response header parameters

Parameter

Type

Description

X-Request-Id

String

This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname.

Table 5 Response body parameters

Parameter

Type

Description

eventStreamingID

String

Event stream ID.

Example Requests

Stop the event stream whose ID is 123.

POST https://{eg_endpoint}/v1/{project_id}/eventstreamings/operate/123

{
  "operation" : "PAUSE"
}

Example Responses

Status code: 200

Operation successful.

{
  "eventStreamingID" : "23709d68-54d5-423b-a6be-03302e893152"
}

Status Codes

Status Code

Description

200

Operation successful.

Error Codes

See Error Codes.