Casos de Uso

1) Validar URL antes de processar

curl -X POST https://api.tolky.to/api/externalAPIs/public/assets/test/health-check \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://client-site.com/document.pdf"}'

2) Verificar múltiplos arquivos em batch

curl -X POST https://api.tolky.to/api/externalAPIs/public/assets/test/check-multiple \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://site1.com/file1.pdf",
      "https://site2.com/file2.jpg",
      "https://site3.com/file3.mp4"
    ]
  }'

3) Depurar problemas de cache

curl -X DELETE https://api.tolky.to/api/externalAPIs/public/assets/test/cache \
  -H "Authorization: Bearer YOUR_API_KEY"

curl -X GET https://api.tolky.to/api/externalAPIs/public/assets/test \
  -H "Authorization: Bearer YOUR_API_KEY"

4) Monitorar saúde periodicamente

#!/bin/bash
URLS=(
  "https://example.com/important-file1.pdf"
  "https://example.com/important-file2.jpg"
)

for url in "${URLS[@]}"; do
  response=$(curl -s -X POST https://api.tolky.to/api/externalAPIs/public/assets/test/health-check \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"url\": \"$url\"}")
  echo "$response" | jq '.'
done