Pangolin icon

Pangolin

Interact with the Pangolin API

Actions142

Target → Create a target.

AI-generated

Summary

Create a new target associated with a specific resource by sending the required target details in the request body.

Inputs

  • Resource ID (required) — The ID of the resource to which the target will be created.
  • Body (required) — A JSON object containing the target details such as siteId (number, required), ip (string, required), port (integer, required), and optional health check and routing parameters (e.g., method, enabled, hcEnabled, hcPath, hcScheme, hcMode, hcHostname, hcPort, hcInterval, hcUnhealthyInterval, hcTimeout, hcHeaders[], hcFollowRedirects, hcMethod, hcStatus, path, pathMatchType, rewritePath, rewritePathType, priority).
  • Options — Additional options such as 'Raw Response' to return the full response data instead of splitting arrays into individual items.

Output shape

The response from the API representing the created target as a JSON object. If 'Raw Response' option is enabled, the full response is returned; otherwise, the JSON object or array elements are emitted as individual items.

Errors during execution will cause the workflow to fail unless 'Continue On Fail' is enabled, in which case error messages are output per item. The target creation requires a valid resource ID and a properly structured JSON body; invalid JSON will raise an error.

Examples

Example 1: Create a target for a resource with specific target details

Provide the Resource ID and a JSON body with target parameters such as 'siteId', 'ip', and 'port'. Optionally configure health check settings within the body.

Discussion