Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

If a flow is started by an HTTP request, it can create the HTTP response sent to the caller. This functionality is only available if the execution type of the flow is set to "Synchronous", i.e. the caller only receives an HTTP response after the flow has been executed. The execution type can be adjusted at any time in Flow Studio.

To generate a specific HTTP response, the flow must store it in the flow context under the JSON path $.out.eventData. If only the JSON content of the response is to be defined, it is sufficient to store this under the JSON path $.out.eventData.content.

The complete structure of the HTTP response can be found in the type "http_response" from the following JSON schema:

{
  "$id": "https://connect.galileo-group.de/services/galileogroup/connect/1.0/schemas/http.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "JSON Schema for HTTP specific types (v1.0)",

  "$defs": {

    "http_header": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "title": "Name (key)"
        },
        "value": {
          "type": "string",
          "title": "Value"
        }
      },
      "required": [ "key" ],
      "title": "HTTP header"
    },

    "http_headers": {
      "type": "array",
      "items": { "$ref": "#/$defs/http_header" },
      "default": [],
      "title": "Array of HTTP headers"
    },

    "http_params": {
      "type": "object",
      "title": "HTTP request parameters used in URI and/or query string"
    },

    "http_content": {
      "title": "HTTP content (generic)"
    },

    "http_status": {
      "type": "object",
      "properties": {
        "httpStatusCode": {
          "type": "number",
          "title": "HTTP status code"
        },
        "reason": {
          "type": "string",
          "default": "",
          "title": "HTTP status reason"
        }
      },
      "required": [ "httpStatusCode" ],
      "title": "HTTP response status"
    },

    "http_request": {
      "type": "object",

      "properties": {
        "headers": { "$ref": "#/$defs/http_headers" },
        "params": { "$ref": "#/$defs/http_params" },
        "content": { "$ref": "#/$defs/http_content" },
        "status": { "$ref": "#/$defs/http_status" }
      },
      "title": "HTTP request"
    },

    "http_response": {
      "type": "object",

      "properties": {
        "headers": { "$ref": "#/$defs/http_headers" },
        "content": { "$ref": "#/$defs/http_content" },
        "status": { "$ref": "#/$defs/http_status" }
      },
      "title": "HTTP response"
    }

  }
}

  • No labels