nttコミュニケーションズ apiゲートウェイの取り組み紹介(もろもろ)
TRANSCRIPT
Copyright © NTT Communications Corporation. All rights reserved.
NTTコミュニケーションズ APIゲートウェイの取り組み紹介(もろもろ)
API Meetup LT 2015.05.22 NTTコミュニケーションズ株式会社 経営企画部統合カスタマポータル開発タスクフォース 加藤 恭英
Copyright © NTT Communications Corporation. All rights reserved.
自己紹介
1
加藤 恭英
@yassan1000
2014-今:
NTT Com APIビジネス/APIゲートウェイ立ち上げ
2004-2012: NTTぷらら ひかりTV IPv6 MC放送・VOD/プロビ
スマホVOD開発
Copyright © NTT Communications Corporation. All rights reserved. 2
Copyright © NTT Communications Corporation. All rights reserved.
ANNAIさんに協力してもらいました😄(謝辞)
https://developer.ntt.com
NTT Com デベロッパーポータル
3
Copyright © NTT Communications Corporation. All rights reserved.
NTT COm APIゲートウェイって?
4
NTT Comが提供するAPIを取りまとめて提供
👉APIゲートウェイ
API利用は、無料です
APIゲートウェイ (日本/米国/欧州)
API認証
API セキュリティ
APIログ 一元管理
API変換 など
API
NTT Comサービス
お客さまの システム
パートナー企業の システム
パートナー企業の アプリ
サービス機能 (例: VM作成) ク
ラウド サービス情報
(例: オーダー/ 故障情報)
ネットワーク
アプリケーション
デベロッパーポータル
・サービス毎のAPIの接続形式/データ書式を統一して提供 ・API利用ログの一元的管理が可能
API
API
API
Copyright © NTT Communications Corporation. All rights reserved.
どんなAPIがあるの?
5
OAuth API
Business Process API
Cloudn Compute API
APILog API Arcstar Universal OneモバイルグローバルM2M API
今後、NTT ComのB2B向けAPIは、
APIゲートウェイから一元的に提供していきます!!
ネットワーク(SDN含)、クラウド、ボイス、アプリの4分野にてAPI鋭意拡充します!!
Copyright © NTT Communications Corporation. All rights reserved. 6
B2B向けAPIが中心(現状)
REST API/JSON
HTML5/スマホアプリから利用したい
👉CORS対応
企業のISMS/ISO27001として監査ログがほしい
👉APILog API
Copyright © NTT Communications Corporation. All rights reserved.
CORSって?
7
http GET https://api.ntt.com/v1/business-process/contracts "Authorization: Bearer ACCESS_TOKEN" serviceName==bocn HTTP/1.1 200 OK Access-Control-Allow-Headers: origin, x-requested-with, accept, Authorization Access-Control-Allow-Methods: GET, PUT, POST, DELETE Access-Control-Allow-Origin: * Access-Control-Max-Age: 1728000 Connection: keep-alive Content-Length: 359 Content-Type: application/json Date: Thu, 14 May 2015 07:58:53 GMT { "items": [ { "accessLineSet": null, #以下、省略
CORS対応APIを利用したAngularJS Webデモ
AppコードをGitHubに公開予定(6月頭)
Cross-Origin Resource Sharing セキュアにクロスドメインアクセスするための仕組み
Copyright © NTT Communications Corporation. All rights reserved.
APILog API
8
対象日のAPILogを取得し、特定項目データ抽出
http -v GET https://api.ntt.com/v1/apilog "Authorization: Bearer
ACCESS_TOKEN" targetDate==20150513 | jq '.Records[20]' | jq '.Record' | jq -
r '.responseElements, .eventSource'
{"items":[{"contractId":"N*********","serviceName":"Arcstar Universal
One","distinguishName":null,"orderType":2,"offerPlanDate":"2015-01-
15T15:00:00Z","orderStatus":1,"orderRequestNum":"UN**********","mainB
ack":null,"mainBackGroup":null,"accessLineSet":null},{"contractId":"N***
******","serviceName":"Arcstar Universal One","distinguishName":"千葉港
ビル","orderType":3,"offerPlanDate":"2015-05-
10T15:00:00Z","orderStatus":1,"orderRequestNum":"UN**********","mainB
ack":null,"mainBackGroup":null,"accessLineSet":null},{"contractId":"N***
******","serviceName":"Arcstar Universal One","distinguishName":"グラン
パークタワー17F","orderType":3,"offerPlanDate":"2015-05-
10T15:00:00Z","orderStatus":1,"orderRequestNum":"UN**********","mainB
ack":null,"mainBackGroup":null,"accessLineSet":null},{"contractId":"N***
******","serviceName":"Arcstar Universal One","distinguishName":"グロー
バル1Call環境(テクノ)","orderType":3,"offerPlanDate":"2015-05-
28T15:00:00Z","orderStatus":1,"orderRequestNum":"UN**********","mainB
ack":null,"mainBackGroup":null,"accessLineSet":null}],"resultCount":4}
/v1/business-process/service-orders
httpieや、./jqは、REST API開発、テストに必須ツール。
便利です。
API仕様: https://developer.ntt.com/ja/apidocs/CPTF/business-process/apilog-api
お客様側システム
(ポータル/管理) ログ参照
API利用
・過去のAPI利用状況を確認したい ・システム監査として利用したい
利用ログ
APIゲートウェイ (日本/米国/欧州)
API認証
API セキュリティ
APIログ 一元管理
API変換
Network
(WAN)
NTT Com Cloud
API
API
API
Copyright © NTT Communications Corporation. All rights reserved.
今後の取り組みたい雑感
9
● APIビジネスパートナー模索
● SDK/API Call Snippet
● Webhook API ● REST APIテスト自動化(Ruby Cucumberとか、JSON
Schemaなどからテストクライアント自動生成など)
● IoT+API(SmartX:X is Car,Infrastructure,Home,Energy…)
このあたりのキーワードで、よいネタや、ビジネス連携のお話があれば共有ください!!
Copyright © NTT Communications Corporation. All rights reserved.
NTT Com API Meetup
10
DevJam的アプローチ
まずは、B2B/B2B2{C|E}界隈でのAPIをコアとした、アイデアソン・ハッカソン、勉強会等を、各種開発者、企業関係者の皆様と取り組み
NTT Comデベロッパーポータルで別途イベント募集(2015夏)しますので、ふるってご参加ください!!