Skip to content

OBI Methods

Badge Terminology Clarification

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

Acclaim 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.youracclaim.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://youracclaim.com",
      "name": "Acclaim",
      "genre": "UrlEvidence",
      "type": "Evidence"
    },
    {
      "@context": "https://w3id.org/openbadges/v2",
      "description": "Description in URL evidence is optional",
      "id": "http://youracclaim.com",
      "name": "Acclaim",
      "genre": "UrlEvidence",
      "type": "Evidence"
    }
  ],
  "id": "https://api.youracclaim.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://api.youracclaim.com/v1/obi/v2/issuers/12b808a7-249d-42fe-a63d-30ffba7bb1fb/badge_classes/670dcefd-e914-4707-9691-80496ee60360",
    "narrative": "Schedule / Registration: Kickboxing Activity http://www.example.com/awesomepage"
  },
  "description": "Dynamically deliver go forward e-tailers",
  "id": "https://api.youracclaim.com/v1/obi/v2/issuers/12b808a7-249d-42fe-a63d-30ffba7bb1fb/badge_classes/670dcefd-e914-4707-9691-80496ee60360",
  "image": {
    "@context": "https://w3id.org/openbadges/v2",
    "type": "ImageObject",
    "id": "https://cdn.example.com/path/to/image.png",
    "caption": "Badge Template 3"
  },
  "name": "Badge Template 3",
  "issuer": {
    "@context": "https://w3id.org/openbadges/v2",
    "description": "Function-based eco-centric standardization gurus",
    "email": "info@youracclaim.com",
    "id": "https://api.youracclaim.com/v1/obi/v2/issuers/a0a2264a-84a6-4d20-a034-d4d58c528f11",
    "image": "https://cdn.example.com/path/to/image.png",
    "name": "Organization 6",
    "type": "Profile",
    "url": "http://www.example.com/"
  },
  "alignment": [
    {
      "targetDescription": "Self-enabling cohesive task-force",
      "targetName": "Alignment 3",
      "targetUrl": "http://www.example.com/alignment"
    }
  ],
  "tags": [
    "Skill 3"
  ],
  "type": "BadgeClass"
}

Get Issuer

Request

GET /obi/v2/issuers/<issuer_id>

Response

200 OK

{
  "@context": "https://w3id.org/openbadges/v2",
  "email": "info@youracclaim.com",
  "description": "Function-based eco-centric standardization gurus",
  "id": "https://api.youracclaim.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/"
}