SlideShare uma empresa Scribd logo
1 de 11
© Hitachi, Ltd. 2021. All rights reserved.
日立製作所 OSSソリューションセンタ
2021/7/8
横井 一仁
Node-REDからREST APIに接続
1
© Hitachi, Ltd. 2021. All rights reserved.
Node-REDは、クラウド上で
REST APIをマッシュアップした
アプリケーションの開発に最適
[ REST API接続の例 ]
• 天気APIから気象情報を取得して表示
• クラウド/コンテナで提供されている
人工知能APIを用いて画像認識
• チャットサービスのウェブフックを
用いて、メッセージを投稿
システム連携のハブとなるNode-RED
REST API
クラウド コンテナ
REST APIへ接続し
機能を利用
チャット
サービス
クラウド上
のNode-RED
2
© Hitachi, Ltd. 2021. All rights reserved.
http requestノードを用いて、REST APIに接続する方法を紹介
• 基本の呼び出し方法
- GETメソッド
- POSTメソッド
- GETメソッド+パラメータ指定
• 認証付きAPIの呼び出し方法
- Barerer認証
- Basic認証
- ヘッダ認証
-> 本発表では、質問応答APIを用いて
基本の呼び出し方法を説明
書籍の内容
データ取得
(GET+パラメータ)
状態取得
(GET)
データ登録 (POST) ペットストア
REST API
購入可:2匹
購入済:1匹
翻訳対象の日本語
翻訳API
“Node-REDは
素晴らしいツールです”
“Node-RED is
a great tool”
APIキーを
用いてアクセス
英訳結果
基本呼び出しの説明で使用したペットストアAPI
認証付きAPI呼び出しの説明で使用した翻訳API
3
© Hitachi, Ltd. 2021. All rights reserved.
文章に対する質問文を渡すと、
質問の回答を返すAPI
• Metadataエンドポイント (GET)
APIに関する情報を返す
エンドポイント
• Predictエンドポイント (POST)
質問応答を行うエンドポイント
OpenAPIドキュメント(APIの仕様)も存在
MAX Question Answering (質問応答API)
http://max-question-answering.codait-prod-
41208c73af8fca213512856c7a09db52-0000.us-east.containers.appdomain.cloud
文章と質問文を
組みにしてPOST
4
© Hitachi, Ltd. 2021. All rights reserved.
injectノード、http requestノード、debugノードを順に接続したフロー
Metadataエンドポイントへアクセス(GETメソッドの呼び出し方)
http request
ノードの設定
(1) URLを入力
(2) 型をJSON
に変更
5
© Hitachi, Ltd. 2021. All rights reserved.
http requestノードの前に、POSTするデータをtemplateノードに設定したフロー
Predictエンドポイントへアクセス(POSTメソッドの呼び出し方)
(2) 型をJSONに変更
(1) POSTする
データを貼り付け
(3) POSTメソッドに変更
(5) 型をJSONに変更
http requestノードの設定
(4) URLを入力
templateノードの設定
6
© Hitachi, Ltd. 2021. All rights reserved.
OpenAPIドキュメントがある場合、オリジナルノードを作りアクセスすることも可能
オリジナルノードからアクセス(Node generatorの使い方)
REST API
OpenAPI
ドキュメント
(3) Node-REDへ
インストール
オリジナル
ノードの
ソースコード
(4) オリジナルノード
からアクセス
(2) Node generatorを
用いてノードを作成
7
© Hitachi, Ltd. 2021. All rights reserved.
Node-REDダッシュボードやGoogle翻訳ノードを用いて、
日本語で入力した質問に回答してくれる質問応答システムのUIを開発
応用: Node-REDダッシュボード連携
質問応答システムのUI
開発したフロー
プロフィール文
を基に回答
8
© Hitachi, Ltd. 2021. All rights reserved.
http requestノードから様々なREST API、ウェブサイトに接続して、
便利なアプリケーションを開発してみよう。
[ 開発例 ]
• Connpass APIを用いて、興味のある勉強会を自動メール通知
• アドベントカレンダの投稿枠の予約/キャンセルをSlack通知
• Node-REDの新バージョンリリースを、メーリングリストへ通知
まとめ
© Hitachi, Ltd. 2021. All rights reserved. 9
END
Node-REDからREST APIに接続
2021/7/8
日立製作所 OSSソリューションセンタ
横井 一仁
10
© Hitachi, Ltd. 2021. All rights reserved.
• Node-REDは、OpenJS Foundationの米国および
その他の国における登録商標または商標である。
• Googleは、Google LLCの米国および
その他の国における登録商標または商標である。
• Slackは、Slack Technologies, Incの米国および
その他の国における登録商標または商標である。
• その他記載の会社名、製品名などは、
それぞれの会社の商標もしくは登録商標です。
商標について

Mais conteúdo relacionado

Mais procurados

Node-REDのプログラミングモデル
Node-REDのプログラミングモデルNode-REDのプログラミングモデル
Node-REDのプログラミングモデルAtsushi Kojo
 
Redisの特徴と活用方法について
Redisの特徴と活用方法についてRedisの特徴と活用方法について
Redisの特徴と活用方法についてYuji Otani
 
インフラCICDの勘所
インフラCICDの勘所インフラCICDの勘所
インフラCICDの勘所Toru Makabe
 
シリコンバレーの「何が」凄いのか
シリコンバレーの「何が」凄いのかシリコンバレーの「何が」凄いのか
シリコンバレーの「何が」凄いのかAtsushi Nakada
 
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsiderMoq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider貴志 上坂
 
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところY Watanabe
 
バッチは地味だが役に立つ
バッチは地味だが役に立つバッチは地味だが役に立つ
バッチは地味だが役に立つapkiban
 
show コマンド結果をパースする方法あれこれ #npstudy
show コマンド結果をパースする方法あれこれ #npstudyshow コマンド結果をパースする方法あれこれ #npstudy
show コマンド結果をパースする方法あれこれ #npstudyakira6592
 
テストコードの DRY と DAMP
テストコードの DRY と DAMPテストコードの DRY と DAMP
テストコードの DRY と DAMPYusuke Kagata
 
AWS X-Rayによるアプリケーションの分析とデバッグ
AWS X-Rayによるアプリケーションの分析とデバッグAWS X-Rayによるアプリケーションの分析とデバッグ
AWS X-Rayによるアプリケーションの分析とデバッグAmazon Web Services Japan
 
Node-REDをIoTビジネスに適用するために苦労した3つの話
Node-REDをIoTビジネスに適用するために苦労した3つの話Node-REDをIoTビジネスに適用するために苦労した3つの話
Node-REDをIoTビジネスに適用するために苦労した3つの話Tomohiro Nakajima
 
世界一わかりやすいClean Architecture
世界一わかりやすいClean Architecture世界一わかりやすいClean Architecture
世界一わかりやすいClean ArchitectureAtsushi Nakamura
 
DockerとPodmanの比較
DockerとPodmanの比較DockerとPodmanの比較
DockerとPodmanの比較Akihiro Suda
 
クラウド時代だからSpring-Retryフレームワーク
クラウド時代だからSpring-Retryフレームワーククラウド時代だからSpring-Retryフレームワーク
クラウド時代だからSpring-RetryフレームワークY Watanabe
 
GitLab CI/CD パイプライン
GitLab CI/CD パイプラインGitLab CI/CD パイプライン
GitLab CI/CD パイプラインTetsurou Yano
 
UIbuilderを使ったフロントエンド開発
UIbuilderを使ったフロントエンド開発UIbuilderを使ったフロントエンド開発
UIbuilderを使ったフロントエンド開発Atsushi Kojo
 
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #1320210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13Amazon Web Services Japan
 

Mais procurados (20)

Node-REDのプログラミングモデル
Node-REDのプログラミングモデルNode-REDのプログラミングモデル
Node-REDのプログラミングモデル
 
Redisの特徴と活用方法について
Redisの特徴と活用方法についてRedisの特徴と活用方法について
Redisの特徴と活用方法について
 
インフラCICDの勘所
インフラCICDの勘所インフラCICDの勘所
インフラCICDの勘所
 
Node-RED v2.0新機能紹介
Node-RED v2.0新機能紹介Node-RED v2.0新機能紹介
Node-RED v2.0新機能紹介
 
シリコンバレーの「何が」凄いのか
シリコンバレーの「何が」凄いのかシリコンバレーの「何が」凄いのか
シリコンバレーの「何が」凄いのか
 
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsiderMoq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
 
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
ツール比較しながら語る O/RマッパーとDBマイグレーションの実際のところ
 
バッチは地味だが役に立つ
バッチは地味だが役に立つバッチは地味だが役に立つ
バッチは地味だが役に立つ
 
show コマンド結果をパースする方法あれこれ #npstudy
show コマンド結果をパースする方法あれこれ #npstudyshow コマンド結果をパースする方法あれこれ #npstudy
show コマンド結果をパースする方法あれこれ #npstudy
 
テストコードの DRY と DAMP
テストコードの DRY と DAMPテストコードの DRY と DAMP
テストコードの DRY と DAMP
 
AWS X-Rayによるアプリケーションの分析とデバッグ
AWS X-Rayによるアプリケーションの分析とデバッグAWS X-Rayによるアプリケーションの分析とデバッグ
AWS X-Rayによるアプリケーションの分析とデバッグ
 
Node-REDをIoTビジネスに適用するために苦労した3つの話
Node-REDをIoTビジネスに適用するために苦労した3つの話Node-REDをIoTビジネスに適用するために苦労した3つの話
Node-REDをIoTビジネスに適用するために苦労した3つの話
 
世界一わかりやすいClean Architecture
世界一わかりやすいClean Architecture世界一わかりやすいClean Architecture
世界一わかりやすいClean Architecture
 
DockerとPodmanの比較
DockerとPodmanの比較DockerとPodmanの比較
DockerとPodmanの比較
 
クラウド時代だからSpring-Retryフレームワーク
クラウド時代だからSpring-Retryフレームワーククラウド時代だからSpring-Retryフレームワーク
クラウド時代だからSpring-Retryフレームワーク
 
GitLab CI/CD パイプライン
GitLab CI/CD パイプラインGitLab CI/CD パイプライン
GitLab CI/CD パイプライン
 
分散トレーシング技術について(Open tracingやjaeger)
分散トレーシング技術について(Open tracingやjaeger)分散トレーシング技術について(Open tracingやjaeger)
分散トレーシング技術について(Open tracingやjaeger)
 
WebSocket / WebRTCの技術紹介
WebSocket / WebRTCの技術紹介WebSocket / WebRTCの技術紹介
WebSocket / WebRTCの技術紹介
 
UIbuilderを使ったフロントエンド開発
UIbuilderを使ったフロントエンド開発UIbuilderを使ったフロントエンド開発
UIbuilderを使ったフロントエンド開発
 
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #1320210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
 

Semelhante a Node-REDからREST APIに接続

Node-REDのノード開発容易化ツール Node generator
Node-REDのノード開発容易化ツールNode generatorNode-REDのノード開発容易化ツールNode generator
Node-REDのノード開発容易化ツール Node generatorBMXUG
 
Javaアプリケーションの モダナイゼーションアプローチ
Javaアプリケーションの モダナイゼーションアプローチJavaアプリケーションの モダナイゼーションアプローチ
Javaアプリケーションの モダナイゼーションアプローチCData Software Japan
 
プログラム・マネジメント @ Open棟梁プロジェクト
プログラム・マネジメント @ Open棟梁プロジェクトプログラム・マネジメント @ Open棟梁プロジェクト
プログラム・マネジメント @ Open棟梁プロジェクトDaisuke Nishino
 
ノンコーディング・超高速のApi 開発・運用基盤「cdata api server」のご紹介
ノンコーディング・超高速のApi 開発・運用基盤「cdata api server」のご紹介ノンコーディング・超高速のApi 開発・運用基盤「cdata api server」のご紹介
ノンコーディング・超高速のApi 開発・運用基盤「cdata api server」のご紹介CData Software Japan
 
IBM Blluemix を Pepper とつないでみよう
IBM Blluemix を Pepper とつないでみようIBM Blluemix を Pepper とつないでみよう
IBM Blluemix を Pepper とつないでみようTakuji Kawata
 
【Japan Partner Conference 2019】遂に来た! フルマーネージド Azure Red Hat OpenShift で実現する O...
【Japan Partner Conference 2019】遂に来た! フルマーネージド Azure Red Hat OpenShift で実現する O...【Japan Partner Conference 2019】遂に来た! フルマーネージド Azure Red Hat OpenShift で実現する O...
【Japan Partner Conference 2019】遂に来た! フルマーネージド Azure Red Hat OpenShift で実現する O...日本マイクロソフト株式会社
 
APIに関するセッション資料
APIに関するセッション資料APIに関するセッション資料
APIに関するセッション資料CData Software Japan
 
【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜
【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜
【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜日本マイクロソフト株式会社
 
Tech summit 2018_ad15_ver_1106
Tech summit 2018_ad15_ver_1106Tech summit 2018_ad15_ver_1106
Tech summit 2018_ad15_ver_1106Shotaro Suzuki
 
#decode19 #MW04 誰のための API? Azure デベロッパーにもエンド ユーザーにも嬉しいAPI エコシステム活用アプローチ
#decode19 #MW04 誰のための API? Azure デベロッパーにもエンド ユーザーにも嬉しいAPI エコシステム活用アプローチ#decode19 #MW04 誰のための API? Azure デベロッパーにもエンド ユーザーにも嬉しいAPI エコシステム活用アプローチ
#decode19 #MW04 誰のための API? Azure デベロッパーにもエンド ユーザーにも嬉しいAPI エコシステム活用アプローチKazuya Sugimoto
 
Weave Node-RED and Azure together
Weave Node-RED and Azure togetherWeave Node-RED and Azure together
Weave Node-RED and Azure togetherKazumi IWANAGA
 
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能Takuya Iwatsuka
 
デモで楽しむ Visual Studio 2022 & .NET 6 最新アップデート
デモで楽しむ Visual Studio 2022 & .NET 6 最新アップデートデモで楽しむ Visual Studio 2022 & .NET 6 最新アップデート
デモで楽しむ Visual Studio 2022 & .NET 6 最新アップデートAkira Inoue
 
Airflowを広告データのワークフローエンジンとして運用してみた話
Airflowを広告データのワークフローエンジンとして運用してみた話Airflowを広告データのワークフローエンジンとして運用してみた話
Airflowを広告データのワークフローエンジンとして運用してみた話Katsunori Kanda
 
Node-red 10本ノック(visual recognition apiを絡めて)
Node-red 10本ノック(visual recognition apiを絡めて)Node-red 10本ノック(visual recognition apiを絡めて)
Node-red 10本ノック(visual recognition apiを絡めて)岡田 裕行
 
【第1回開催!】Kong Community, Japanミートアップ
【第1回開催!】Kong Community, Japanミートアップ 【第1回開催!】Kong Community, Japanミートアップ
【第1回開催!】Kong Community, Japanミートアップ Junji Nishihara
 

Semelhante a Node-REDからREST APIに接続 (20)

Node-RED v1.3新機能紹介
Node-RED v1.3新機能紹介Node-RED v1.3新機能紹介
Node-RED v1.3新機能紹介
 
Node-REDのノード開発容易化ツール Node generator
Node-REDのノード開発容易化ツールNode generatorNode-REDのノード開発容易化ツールNode generator
Node-REDのノード開発容易化ツール Node generator
 
Javaアプリケーションの モダナイゼーションアプローチ
Javaアプリケーションの モダナイゼーションアプローチJavaアプリケーションの モダナイゼーションアプローチ
Javaアプリケーションの モダナイゼーションアプローチ
 
プログラム・マネジメント @ Open棟梁プロジェクト
プログラム・マネジメント @ Open棟梁プロジェクトプログラム・マネジメント @ Open棟梁プロジェクト
プログラム・マネジメント @ Open棟梁プロジェクト
 
ノンコーディング・超高速のApi 開発・運用基盤「cdata api server」のご紹介
ノンコーディング・超高速のApi 開発・運用基盤「cdata api server」のご紹介ノンコーディング・超高速のApi 開発・運用基盤「cdata api server」のご紹介
ノンコーディング・超高速のApi 開発・運用基盤「cdata api server」のご紹介
 
CData API Server ハンズオン
CData API Server ハンズオンCData API Server ハンズオン
CData API Server ハンズオン
 
CData Drivers for PCA 概要
CData Drivers for PCA 概要CData Drivers for PCA 概要
CData Drivers for PCA 概要
 
IBM Blluemix を Pepper とつないでみよう
IBM Blluemix を Pepper とつないでみようIBM Blluemix を Pepper とつないでみよう
IBM Blluemix を Pepper とつないでみよう
 
【Japan Partner Conference 2019】遂に来た! フルマーネージド Azure Red Hat OpenShift で実現する O...
【Japan Partner Conference 2019】遂に来た! フルマーネージド Azure Red Hat OpenShift で実現する O...【Japan Partner Conference 2019】遂に来た! フルマーネージド Azure Red Hat OpenShift で実現する O...
【Japan Partner Conference 2019】遂に来た! フルマーネージド Azure Red Hat OpenShift で実現する O...
 
APIに関するセッション資料
APIに関するセッション資料APIに関するセッション資料
APIに関するセッション資料
 
【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜
【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜
【de:code 2020】 Build 2020 最新情報 〜 Azure & Visual Studio & .NET 〜
 
Tech summit 2018_ad15_ver_1106
Tech summit 2018_ad15_ver_1106Tech summit 2018_ad15_ver_1106
Tech summit 2018_ad15_ver_1106
 
#decode19 #MW04 誰のための API? Azure デベロッパーにもエンド ユーザーにも嬉しいAPI エコシステム活用アプローチ
#decode19 #MW04 誰のための API? Azure デベロッパーにもエンド ユーザーにも嬉しいAPI エコシステム活用アプローチ#decode19 #MW04 誰のための API? Azure デベロッパーにもエンド ユーザーにも嬉しいAPI エコシステム活用アプローチ
#decode19 #MW04 誰のための API? Azure デベロッパーにもエンド ユーザーにも嬉しいAPI エコシステム活用アプローチ
 
Weave Node-RED and Azure together
Weave Node-RED and Azure togetherWeave Node-RED and Azure together
Weave Node-RED and Azure together
 
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
 
デモで楽しむ Visual Studio 2022 & .NET 6 最新アップデート
デモで楽しむ Visual Studio 2022 & .NET 6 最新アップデートデモで楽しむ Visual Studio 2022 & .NET 6 最新アップデート
デモで楽しむ Visual Studio 2022 & .NET 6 最新アップデート
 
Airflowを広告データのワークフローエンジンとして運用してみた話
Airflowを広告データのワークフローエンジンとして運用してみた話Airflowを広告データのワークフローエンジンとして運用してみた話
Airflowを広告データのワークフローエンジンとして運用してみた話
 
CData General Proposal
CData General ProposalCData General Proposal
CData General Proposal
 
Node-red 10本ノック(visual recognition apiを絡めて)
Node-red 10本ノック(visual recognition apiを絡めて)Node-red 10本ノック(visual recognition apiを絡めて)
Node-red 10本ノック(visual recognition apiを絡めて)
 
【第1回開催!】Kong Community, Japanミートアップ
【第1回開催!】Kong Community, Japanミートアップ 【第1回開催!】Kong Community, Japanミートアップ
【第1回開催!】Kong Community, Japanミートアップ
 

Mais de Hitachi, Ltd. OSS Solution Center.

Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...Hitachi, Ltd. OSS Solution Center.
 
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩みKeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩みHitachi, Ltd. OSS Solution Center.
 
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...Hitachi, Ltd. OSS Solution Center.
 
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可Hitachi, Ltd. OSS Solution Center.
 
Keycloakの全体像: 基本概念、ユースケース、そして最新の開発動向
Keycloakの全体像: 基本概念、ユースケース、そして最新の開発動向Keycloakの全体像: 基本概念、ユースケース、そして最新の開発動向
Keycloakの全体像: 基本概念、ユースケース、そして最新の開発動向Hitachi, Ltd. OSS Solution Center.
 
Challenge to Implementing "Scalable" Authorization with Keycloak
Challenge to Implementing "Scalable" Authorization with KeycloakChallenge to Implementing "Scalable" Authorization with Keycloak
Challenge to Implementing "Scalable" Authorization with KeycloakHitachi, Ltd. OSS Solution Center.
 
KeycloakでFAPIに対応した高セキュリティなAPIを公開する
KeycloakでFAPIに対応した高セキュリティなAPIを公開するKeycloakでFAPIに対応した高セキュリティなAPIを公開する
KeycloakでFAPIに対応した高セキュリティなAPIを公開するHitachi, Ltd. OSS Solution Center.
 
Why Assertion-based Access Token is preferred to Handle-based one?
Why Assertion-based Access Token is preferred to Handle-based one?Why Assertion-based Access Token is preferred to Handle-based one?
Why Assertion-based Access Token is preferred to Handle-based one?Hitachi, Ltd. OSS Solution Center.
 
What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...Hitachi, Ltd. OSS Solution Center.
 
Implementing security and availability requirements for banking API system us...
Implementing security and availability requirements for banking API system us...Implementing security and availability requirements for banking API system us...
Implementing security and availability requirements for banking API system us...Hitachi, Ltd. OSS Solution Center.
 
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...Hitachi, Ltd. OSS Solution Center.
 
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...Hitachi, Ltd. OSS Solution Center.
 

Mais de Hitachi, Ltd. OSS Solution Center. (20)

Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...
 
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩みKeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
 
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
 
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
 
Keycloakの全体像: 基本概念、ユースケース、そして最新の開発動向
Keycloakの全体像: 基本概念、ユースケース、そして最新の開発動向Keycloakの全体像: 基本概念、ユースケース、そして最新の開発動向
Keycloakの全体像: 基本概念、ユースケース、そして最新の開発動向
 
Challenge to Implementing "Scalable" Authorization with Keycloak
Challenge to Implementing "Scalable" Authorization with KeycloakChallenge to Implementing "Scalable" Authorization with Keycloak
Challenge to Implementing "Scalable" Authorization with Keycloak
 
KubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdfKubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdf
 
NGINXでの認可について考える
NGINXでの認可について考えるNGINXでの認可について考える
NGINXでの認可について考える
 
Security Considerations for API Gateway Aggregation
Security Considerations for API Gateway AggregationSecurity Considerations for API Gateway Aggregation
Security Considerations for API Gateway Aggregation
 
KeycloakでFAPIに対応した高セキュリティなAPIを公開する
KeycloakでFAPIに対応した高セキュリティなAPIを公開するKeycloakでFAPIに対応した高セキュリティなAPIを公開する
KeycloakでFAPIに対応した高セキュリティなAPIを公開する
 
IDガバナンス&管理の基礎
IDガバナンス&管理の基礎IDガバナンス&管理の基礎
IDガバナンス&管理の基礎
 
Keycloakのステップアップ認証について
Keycloakのステップアップ認証についてKeycloakのステップアップ認証について
Keycloakのステップアップ認証について
 
NGINXをBFF (Backend for Frontend)として利用した話
NGINXをBFF (Backend for Frontend)として利用した話NGINXをBFF (Backend for Frontend)として利用した話
NGINXをBFF (Backend for Frontend)として利用した話
 
Why Assertion-based Access Token is preferred to Handle-based one?
Why Assertion-based Access Token is preferred to Handle-based one?Why Assertion-based Access Token is preferred to Handle-based one?
Why Assertion-based Access Token is preferred to Handle-based one?
 
KeycloakでAPI認可に入門する
KeycloakでAPI認可に入門するKeycloakでAPI認可に入門する
KeycloakでAPI認可に入門する
 
What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...
 
Implementing security and availability requirements for banking API system us...
Implementing security and availability requirements for banking API system us...Implementing security and availability requirements for banking API system us...
Implementing security and availability requirements for banking API system us...
 
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
 
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
 
Apache con@home 2021_sha
Apache con@home 2021_shaApache con@home 2021_sha
Apache con@home 2021_sha
 

Último

Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 

Último (10)

Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 

Node-REDからREST APIに接続

  • 1. © Hitachi, Ltd. 2021. All rights reserved. 日立製作所 OSSソリューションセンタ 2021/7/8 横井 一仁 Node-REDからREST APIに接続
  • 2. 1 © Hitachi, Ltd. 2021. All rights reserved. Node-REDは、クラウド上で REST APIをマッシュアップした アプリケーションの開発に最適 [ REST API接続の例 ] • 天気APIから気象情報を取得して表示 • クラウド/コンテナで提供されている 人工知能APIを用いて画像認識 • チャットサービスのウェブフックを 用いて、メッセージを投稿 システム連携のハブとなるNode-RED REST API クラウド コンテナ REST APIへ接続し 機能を利用 チャット サービス クラウド上 のNode-RED
  • 3. 2 © Hitachi, Ltd. 2021. All rights reserved. http requestノードを用いて、REST APIに接続する方法を紹介 • 基本の呼び出し方法 - GETメソッド - POSTメソッド - GETメソッド+パラメータ指定 • 認証付きAPIの呼び出し方法 - Barerer認証 - Basic認証 - ヘッダ認証 -> 本発表では、質問応答APIを用いて 基本の呼び出し方法を説明 書籍の内容 データ取得 (GET+パラメータ) 状態取得 (GET) データ登録 (POST) ペットストア REST API 購入可:2匹 購入済:1匹 翻訳対象の日本語 翻訳API “Node-REDは 素晴らしいツールです” “Node-RED is a great tool” APIキーを 用いてアクセス 英訳結果 基本呼び出しの説明で使用したペットストアAPI 認証付きAPI呼び出しの説明で使用した翻訳API
  • 4. 3 © Hitachi, Ltd. 2021. All rights reserved. 文章に対する質問文を渡すと、 質問の回答を返すAPI • Metadataエンドポイント (GET) APIに関する情報を返す エンドポイント • Predictエンドポイント (POST) 質問応答を行うエンドポイント OpenAPIドキュメント(APIの仕様)も存在 MAX Question Answering (質問応答API) http://max-question-answering.codait-prod- 41208c73af8fca213512856c7a09db52-0000.us-east.containers.appdomain.cloud 文章と質問文を 組みにしてPOST
  • 5. 4 © Hitachi, Ltd. 2021. All rights reserved. injectノード、http requestノード、debugノードを順に接続したフロー Metadataエンドポイントへアクセス(GETメソッドの呼び出し方) http request ノードの設定 (1) URLを入力 (2) 型をJSON に変更
  • 6. 5 © Hitachi, Ltd. 2021. All rights reserved. http requestノードの前に、POSTするデータをtemplateノードに設定したフロー Predictエンドポイントへアクセス(POSTメソッドの呼び出し方) (2) 型をJSONに変更 (1) POSTする データを貼り付け (3) POSTメソッドに変更 (5) 型をJSONに変更 http requestノードの設定 (4) URLを入力 templateノードの設定
  • 7. 6 © Hitachi, Ltd. 2021. All rights reserved. OpenAPIドキュメントがある場合、オリジナルノードを作りアクセスすることも可能 オリジナルノードからアクセス(Node generatorの使い方) REST API OpenAPI ドキュメント (3) Node-REDへ インストール オリジナル ノードの ソースコード (4) オリジナルノード からアクセス (2) Node generatorを 用いてノードを作成
  • 8. 7 © Hitachi, Ltd. 2021. All rights reserved. Node-REDダッシュボードやGoogle翻訳ノードを用いて、 日本語で入力した質問に回答してくれる質問応答システムのUIを開発 応用: Node-REDダッシュボード連携 質問応答システムのUI 開発したフロー プロフィール文 を基に回答
  • 9. 8 © Hitachi, Ltd. 2021. All rights reserved. http requestノードから様々なREST API、ウェブサイトに接続して、 便利なアプリケーションを開発してみよう。 [ 開発例 ] • Connpass APIを用いて、興味のある勉強会を自動メール通知 • アドベントカレンダの投稿枠の予約/キャンセルをSlack通知 • Node-REDの新バージョンリリースを、メーリングリストへ通知 まとめ
  • 10. © Hitachi, Ltd. 2021. All rights reserved. 9 END Node-REDからREST APIに接続 2021/7/8 日立製作所 OSSソリューションセンタ 横井 一仁
  • 11. 10 © Hitachi, Ltd. 2021. All rights reserved. • Node-REDは、OpenJS Foundationの米国および その他の国における登録商標または商標である。 • Googleは、Google LLCの米国および その他の国における登録商標または商標である。 • Slackは、Slack Technologies, Incの米国および その他の国における登録商標または商標である。 • その他記載の会社名、製品名などは、 それぞれの会社の商標もしくは登録商標です。 商標について