Obtaining the EG Trigger of a Function Flow
Function
This API is used to obtain the trigger of a function flow specified by ID. A trigger is a subscription with a function flow ID as the target.
URI
GET /v1/{project_id}/subscription-triggers/workflow/{workflow_id}
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        project_id  | 
      
        Yes  | 
      
        String  | 
      
        Tenant resource space ID.  | 
     
| 
        workflow_id  | 
      
        Yes  | 
      
        String  | 
      
        ID of the function flow.  | 
     
| 
        Parameter  | 
      
        Mandatory  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        offset  | 
      
        No  | 
      
        Integer  | 
      
        Offset, which is the position where the query starts. The value must be greater than or equal to 0.  | 
     
| 
        limit  | 
      
        No  | 
      
        Integer  | 
      
        Number of records displayed on each page. The value must be within the range [1, 1000].  | 
     
| 
        sort  | 
      
        No  | 
      
        String  | 
      
        Sorting mode of the query results.  | 
     
Request 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.  | 
     
Response Parameters
Status code: 200
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        total  | 
      
        Integer  | 
      
        Total number of records.  | 
     
| 
        size  | 
      
        Integer  | 
      
        Number of records displayed on the current page.  | 
     
| 
        items  | 
      
        Array of SubscriptionInfo objects  | 
      
        Object list.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        id  | 
      
        String  | 
      
        Subscription ID.  | 
     
| 
        name  | 
      
        String  | 
      
        Subscription name.  | 
     
| 
        description  | 
      
        String  | 
      
        Description of the subscription.  | 
     
| 
        type  | 
      
        String  | 
      
        Subscription type.  | 
     
| 
        status  | 
      
        String  | 
      
        Status.  | 
     
| 
        channel_id  | 
      
        String  | 
      
        ID of the event channel.  | 
     
| 
        channel_name  | 
      
        String  | 
      
        Name of the event channel.  | 
     
| 
        used  | 
      
        Array of SubscriptionUsedInfo objects  | 
      
        Label information.  | 
     
| 
        sources  | 
      
        Array of SubscriptionSourceInfo objects  | 
      
        List of subscription sources.  | 
     
| 
        targets  | 
      
        Array of SubscriptionTargetInfo objects  | 
      
        List of subscription targets.  | 
     
| 
        created_time  | 
      
        String  | 
      
        Time when the trigger is created.  | 
     
| 
        updated_time  | 
      
        String  | 
      
        Time when the trigger is updated.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        resource_id  | 
      
        String  | 
      
        Associated resource ID.  | 
     
| 
        owner  | 
      
        String  | 
      
        Management tenant account.  | 
     
| 
        description  | 
      
        String  | 
      
        Description.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        id  | 
      
        String  | 
      
        ID of the event subscription source.  | 
     
| 
        name  | 
      
        String  | 
      
        Name of the event subscription source.  | 
     
| 
        provider_type  | 
      
        String  | 
      
        Provider type of the event subscription source.  | 
     
| 
        detail  | 
      
        Object  | 
      
        List of event subscription source parameters.  | 
     
| 
        filter  | 
      
        Object  | 
      
        Filtering rule of the event subscription source.  | 
     
| 
        created_time  | 
      
        String  | 
      
        Time when the event subscription is created.  | 
     
| 
        updated_time  | 
      
        String  | 
      
        Time when the event subscription is updated.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        id  | 
      
        String  | 
      
        ID of the event subscription target.  | 
     
| 
        name  | 
      
        String  | 
      
        Name of the event subscription target.  | 
     
| 
        provider_type  | 
      
        String  | 
      
        Provider type of the event subscription target.  | 
     
| 
        connection_id  | 
      
        String  | 
      
        Connection ID used by the event subscription target.  | 
     
| 
        detail  | 
      
        Object  | 
      
        List of event subscription target parameters.  | 
     
| 
        kafka_detail  | 
      
        KafkaTargetDetail object  | 
      
        List of Kafka event subscription target parameters. The total length of this field after serialization cannot exceed 1024 bytes.  | 
     
| 
        smn_detail  | 
      
        SmnTargetDetail object  | 
      
        List of SMN event target parameters for the subscription. The total length cannot exceed 1024 bytes after serialization.  | 
     
| 
        eg_detail  | 
      
        EgTargetDetail object  | 
      
        List of EG event channel target parameters for the subscription. The total length cannot exceed 1,024 bytes after serialization. This field is mandatory for EG channel event targets.  | 
     
| 
        apigw_detail  | 
      
        ApigwTargetDetail object  | 
      
        List of APIGW URL target parameters for the subscription. The total length cannot exceed 1,024 bytes after serialization. This field is mandatory for APIGW event targets.  | 
     
| 
        retry_times  | 
      
        Integer  | 
      
        Number of retries.  | 
     
| 
        transform  | 
      
        TransForm object  | 
      
        Transform rule of the event subscription target.  | 
     
| 
        dead_letter_queue  | 
      
        DeadLetterQueue object  | 
      
        List of dead letter queue parameters for the subscription.  | 
     
| 
        created_time  | 
      
        String  | 
      
        Time when the event subscription is created.  | 
     
| 
        updated_time  | 
      
        String  | 
      
        Time when the event subscription is updated.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        topic  | 
      
        String  | 
      
        Topic.  | 
     
| 
        keyTransform  | 
      
        keyTransform object  | 
      
        Key value rule.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        Type of the key value rule.  | 
     
| 
        value  | 
      
        String  | 
      
        Key value rule. This parameter is mandatory when type is VARIABLE or CONSTANT.  | 
     
| 
        template  | 
      
        String  | 
      
        Key value rule template. This parameter is mandatory when type is VARIABLE.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        urn  | 
      
        String  | 
      
        Specifies the topic URN.  | 
     
| 
        agency_name  | 
      
        String  | 
      
        Agency name.  | 
     
| 
        subject_transform  | 
      
        subject_transform object  | 
      
        Title rule.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        Type of the title rule.  | 
     
| 
        value  | 
      
        String  | 
      
        Title rule.  | 
     
| 
        template  | 
      
        String  | 
      
        Title rule template. This parameter is mandatory when type is set to VARIABLE.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        target_project_id  | 
      
        String  | 
      
        Target project ID.  | 
     
| 
        target_channel_id  | 
      
        String  | 
      
        Target channel ID.  | 
     
| 
        target_region  | 
      
        String  | 
      
        Target region.  | 
     
| 
        cross_region  | 
      
        Boolean  | 
      
        Indicates whether cross-region feature is enabled.  | 
     
| 
        cross_account  | 
      
        Boolean  | 
      
        Indicates whether cross-account feature is enabled.  | 
     
| 
        agency_name  | 
      
        String  | 
      
        Agency name.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        url  | 
      
        String  | 
      
        Target URL.  | 
     
| 
        invocation_http_parameters  | 
      
        InvocationHttpParameters object  | 
      
        Parameters for invoking HTTP.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        header_parameters  | 
      
        Array of HeaderParameter objects  | 
      
        Object list.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        is_value_secret  | 
      
        Boolean  | 
      
        Whether to encrypt the value.  | 
     
| 
        key  | 
      
        String  | 
      
        Header key.  | 
     
| 
        value  | 
      
        String  | 
      
        Header value.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        type  | 
      
        String  | 
      
        Type of the transform rule.  | 
     
| 
        value  | 
      
        String  | 
      
        For a constant type rule, the field is the constant content definition. For a variable type rule, the field is a variable definition and the content must be a JSON object string. A maximum of 100 variables are supported, and nested structures are not supported. The variable name can contain a maximum of 64 characters. Only letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. It must start with a letter or digit and cannot start with HC.. The variable value expression can be a constant or JSONPath expression. The string length cannot exceed 1024 characters.  | 
     
| 
        template  | 
      
        String  | 
      
        Template definition of the rule content when the rule is of the variable type. Defined variables can be referenced.  | 
     
Example Requests
Obtain the EG trigger of a function flow.
GET https://{endpoint}/v1/{project_id}/subscription-triggers/workflow/{workflow_id}
 Example Responses
Status code: 200
Operation successful.
{
  "total" : 1,
  "size" : 1,
  "items" : [ { } ]
}
 Status Codes
| 
        Status Code  | 
      
        Description  | 
     
|---|---|
| 
        200  | 
      
        Operation successful.  | 
     
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.