Calling Third-Party APIs
You can configure web APIs to call third-party APIs.
Constraints
- The ThirdPartyAPI-v2 extension requires certificate verification. Custom certificate is not supported.
- If the API return code is not 2XX, the operation fails.
Configuration Method
- Add the ThirdPartyAPI-v2 extension when you orchestrate a pipeline.
Figure 1 Adding the ThirdPartyAPI-v2 extension
- Set parameters as shown in the following table.
Parameter
Description
Name
Extension name.
- Enter only letters, digits, hyphens (-), underscores (_), commas (,), semicolons (;), colons (:), periods (.), slashes (/), parentheses (), and spaces.
- Enter at least one character.
Request method
Select GET, POST, PATCH, PUT, or DELETE.
API URL
API that can be called by the public network. Certificate verification is required.
Request header
Configure key-value pairs.
Request parameter
Configure key-value pairs.
Request 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.
- To obtain the specific request return code, and if the output key is code, refer to the following figure.
- 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" } }
- After the extension is executed, if you want to use the output, see Pipeline Contexts.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot