Updated on 2025-08-13 GMT+08:00

ThirdPartyAPI-v2

Call the ThirdPartyAPI-v2 extension to configure web APIs and call third-party APIs.

Notes and Constraints

  • The ThirdPartyAPI-v2 extension requires certificate verification. Custom certificate is not supported.
  • If the API return code is not 2XX, the operation fails.

Adding the Extension with GUI

Add the ThirdPartyAPI-v2 extension when you orchestrate a pipeline. Set parameters as show in Table 1.

Table 1 Parameter description

Parameter

Description

Name

Extension name.

  • Enter only letters, digits, hyphens (-), underscores (_), commas (,), semicolons (;), colons (:), periods (.), slashes (/), parentheses (), and spaces.
  • Enter at least one character.

API Method

Select GET, POST, PATCH, PUT, or DELETE.

API URL

API that can be called by the public network. Certificate verification is required.

API Header

Configure key-value pairs.

API Parameter

Configure key-value pairs.

API Body

If the request method is POST, PATCH, or PUT, enter the body in JSON format.

API Output

The root object name is response, which includes multiple outputs.

  • If the output key is code, refer to the following figure to obtain the specific request return code.

  • If the returned request header contains the date field, refer to the following figure to obtain the date value.

  • To output the entire body, refer to the following figure.

  • If the returned JSON body is as follows and you need to obtain the value of field, refer to the following figure.
    {	
        "result": {		
           "field": "value",		
           "field1": "value1"	
        }
    }

Adding the Extension with YAML

Add the ThirdPartyAPI-v2 extension when you orchestrate a pipeline. Configure the YAML syntax as follows:

  • ThirdPartyAPI-v2
    uses: official_third_part_invoke
        with:
          API_METHOD: GET
          API_URL: htps://demo
          API_HEADER: '[{"key":"Content-Type","value":"application/json"}]'
          API_PARAM: '[{"key":"name","value":"value"}]'
          API_BODY: "{}"
          API_OUTPUT: '[{"key":"code","value":"response.status"}]'