Actions6
- Allowed Operations Actions
- Composite Requests Actions
- Models Actions
- Query Actions
- User Views Actions
Overview
This node implements a composite request operation for a service API, specifically the "Post Services Composite" under the "Composite Requests" resource. It allows users to send a batch of multiple sub-requests bundled into a single POST request to an external API endpoint that supports composite operations. This is useful when you want to perform several related API calls in one network request, improving efficiency and reducing latency.
A practical example is creating or updating multiple related records in a system (e.g., accounts payable vendors) by specifying each sub-request's method, path, headers, and body within a single composite request payload.
Properties
| Name | Meaning |
|---|---|
| Additional Body Fields | Optional fields to add to the POST request body. The main configurable field here is Body, which expects a JSON schema describing a single sub-request. This includes: HTTP method (e.g., POST), API path, headers (like Idempotency-Key), the request body content, and a result reference name to identify the response part. |
The Body property allows defining the structure of each individual request inside the composite request, enabling complex multi-operation transactions.
Output
The node outputs JSON data representing the response from the composite request API. This typically includes the results of each sub-request identified by their resultReference names, allowing downstream nodes to access specific parts of the composite response.
If the API supports binary data responses, the node would handle them accordingly, but based on the provided code and properties, the output focuses on JSON structured data.
Dependencies
- Requires an API key credential for authentication with the target service.
- Needs the base URL of the API configured in credentials.
- Depends on the
@avantguardllc/n8n-openapi-nodepackage for building properties and handling requests. - Uses an OpenAPI specification (
openapi.json) bundled with the node to define available operations and parameters.
Troubleshooting
- Invalid JSON in Body Field: Since the
Bodyproperty expects valid JSON, malformed JSON will cause parsing errors. Ensure the JSON syntax is correct. - Missing Required Headers: The composite request may require specific headers like
Idempotency-Key. Omitting these can lead to API errors. - Authentication Failures: Incorrect or missing API credentials will prevent successful requests.
- API Endpoint Errors: If the specified paths or methods in sub-requests are invalid or unsupported, the composite request will fail.
- Large Payloads: Sending too many or very large sub-requests might exceed API limits or timeouts.
To resolve these issues, verify JSON formatting, ensure all required headers and credentials are set, and consult the API documentation for valid endpoints and payload sizes.
Links and References
- Composite API Pattern — General concept of composite requests.
- Documentation for the target API service (not provided here) should be consulted for details on supported composite request formats and limitations.