Help Center/ EventGrid/ API Reference/ Getting Started
Updated on 2023-05-24 GMT+08:00

Getting Started

Application Scenario

You can create a custom event source based on service requirements.

For details on how to call APIs, see Calling APIs.

Prerequisites

  • IAM endpoint obtained from "Regions and Endpoints".
  • EG endpoint obtained from "Regions and Endpoints".

Creating an Event Source

  1. Create a custom channel by calling the event channel creation API.

    POST https://{endpoint}/v1/{project_id}/channels
    
    {
      "name" : "channel",
      "description" : "first channel"
    }
    • name: custom channel name.
    • description: description of a custom channel.

  2. Create a custom event source by calling the event source creation API.

    POST https://{endpoint}/v1/{project_id}/sources
    
    {
      "name" : "first-source",
      "description" : "first event source",
      "channal_id" : "bd14144e-8f3c-43d6-bdfd-bf09b52c2b96"
    }
    • name: custom event source name.
    • description: description of a custom event source.
    • channal_id: Obtain the channel ID from the response of 1.