tencent cloud

Feedback

Configuring APIGW Connector

Last updated: 2022-05-05 16:02:46

    Overview

    You can configure API Gateway to process events delivered through webhook so as to use a third-party webhook to receive events generated by other systems. An API Gateway connector is an ideal cross-terminal event receiving connector in HTTP scenarios.

    An API Gateway connector is implemented in the push pattern. API Gateway monitors requests, generates the corresponding call events, delivers them to the event bus, and routes them to relevant services through event rules.

    Prerequisites

    You have created an event bus.

    Directions

    1. Log in to the EventBridge console and select Event Bus on the left sidebar.

    2. In the Event Bus list, select the event bus for which you want to configure an APIGW connector.

    3. On the Event Bus Details page, click Add in the connector configuration section.

    4. Enter the relevant information as prompted as shown below:

      Here, select API Gateway (APIGW) for Connector type.

    5. Click OK.

    6. Select Event Rule on the left sidebar.

    7. In the drop-down lists at the top of the Event Rule page, select the same connector information as that set during connector creation and click Create Event Rule as shown below:

    8. Enter the relevant information as prompted as shown below:

    9. Select API Gateway (APIGW) for Tencent Cloud service and configure the delivery target.

    10. Click OK.

    API Gateway connector data structure description

    {
      "specversion": "1.0",
      "id": "13a3f42d-7258-4ada-da6d-023a333b4662",
      "type": "connector:apigw",
      "source": "apigw.cloud.tencent",
      "subject": "qcs::apigw:ap-guangzhou:uid1250000000/appidxxx:Serverid/Appid",
      "time": "1615430559146",
      "region": "ap-guangzhou",
      "datacontenttype": "application/json;charset=utf-8",
      "data": {
          "headers": {
              "Accept-Language": "en-US,en,cn",
              "Accept": "text/html,application/xml,application/json",
              "Host": "service-3ei3tii4-251000691.ap-guangzhou.apigateway.myqloud.com",
              "User-Agent": "User Agent String"
          },
          "body": "{\"test\":\"body\"}",
          "stageVariables": {
              "stage": "release"
          },
          "path": "/test/value",
          "queryString": {
              "foo": "bar",
              "bob": "alice"
          },
          "httpMethod": "POST"
      }
    }
    

    The parameters are described as follows:

    Parameter Description
    path Records the complete path of the actual request.
    httpMethod Records the HTTP method of the actual request.
    queryString Records the complete query content of the actual request.
    body Records the content of the actual request after being converted into a String.
    headers Records the complete headers of the actual request.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support