応答
この要素は、 対応関連情報について または a 熱 意/ヘルプ/ zest -仕様ファイル/url/操作/導入/"> . 複数の 熱 意/ヘルプ/ zest -仕様ファイル/コンテンツ/紹介/"> あなたの条件に基づく異なったエンコーディングの応答に。
可能な場所
- 熱 意/ヘルプ/ zest -仕様ファイル/コンポーネント/">コンポーネント - 熱 意/ヘルプ/ zest -指定ファイル/url/操作/導入/">操作
子要素
- 熱 意/ヘルプ/ zest -仕様ファイル/説明/">説明 - 熱意 /ヘルプ/ - zest 仕様ファイル/コンテンツ/紹介/">コンテンツ 繰り返し - 熱意 /ヘルプ/ -仕 zest 様ファイル/引数/">引 数 繰り返し
属性
| お名前 | タイプ | 説明 |
|---|---|---|
| ステータス
必須 | 整数 | 応答のステータスコードを定義します。 ZEST すべてのグローバル Http レスポンスステータスコードをサポートします。 チェック こちら 標準ステータスコードの場合。 |
| お名前
必須 | 文字列 | 回答の名前です。 |
| 可視性 | 文字列 (列数) | 要素を表示して使用できるユーザーを決定します。 可能な値は、 内部, プライベート, パブリック. デフォルト値はパブリックです。 |
| 予期せぬエラー | ブール | これは、リソース内の未処理のエラー(内部サーバーエラー)を表します。
|
注:
ザ お名前 属性は応答に対して必須です。 熱 意/ヘルプ/ zest -仕様ファイル/コンポーネント/"> .
例
以下は、旅行リソースの取得操作のサンプルレスポンス json です。
copy
success response
{
"trips": [
{
"trip_name":"Spring Break - John Doe",
"trip_id":"5545974000000087515",
"destination": "Bali",
"start_time": "2023-11-13T17:30:00",
"end_time": "2023-11-17T22:30:00",
"no_of_days": 4
},
{
"trip_name":"christmas Break - Diana Williams",
"trip_id":"5545974000000087565",
"destination": "London",
"start_time": "2023-12-20T21:30:00",
"end_time": "2023-12-28T09:30:00",
"no_of_days": 7
}
]
}
copy
"Content-Language" argument: value is "en-US"
最初のステップは、 熱 意/ヘルプ/ zest -仕様ファイル/リソース構成/導入/#attributes">プライマリ構造 で 熱 意/ヘルプ/ zest -仕様ファイル/コンポーネント/"> .
copy
<components>
<structure ref-name="trips" name="trips_data">
<property name="trip_name" type="string"/>
<property name="trip_id" type="long_string"/>
<property name="destination" type="string"/>
<property name="start_time" type="datetime"/>
<property name="end_time" type="datetime"/>
<property name="no_of_days" type="string"/>
</structure>
</components>
次に、これらすべての詳細で応答を定義します。
copy
<response name="get_success" status="200">
<description> This is the response of an overall fetch of Fields API resource. </description>
<content>
<encode type="application/json" />
<structure>
<property name="trips" type="collections">
<structure-ref name="trips" />
</property>
</structure>
</content>
<argument name="response_argument" location="header" required="true">
<content>
<encode type="application/json" />
<structure>
<property name="Content-Language" type="string" values="en-US" />
</structure>
</content>
</argument>
</response>
Last Updated 2026-02-06 15:55:45 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit