本文へスキップ

Unified Endpoint Response Format

As Soracom Beam, Funnel, Funk, and Harvest will return response messages to the device in various formats depending on entry point and forwarding destin...

コピー/保存

このページはまだ日本語では利用できません。現在は英語版を表示しています。ブラウザの翻訳機能をご利用ください。

ブラウザで翻訳する
  • Chrome / Edge: アドレスバーの翻訳アイコン、またはページを右クリックして「日本語に翻訳」を選択してください。
  • Safari: アドレスバーの「aA」メニューから「翻訳」を選択してください。

翻訳メニューが表示されない場合は、ブラウザ設定で翻訳機能が有効になっているか確認してください。

英語版を見る

Response Format

As Soracom Beam, Funnel, Funk, and Harvest will return response messages to the device in various formats depending on entry point and forwarding destination protocol or service, Unified Endpoint allows you to control how each of those responses should be handled when sending a response to the device by setting the Unified Endpoint Format option.

Unified Format

When selecting the Unified response format, Unified Endpoint will combine the responses from all services and return it to the device.

When all redirection services return a successful response, the Unified Response format will look like this:

{
  statusCode: 200,
  body: {
    "result": "ok",
    "detail": {
      "beam": { statusCode: 200, body: "...." },
      "funnel": { statusCode: 204, body: "...." },
      "funk": { statusCode: 204, body: "...." },
      "harvest": { statusCode: 204, body: "...." }
    }
  }
}

When one or more of the redirection services returns a failure response, the Unified Response format will look like this:

{
  statusCode: 207,
  body: {
    "result": "ng",
    "detail": {
      "beam": { statusCode: 200, body: "...." },
      "funnel": { statusCode: 204, body: "...." },
      "funk": { statusCode: 204, body: "...." },
      "harvest": { statusCode: 400, body: "...." }
    }
  }
}

When setting the Auto (default) option, Unified Endpoint will return the response using Unified Response format when multiple redirection services are enabled. When only one redirection service is enabled, Unified Endpoint will return the response received from the service as-is.

Custom Format

Setting a Custom format allows you to define a specific response based on the responses received by Unified Endpoint.

When all redirection destinations return a success response, Unified Endpoint will return a response based on the Custom response on success configuration.

When one or more redirection destinations return a failure response, Unified Endpoint will return a response based on the Custom response on failure configuration.

The following parameters can be configured for each custom response format:

  • Status code - The status code to send as part of the response.
  • Content Type - The value to set in the Content-Type header of the response, such as application/json.
  • Content body - The value of the response body.
  • Skip status code - When enabled, Unified Endpoint will only send the Content body to devices connected using TCP or UDP, omitting the Status code.
検索 Escで閉じる / Enterで検索結果