API リファレンス
公開 REST API を操作ごとに解説します。各ページは API の OpenAPI ドキュメントから生成されているため、フィールド、サンプル、エラーコードは、API 自体がチェックし、返している内容そのものです。
- ベース URL
https://ecdsa.com/api/v1- OpenAPI 3.1 ドキュメント
- https://ecdsa.com/api/v1/openapi.json
操作一覧
Signatures
ECDSA signature verification and DER ⇄ raw r‖s conversion.
JWT
Decoding JSON Web Tokens and verifying ES256/ES384/ES512 signatures.
Certificates
X.509 certificate and chain decoding with assessments.
Domain health
TLS signature-health grades of public domains. These operations connect to the domain.
Webhooks
Webhook endpoints of the API key's account and test deliveries. These operations need an API key with the webhooks scope; deliveries are signed with ECDSA P-256 (ES256).
共通仕様
ベース URL とバージョン
すべての操作は https://ecdsa.com/api の下にあり、その後に /v1/verify のような各操作のパスが続きます。バージョンはパスの一部です。v1 の範囲内でのレスポンスの変更は、フィールドとエラーコードの追加だけです。そのため、未知のメンバーは無視し、未知のコードは HTTP ステータスに従って扱ってください。
認証
認証は不要で、すべての操作を匿名で利用できます。今後導入される API キーは任意で、Authorization: Bearer … として、または X-API-Key ヘッダーで送信します。キーを付けた呼び出しには、IP ごとの制限ではなく、そのキー独自の制限が適用されます。API キーは ecdsa.com のアカウント機能とともに提供される予定です。形式が正しくないキーヘッダーは無視されず、unauthorized で拒否されます。
リクエスト
POST のボディは最大 100 KB の JSON オブジェクトで、配列とオブジェクトのネストは最大 64 階層までです(文字列フィールド内の JSON ドキュメントも数えます)。GET の操作は、入力をパスから受け取ります。
レスポンスヘッダー
API が送信するヘッダーと、その適用範囲は次のとおりです。
| ヘッダー | 内容 |
|---|---|
| X-Request-Id | Identifier of this request, also quoted in every error body. A caller's own X-Request-Id (1–128 characters of A–Z, a–z, 0–9, '.', '_', ':' and '-') is echoed unless it contains an API key; otherwise one is generated. |
| X-RateLimit-Limit | Requests allowed per window by the limit reported on this response. |
| X-RateLimit-Remaining | Requests left in the current window. |
| X-RateLimit-Reset | Unix time (seconds) at which the current window ends. |
| X-Quota-Limit | Calls made with an API key only: the size of the account's quota that runs out first for this operation — daily or monthly quota units, or daily domain scans. |
| X-Quota-Remaining | Calls made with an API key only: what is left of that quota after this call. |
| X-Quota-Reset | Calls made with an API key only: Unix time (seconds) at which that quota starts over. |
| Retry-After | Seconds to wait before retrying; for quota_exceeded, until the quota starts over. |
| Allow | The methods this path accepts. |
| WWW-Authenticate | The bearer challenge (RFC 6750), e.g. `Bearer realm="ecdsa.com", error="invalid_token"`. |
エラー
失敗した呼び出しには、4xx または 5xx のステータスと、次の JSON エンベロープが返されます。すべてのコードはエラー一覧表に掲載しています。
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
| error | object | はい | |
| error.code | string | はい | Machine-readable error code. Each response lists the codes it can carry; new codes may be added within v1, so treat an unknown code by its HTTP status. |
| error.message | string | はい | Human-readable explanation (English). |
| error.requestId | string | いいえ | The X-Request-Id of this request — quote it when reporting a problem. Sent since v1.1. |
| error.detail | object | いいえ | Structured context for the error, such as the offending field; omitted when there is none.
|
| error.docs | string | いいえ | Where the error codes are explained. Sent since v1.1.
|
レート制限
API 全体で IP あたり毎分 60 リクエストまでです。これに加えて、ドメインをスキャンする操作には毎分 10 回の制限があります。429 のレスポンスには Retry-After が含まれます。
秘密鍵
秘密鍵は決して送信しないでください。秘密鍵のデータ(PEM の PRIVATE KEY ブロック、OpenSSH・SSH2・PuTTY の鍵、「d」を含む JWK)がどこかに含まれるリクエストは、ほかの処理より先に private_key_rejected で拒否されます。