Tester avec Playground !

Interface interactive pour tester TOUS les endpoints de Certifications 🚀


✅ Créer • Lister • GET • DELETE
✅ Curl généré automatiquement
✅ Copie presse-papiers
⚡ Test en temps réel
📱 Responsive mobile
🛡️ Confirmation suppression

Developer Certifications API

Sandbox API pour gérer les certifications de test (table DevCertificationEntries)

⚠️ Sandbox uniquement - Ne pas utiliser pour des données sensibles en production

1. Authentification

Clé API obligatoire

Toutes les requêtes nécessitent l'en-tête X-Api-Key

✅ Requête valide
curl -H "X-Api-Key: votre_cle_api_secrete"
"https://dpasswords.ca/api/dev/certifications/test"
❌ Sans clé
401 Unauthorized
{ "error": "Missing or invalid API key" }

2. Test rapide

GET /api/dev/certifications/test
📤 Requête
curl -H "X-Api-Key: votre_cle"
"https://dpasswords.ca/api/dev/certifications/test"
📥 Réponse
{
  "message": "Developer Certifications API is working",
  "sandbox": true,
  "count": 2,
  "items": [
    {
      "Id": 1,
      "Title": "AWS Certified Solutions Architect",
      "Institution": "Amazon",
      "Year": "2023"
    }
  ]
}

3. Lister les certifications

GET /api/dev/certifications?limit=50
Paramètres: limit (1-200, défaut: 50)
📤 Requête exemple
curl -H "X-Api-Key: votre_cle"
"https://dpasswords.ca/api/dev/certifications?limit=10"
📥 Réponse exemple
{
  "organizationId": 42,
  "count": 3,
  "items": [
    {
      "id": 10,
      "title": "AWS Certified Developer",
      "institution": "Amazon",
      "year": "2022",
      "ownerUserId": "user-123",
      "createdAt": "2025-12-15T10:30:00Z",
      "updatedAt": "2025-12-15T10:31:00Z"
    }
  ]
}

4. Détails d'une certification

GET /api/dev/certifications/{id}
📤 Requête
curl -H "X-Api-Key: votre_cle"
"https://dpasswords.ca/api/dev/certifications/10"
📥 Réponse
{
  "id": 10,
  "title": "AWS Certified Developer",
  "institution": "Amazon",
  "year": "2022",
  "description": "Cloud developer cert",
  "fileUrl": "https://files.example.com/cert-aws.pdf",
  "mimeType": "application/pdf",
  "ownerUserId": "user-123",
  "createdAt": "2025-12-15T10:30:00Z",
  "updatedAt": "2025-12-15T10:31:00Z"
}

5. Créer une certification

POST /api/dev/certifications/add
📤 Corps FormData
{
  "title": "AWS Certified Developer",
  "institution": "Amazon",
  "year": "2022",
  "description": "Cloud developer cert",
  "fileUrl": "https://files.example.com/cert-aws.pdf",
  "mimeType": "application/pdf"
}
📥 Réponse
{
  "success": true,
  "id": 15
}

6. Supprimer

DELETE /api/dev/certifications/{id}
📤 Requête
curl -X DELETE -H "X-Api-Key: votre_cle"
"https://dpasswords.ca/api/dev/certifications/10"
📥 Réponse
{
  "success": true,
  "id": 10
}