adidas APIs guidelines

adidas APIs

But at the verge of the digital transformation where every company is a software company, APIs play a critical role in enabling interoperability, improving efficiency, reducing costs and communicating with partners and customers.

正にその通りです。靴の作るアディダスすらソフトウェア企業に変身しようとしている。
Every company is a software company!

(日本のITと生産企業は、今までのハードワーク経験者がトップにいる限り、世界との差がどんどん広がる一方です。
それからソフトウェア開発者にしても、数年間開発現場を経験したら、
コンピュータサイエンスの基礎を理解しないままでマネジメント業務に転向し、
マネジャーレベルの人の技術スキルがどんどん下がる一方です。
優秀な若い人の育成もできるわけがないので、悪循環でまったく明るい先がみえません。。)

adidas API Guidelines

1. Core API Lifecycle principles
2. API protocols we use at adidas
3. Message formats we pass around
4. Application-level semantics

メモ
・今まで見た一番充実したAPIガイドラインかも
OpenAPI Specificationベース
・OracleのApiaryを利用して設計している
・全てのAPIは、apiaryioのdreddフレームワークによって自動テストを実施しないといけない
・設計はリソース志向ではなく、resource-centricである。
ようはAPI設計成熟度(Web API Design Maturity Model)のレベル2以上とのこと。
・TLS 1.2
・Separate Concerns、厳格なHTTPヘッダーとボッディの使い方定義がある


Every API using HTTP/S API MUST precisely follow the concern separation of an HTTP message:
A resource identifier-URI MUST be used to indicate identity only
HTTP request method MUST be used to communicate the action semantics (intent and safety)
HTTP response status code MUST be used to communicate the information about the result of the attempt to understand and satisfy the request
HTTP message body MUST be used to transfer the message content
HTTP message headers MUST be used to transfer the metadata about the message and its content
URI query parameter SHOULD NOT be used to transfer metadata

・レスポンスは必ずapplication/hal+json (HAL) format
・エラーレスポンスは必ずapplication/problem+json (Problem Detail)
・URIはcamelCase rule使わずに、hyphen (-) 使用。例/system-orders/{orderId}/author
・HTTPヘッダー名は、X-を使用しない