Skip to content

Instantly share code, notes, and snippets.

@toolness
Last active December 19, 2015 05:19
Show Gist options
  • Save toolness/5903133 to your computer and use it in GitHub Desktop.
Save toolness/5903133 to your computer and use it in GitHub Desktop.
Proposal for badge indexing API

We need a lightweight way to make badge classes discoverable on a domain, so that we can build discovery tools like the Badge Codex.

Domains can advertise their badge classes by publishing a document at /.well-known/openbadge-classes.json. This JSON-formatted document must be served with the content type application/json.

Document Format

The document simply contains an array of domain-relative URLs representing BadgeClass JSON instances, like so:

[
  "/badge-classes/a-lister.json",
  "/badge-classes/code-whisperer.json"
]

Pagination

Clients accessing the document should check for a Link header. If it exists, the client may need to iterate through all pages via the next value for rel to obtain a full list of badge classes advertised by the domain.

Influences

This proposal was inspired by the following specifications:

@cmcavoy
Copy link

cmcavoy commented Jul 1, 2013

looks good to me.

@toolness
Copy link
Author

toolness commented Jul 1, 2013

Brian's servicefederation.md gist also has some good discussion on discoverability standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment