OrbitX icon

OrbitX

Consume OrbitX API

Overview

The OrbitX node's "Custom Request" operation under the "Custom" resource allows users to perform arbitrary HTTP requests against their OrbitX API instance. This is particularly useful for advanced users who need to interact with custom endpoints or features not covered by the node's predefined operations. Typical scenarios include integrating with new API routes, sending specialized data, or testing new OrbitX API capabilities.

Practical examples:

  • Sending a POST request to a custom endpoint for internal automation.
  • Fetching data from a newly added API route.
  • Updating resources using a PATCH or PUT method with custom headers and query parameters.

Properties

Name Type Meaning
Endpoint Suffix string The path appended to the base URL (e.g., /meu/custom/path). Specifies the target endpoint.
HTTP Method options The HTTP verb to use for the request (GET, POST, PUT, PATCH, DELETE).
Query Parameters fixedCollection Key-value pairs sent as URL query parameters.
Headers fixedCollection Custom HTTP headers to include in the request.
Request Body (JSON) json JSON object sent as the body of the request (for methods like POST, PUT, PATCH).

Output

  • The node outputs the raw JSON response returned by the OrbitX API for your custom request.
  • The structure of the output depends entirely on the specific endpoint you call and its response format.
  • No binary data is handled in this operation; all responses are treated as JSON.

Example output:

[
  {
    "result": "success",
    "data": { /* ... */ }
  }
]

(Actual fields will vary based on the custom endpoint.)


Dependencies

  • OrbitX API credentials: Requires an n8n credential named orbitxApi containing:
    • endpointUrl: Base URL of your OrbitX API.
    • bearerToken: Bearer token for authentication.
    • secretKey: (May be required for some endpoints.)
  • n8n configuration: Ensure the OrbitX node is installed and properly configured in your n8n instance.

Troubleshooting

Common issues:

  • Invalid endpoint suffix: If the Endpoint Suffix does not match a valid API route, you may receive a 404 error.
  • Authentication errors: Missing or incorrect bearer token will result in 401 Unauthorized errors.
  • Malformed JSON body: If the Request Body (JSON) is not valid JSON, the request will fail.
  • Incorrect HTTP method: Using the wrong method (e.g., GET instead of POST) may cause the API to reject the request.

Error messages and resolutions:

  • "EndpointURL inválida para extrair subdomínio": Check that your endpointUrl in credentials starts with https:// and is correctly formatted.
  • 401 Unauthorized: Verify your bearer token and ensure it has not expired.
  • 400 Bad Request: Double-check your query parameters, headers, and request body for correctness.

Links and References


Discussion