Skip to content

Latest commit

 

History

History
152 lines (106 loc) · 2.96 KB

File metadata and controls

152 lines (106 loc) · 2.96 KB
title api-judge v1.0.0
language_tabs
shell
Shell
http
HTTP
javascript
JavaScript
ruby
Ruby
python
Python
php
PHP
java
Java
go
Go
toc_footers
includes
search true
highlight_theme darkula
headingLevel 2

api-judge v1.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Endpoints for encrypting and decrypting secrets. For use with the Manchester Codes Api Whisperer game

Base URLs:

License: MIT

Encrypt

Endpoints for encrypting secrets

post__get-keys

POST /get-keys

returns keys which contain encrypted secret

Body parameter

{
  "secret": "string",
  "shares": "string",
  "threshold": "string"
}

Parameters

Name In Type Required Description
body body object false encrypt a secret and specify the number of keys and threshold for decryption
» secret body string true none
» shares body string true none
» threshold body string true none

Example responses

200 Response

{
  "keys": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK secret successfully encrypted Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» keys [string] true none none
This operation does not require authentication

Decrypt

Endpoints for decrypting secrets

post__claim-victory

POST /claim-victory

Body parameter

{
  "keys": [
    "string"
  ],
  "successURL": "string"
}

Parameters

Name In Type Required Description
body body object false post keys for decryption and an api endpoint to POST the secret to

Example responses

200 Response

{
  "message": "string"
}

Responses

Status Meaning Description Schema
200 OK keys successfully decrypted Inline
400 Bad Request bad request Inline

Response Schema

Status Code 200

Name Type Required Restrictions Description
» message string true none instructions

Status Code 400

Name Type Required Restrictions Description
» message string true none instructions
This operation does not require authentication