This repository has been archived by the owner on Aug 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
RecursosAPI
HacKan edited this page Oct 19, 2016
·
2 revisions
Method | Resource | Request | Response | Description |
---|---|---|---|---|
GET | /users/ | - | ["<username>"] |
List of Users (among all Contests). |
GET | /users/[username] | - | {"score":"...","challenges":["<challenge id>"]} |
Current total score and list of solved Challenges IDs for the User (among all Contests). |
POST | /users/[username] | {"password":"..."} |
{"jwt":"..."} |
Creates a new user (if it wasn't registered) and logs the user in, returning a valid session JWT. If the user was already registered, the password must match or an auth error is returned. |
GET | /users/[username]/contests/ | - | ["<contest id>"] |
List of Contests the user has participated/is participating. |
GET | /users/[username]/contests/[contest id] | - | {"score":"...","challenges":["..."]} |
Score and solved Challenges for the User in the selected Contest. contest id can be current for the current contest, if any. |
GET | /users/[username]/challenges/ | - | ["<challenge id>"] |
List of Challenges the user has solved. |
Method | Resource | Request | Response | Description |
---|---|---|---|---|
GET | /challenges/ | - | ["<challenge id>"] |
List of Challenges IDs (among all Contests). |
GET | /challenges/[challenge id] | - | {"name":"...","score":"<points>","description":"...","hints":["..."]} |
Challenge name, score to earn if solved, description and list of hints (if any). |
GET | /challenges/[challenge id]/users/ | - | ["<username>"] |
List of Users that solved the given Challenge (among all Contests). |
GET | /challenges/[challenge id]/contests/ | - | ["<contest id>"] |
List of Contests where the given Challenge was solved (if any). |
Method | Resource | Request | Response | Description |
---|---|---|---|---|
GET | /contests/ | - | ["<contest id>"] |
List of all Contests IDs. |
GET | /contests/[contest id] | - | {"id":"<contest id>","name":"...","begin":"<timestamp>","lifespan":"<seconds>","rules":["..."]} |
Information about a contest. contest id can be current for the current contest, if any. |
GET | /contests/[contest id]/users/ | - | ["<username>"] |
List of usernames participating in a particular Contest. contest id can be current for the current contest, if any. |
GET | /contests/[contest id]/challenges/ | - | ["<challenge id>"] |
List of Challenges IDs for a particular Contest. contest id can be current for the current contest, if any. |
GET | /contests/[contest id]/scores/ | - | {"<username>":"<score>"} |
Collection of total scores per user for the given Contest. contest id can be current for the current contest, if any. |
Method | Resource | Request | Response | Description |
---|---|---|---|---|
GET | /errors/ | - | ["<error id>"] |
List of Error codes. |
GET | /errors/[error id] | - | {"type":"...","description":"..."} |
Details for a given Error code. |
User must be logged in. Valid session JWT must be in the request header as Authorization: JWT <token>
.
Method | Resource | Request | Response | Description |
---|---|---|---|---|
POST | /challenges/[challenge id] | {"solution":"..."} |
{"proof":"..."} |
Sends the solution for the selected challenge. If it is correct, a proof-of-solved hash is returned (can be used as proof that the solution was obtained). If it's not correct, an error is returned. |
CaFeLUG Crypto Challenge GNU FDL v1.3+ | Contribute and share :)