Referência da API
A API REST pública, operação por operação. As páginas são geradas a partir do documento OpenAPI da API, então os campos, os exemplos e os códigos de erro são os mesmos que a própria API verifica e envia.
- URL base
https://ecdsa.com/api/v1- Documento OpenAPI 3.1
- https://ecdsa.com/api/v1/openapi.json
Operações
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).
Convenções
URL base e versões
Toda operação fica em https://ecdsa.com/api, seguida do seu caminho, como /v1/verify. A versão faz parte do caminho: dentro da v1, as respostas só ganham campos e códigos de erro, então ignore os membros que você não conhece e trate um código desconhecido pelo seu status HTTP.
Autenticação
Não é necessária: toda operação funciona de forma anônima. As chaves de API serão opcionais — enviadas como Authorization: Bearer … ou no cabeçalho X-API-Key — e fazem a chamada passar do limite por IP para o limite próprio da chave. Elas virão com as contas do ecdsa.com. Um cabeçalho de chave malformado é recusado com unauthorized em vez de ser ignorado.
Requisições
Os corpos de POST são objetos JSON de no máximo 100 KB, com arrays e objetos aninhados em no máximo 64 níveis de profundidade (documentos JSON dentro de campos de string também contam). As operações GET recebem a entrada pelo caminho.
Cabeçalhos de resposta
Os cabeçalhos que a API envia e onde eles se aplicam:
| Cabeçalho | O que contém |
|---|---|
| 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"`. |
Erros
Uma chamada com falha responde com um status 4xx ou 5xx e este envelope JSON; a tabela de erros lista todos os códigos.
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| error | object | sim | |
| error.code | string | sim | 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 | sim | Human-readable explanation (English). |
| error.requestId | string | não | The X-Request-Id of this request — quote it when reporting a problem. Sent since v1.1. |
| error.detail | object | não | Structured context for the error, such as the offending field; omitted when there is none.
|
| error.docs | string | não | Where the error codes are explained. Sent since v1.1.
|
Limites de taxa
60 requisições por minuto por IP na API inteira, mais 10 por minuto para as operações que fazem varredura de um domínio. Uma resposta 429 traz Retry-After.
Chaves privadas
Nunca envie uma. Uma requisição que contenha material de chave privada em qualquer lugar — um bloco PEM PRIVATE KEY, uma chave OpenSSH, SSH2 ou PuTTY, uma JWK com “d” — é recusada com private_key_rejected antes de qualquer outra coisa acontecer.