turnout REST API spec draft

https://github.com/yasushisakai/turnout.git

spec draft for turnout voting inteactions;

hopefully this will be converted to an openapi json schema. Something like this:

http://34.146.11.34/swagger-ui/

baseurl

https://turnout.media.mit.edu

this is subject to change. please don’t hard code it..

creating a voting session

a session is required to group the users, targets.

curl -X POST -d '{"name":"glyph texture competition"}' -H "Content-Type: application/json" $BASEURL/api/session

adding a voting target

what ever the content, this will give back you a sha256 digest.

text

curl -X POST -d '{"text":"a great texture"}' -H "Content-Type: application/json" $BASEURL/api/policy

url

curl -X POST -d '{"url": "http://example.com"}' -H "Content-Type: application/json" $BASEURL/api/policy

image

curl -X POST -d '{"image": "base64 Image Blob"}' -H "Content-Type: application/json" $BASEURL/api/policy

intermediary

curl -X POST -d '{"addresses": ["sha256digest",]}' -H "Content-Type: application/json" $BASEURL/api/policy

an intermediary is a combination if targets

aliasing ids

sha256 values may not be the easiest to remember

curl -X POST -d '{"name": "string", "id": "sha256 digest"}' -H "Content-Type: application/json" $BASEURL/api/ref

frontend

voting url

curl $BASEURL/$SESSION/$TARGET

hitting this url with the browser will associate the user(create if no-exist) and session and target

this gives a fixed amount of voting (1.0 point) to the target, the ui will let the user to evaluate in fine grain if they want.

{session, target, (and the user id)} is a sha256 digest; I might accept shortened ids, since I know this is overkill

Glyph members Rahim and Adam : you will need to generate the qr code for the combinations of textures and 3d models.

The system is flexible (or agnostic) in people voting textures or 3d models in isolation or it’s combination…(It is more of a issue on the agenda of that workshop)

https://turnout.media.mit.edu/fd1890afaf4b654442495d1526db99b6e61b00157da70253aa51e391976f22da/2a1073a6e67f0e5f09a5957c659503c690efe7272be8313df872556a9a684d8c

qr_code.png

Date: 2023-06-27 Tue 11:56