Skip to content

OBI Methods

Badge Terminology Clarification

Within Credly, we've been referring to individual badges and the specifications for those badges with slightly different terminology than the OBI uses:

Credly OBI
Badge BadgeAssertion
BadgeTemplate BadgeClass

For the OBI-compliant parts of the API, we'll use the OBI's language to minimize confusion.

You can read more about OBI hosted assertions here.

Get Badge Assertion

Request

GET /obi/v2/badge_assertions/<badge_id>

Response

200 OK

{
  "@context": "https://w3id.org/openbadges/v2",
  "badge": "https://api.credly.com/v1/obi/v2/issuers/12b808a7-249d-42fe-a63d-30ffba7bb1fb/badge_classes/670dcefd-e914-4707-9691-80496ee60360",
  "expires": "2016-04-01T14:41:00.000Z",
  "evidence": [
    {
      "@context": "https://w3id.org/openbadges/v2",
      "description": "Description in URL evidence is optional",
      "id": "http://credly.com",
      "name": "Acclaim",
      "genre": "UrlEvidence",
      "type": "Evidence"
    },
    {
      "@context": "https://w3id.org/openbadges/v2",
      "description": "Description in URL evidence is optional",
      "id": "http://credly.com",
      "name": "Acclaim",
      "genre": "UrlEvidence",
      "type": "Evidence"
    }
  ],
  "id": "https://api.credly.com/v1/obi/v2/badge_assertions/54a07c5c-89f9-4c33-9731-e1b0d34f88b9",
  "issuedOn": "2014-04-01T14:41:00.000Z",
  "recipient": {
    "type": "email",
    "identity": "sha256$b36a83701f1c3191e19722d6f90274bc1b5501fe69ebf33313e440fe4b0fe210",
    "hashed": true
  },
  "type": "Assertion",
  "verification": {
    "type": "hosted"
  }
}

Get Badge Class

Request

GET /obi/v2/badge_classes/<badge_class_id>

Response

200 OK

{
  "@context": "https://w3id.org/openbadges/v2",
  "criteria": {
    "@context": "https://w3id.org/openbadges/v2",
    "id": "https://www.credly.com/org/organization-232/badge/badge-template-113",
    "narrative": "Schedule / Registration: Kickboxing Activity http://www.example.com/awesomepage"
  },
  "description": "Dynamically deliver go forward e-tailers",
  "id": "https://api.credly.com/v1/obi/v2/issuers/d04dd152-91a7-47c6-b709-41590e4d2f25/badge_classes/7e3cff91-7fb4-42cf-808f-576f4d10a513",
  "image": {
    "@context": "https://w3id.org/openbadges/v2",
    "id": "https://cdn.example.com/path/to/image.png"
  },
  "name": "Badge Template 113",
  "issuer": {
    "@context": "https://w3id.org/openbadges/v2",
    "description": "Function-based eco-centric standardization gurus",
    "email": "info@credly.com",
    "id": "https://api.credly.com/v1/obi/v2/issuers/d04dd152-91a7-47c6-b709-41590e4d2f25",
    "image": "https://cdn.example.com/path/to/image.png",
    "name": "Organization 232",
    "type": "Profile",
    "url": "http://www.example.com/"
  },
  "alignment": [
    {
      "targetDescription": "Self-enabling cohesive task-force",
      "targetName": "Alignment 179",
      "targetUrl": "http://www.example.com/alignment"
    }
  ],
  "tags": [
    "Skill 357",
    "Skill 358",
    "Skill 359"
  ],
  "type": "BadgeClass"
}

Get Issuer

Request

GET /obi/v2/issuers/<issuer_id>

Response

200 OK

{
  "@context": "https://w3id.org/openbadges/v2",
  "email": "info@credly.com",
  "description": "Function-based eco-centric standardization gurus",
  "id": "https://api.credly.com/v1/obi/v2/issuers/e483968b-1ceb-4434-8258-b4518d078f9d",
  "image": "https://cdn.example.com/path/to/image.png",
  "name": "Organization 4",
  "type": "Issuer",
  "url": "http://www.example.com/"
}