Health Check
GET [Url Ambiente]/api/health
Esse endpoint é utilizado para verificar o status e saúde da API EvidencIA. É útil para monitoramento, alertas e verificação de disponibilidade.
Header
| Identificador | Valor |
|---|---|
| Accept | application/json |
Observações
- ✅ Este endpoint não requer autenticação
- ✅ Pode ser usado livremente para monitoramento
- ✅ Recomendado para health checks de load balancers e orquestradores
Exemplo CURL
curl -X GET \
--header 'Accept: application/json' \
'https://api.evidencia.acertpix.com.br/api/health'
Status Code 200
API está funcionando corretamente.
| Parâmetro | Descrição | Tipo | Exemplos |
|---|---|---|---|
| status | Status geral da API | String | "Healthy" |
| timestamp | Data/hora da verificação | String (ISO 8601) | "2025-01-20T10:30:00.123Z" |
| version | Versão da API | String | "1.0.0" |
| services | Status dos serviços dependentes | Object | - |
Objeto Services
| Parâmetro | Descrição | Tipo | Exemplos |
|---|---|---|---|
| database | Status da conexão com banco de dados | String | "Healthy" |
| storage | Status do Google Cloud Storage | String | "Healthy" |
| rabbitmq | Status do RabbitMQ | String | "Healthy" |
| conversor | Status do serviço de conversão | String | "Healthy" |
Exemplo
{
"status": "Healthy",
"timestamp": "2025-01-20T10:30:00.123Z",
"version": "1.0.0",
"services": {
"database": "Healthy",
"storage": "Healthy",
"rabbitmq": "Healthy",
"conversor": "Healthy"
}
}
Status Code 503
API ou algum serviço dependente está com problemas.
| Parâmetro | Descrição | Tipo | Exemplos |
|---|---|---|---|
| status | Status geral da API | String | "Unhealthy" |
| timestamp | Data/hora da verificação | String (ISO 8601) | "2025-01-20T10:30:00.123Z" |
| version | Versão da API | String | "1.0.0" |
| services | Status dos serviços dependentes | Object | - |
| errors | Lista de erros identificados | Array[String] | ["Database connection timeout"] |
Exemplo
{
"status": "Unhealthy",
"timestamp": "2025-01-20T10:30:00.123Z",
"version": "1.0.0",
"services": {
"database": "Unhealthy",
"storage": "Healthy",
"rabbitmq": "Healthy",
"conversor": "Degraded"
},
"errors": [
"Database connection timeout",
"Conversor service response time above threshold"
]
}
Status Possíveis dos Serviços
| Status | Descrição |
|---|---|
| Healthy | Serviço funcionando normalmente |
| Degraded | Serviço funcionando com desempenho reduzido |
| Unhealthy | Serviço indisponível ou com falha crítica |