Filipino
Filipino
Appearance
Filipino
Filipino
Appearance
Public ang mga endpoint na ito at hindi nangangailangan ng authentication. Nagbibigay-daan ang mga ito sa sinuman na i-verify ang mga badge credential at kunin ang Open Badge v2.0 JSON data.
Lahat ng endpoint ay relative sa https://api.badges.ninja.
Kunin ang Open Badge v2.0 Issuer Profile JSON para sa isang issuer.
GET /certify-badge/issuer/{guid}curl https://api.badges.ninja/certify-badge/issuer/a1b2c3d4-e5f6-7890-abcd-ef1234567890{
"@context": "https://w3id.org/openbadges/v2",
"type": "Issuer",
"id": "https://api.badges.ninja/certify-badge/issuer/a1b2c3d4-...",
"name": "Acme Academy",
"url": "https://acme.example.com",
"email": "badges@acme.example.com",
"verification": {
"type": "hosted",
"allowedOrigins": "api.badges.ninja"
}
}Kunin ang Open Badge v2.0 BadgeClass JSON para sa isang badge.
GET /certify-badge/badge/{guid}curl https://api.badges.ninja/certify-badge/badge/b1c2d3e4-f5a6-7890-bcde-f12345678901{
"@context": "https://w3id.org/openbadges/v2",
"type": "BadgeClass",
"id": "https://api.badges.ninja/certify-badge/badge/b1c2d3e4-...",
"name": "JavaScript Fundamentals",
"description": "Demonstrates proficiency in core JavaScript concepts",
"criteria": {
"narrative": "Completed the JavaScript Fundamentals course with a score of 80% or higher"
},
"image": "https://badges.ninja/images/{sha256}.png",
"issuer": "https://api.badges.ninja/certify-badge/issuer/a1b2c3d4-..."
}Kunin ang Open Badge v2.0 Assertion JSON para sa isang credential.
GET /certify-badge/award/{guid}curl https://api.badges.ninja/certify-badge/award/c1d2e3f4-a5b6-7890-cdef-123456789012{
"@context": "https://w3id.org/openbadges/v2",
"type": "Assertion",
"id": "https://api.badges.ninja/certify-badge/award/c1d2e3f4-...",
"recipient": {
"type": "email",
"hashed": true,
"identity": "sha256$..."
},
"badge": "https://api.badges.ninja/certify-badge/badge/b1c2d3e4-...",
"issuedOn": "2025-01-15T00:00:00.000Z",
"verification": {
"type": "hosted"
},
"revoked": false
}Kung na-revoke ang credential, may "revoked": true ang assertion at, kung may ibinigay na dahilan, isang "revocationReason" string:
{
"revoked": true,
"revocationReason": "Issued in error"
}Ito ang Open Badges 2.0 na view ng revocation. Ipinapakita rin ang parehong revocation sa Open Badges 3.0 Verifiable Credential ng credential — tingnan ang Revocation (Bitstring Status List).
Cache-Control: public, max-age=300). Mas maikling 30-segundong cache (max-age=30) ang gamit ng mga na-revoke na credential para mabilis kumalat ang revocation.Kunin ang custom na share text para sa badge ng isang credential.
GET /certify-badge/award/{guid}/share-textcurl https://api.badges.ninja/certify-badge/award/c1d2e3f4-a5b6-7890-cdef-123456789012/share-text{
"text": "I just earned the JavaScript Fundamentals badge! Check it out:"
}Kung walang naka-set na custom share text, default na mensahe ang ibabalik.
Magpadala ng credential notification email mula sa public endpoint. Ginagamit ito ng public share page.
POST /certify-badge/award/{guid}/send-email| Parameter | Uri | Kinakailangan | Paglalarawan |
|---|---|---|---|
recipients | string | Oo | Listahan ng mga email address na pinaghihiwalay ng kuwit |
message | string | Hindi | Custom na mensaheng isasama sa email |
curl -X POST https://api.badges.ninja/certify-badge/award/c1d2e3f4-a5b6-7890-cdef-123456789012/send-email \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"recipients": "colleague@example.com",
"message": "Check out this badge!"
}
}'{
"statusCode": 200,
"info": "award sent"
}Ito ang tanging endpoint na bumabalot ng resulta nito sa
{ "statusCode", "info" }envelope. Direktang ibinabalik ng lahat ng ibang endpoint ang payload nila.
I-verify ang isang issuer sa pag-click ng verification link na ipinadala sa email ng issuer. Karaniwang binubuksan ito sa pamamagitan ng link sa verification email, hindi direktang tinatawag.
GET /certify-badge/verify-issuer/{guid}/{code}| Parameter | Uri | Paglalarawan |
|---|---|---|
guid | string | Ang GUID ng issuer |
code | string | Ang verification code |
Nagbabalik ng HTML page na nagkukumpirma kung nagtagumpay o nabigo ang verification. Idinisenyo ang endpoint na ito para buksan sa browser.