詳細情報:
HTTP アクションを使用した Integration Procedure の作成
NASA をリモートサイトとして設定し、NASA API キーを取得したら、その日の天文写真を取得する Integration Procedure のサンプルを作成して実行できます。
- HTTP アクションコンポーネントを追加します。
-
HTTP アクションコンポーネントを次の設定で設定します。
プロパティ
値
HTTP パス
https://api.nasa.gov/planetary/apod HTTP のメソッド
GETREST OPTIONS: パラメーターを追加
- キー:
api_key - 値:
%ApiKey%
- キー:
-
HTTP アクションの下の [構造] パネルに応答アクションコンポーネントを追加し、次の設定で設定します。
プロパティ
値
送信 JSON パス
HTTPAction1送信 JSON ノード
PictureInfo -
入力 JSON を編集し、キー
ApiKeyと API キーを値として追加します。 -
[Execute (実行)] をクリックします。出力は、次の例のようになります。
{ "PictureInfo": { "url": "https://apod.nasa.gov/apod/image/2006/Eclipse-under-bamboos1024c.jpg", "title": "Eclipse under the Bamboo", "service_version": "v1", "media_type": "image", "hdurl": "https://apod.nasa.gov/apod/image/2006/Eclipse-under-bamboos.jpg", "explanation": "Want to watch a solar eclipse safely? Try looking down instead of up, though you might discover you have a plethora of images to choose from. For example, during the June 21st solar eclipse this confusing display appeared under a shady bamboo grove in Pune, India. Small gaps between close knit leaves on the tall plants effectively created a network of randomly placed pinholes. Each one projected a separate image of the eclipsed Sun. The snapshot was taken close to the time of maximum eclipse in Pune when the Moon covered about 60 percent of the Sun's diameter. But an annular eclipse, the Moon in silhouette completely surrounded by a bright solar disk at maximum, could be seen along a narrow path where the Moon's dark shadow crossed central Africa, south Asia, and Ch", "date": "2020-06-26", "copyright": "Somak Raychaudhury" } } -
(省略可能)
urlまたはhdurlの値をブラウザーに貼り付けて、画像を表示します。

