The Workshopper Remote Verification API is a simple API that allows clients to provide solutions for Workshopper problems to remote websites, and potentially receive Open Badges in response.
The remote website can implement its own verification policies. For instance, a site that trusts its users can simply accept solutions without question, or it can actually execute the code in a sandbox, or it can queue the solution for review by a human.
All requests to this endpoint are expected to contain an Authorization header using the Bearer authentication scheme described in IETF RFC 6750. For example:
POST /credit HTTP/1.1
Authorization: Bearer mF_9.B5f-4.1JqM
{
"package": {
"name": "levelmeup",
"version": "0.0.10"
},
"problem": "all_your_base",
"solution": <source code of solution>
}
If the solution is not OK, you get:
HTTP/1.1 409 Conflict
Content-Type: application/json
{
"status": "rejected"
}
If the solution will take time to evaluate, you get:
HTTP/1.1 202 Accepted
Content-Type: application/json
{
"status": "pending",
"url": "http://url/to/status"
}
If the solution is OK, you get:
HTTP/1.1 200 OK
Content-Type: application/json
{
"status": "accepted"
}
If you also get a badge, the response has a badge
key, like this:
{
"status": "accepted",
"badge": {
"name": "Level Me Up!",
"url": "http://url/to/badge", // Human-readable web page
"assertion_url": "http://url/to/badge.json"
}
}