Stagecast Quest API

The so called Challange/Quest API v0.0.1

Quest management

get
List quests for an event

https://stagecast.se/api/events/:eventId/quests/
Get the list of quests for an event
Request
Response
Request
Path Parameters
eventId
required
string
The eventId as found in the web console
Headers
X-Token
required
string
The authentication token as required from login
Query Parameters
offset
optional
integer
The offset from zero of the entries returned - used for pagination the (default: 0)
limit
optional
integer
The maximum number of entries to return for (default: 10)
Response
200: OK
The list of quests is returned in the response
[{"_id": "abc123", "title":"...", ...}...]

post
Create a quest in an event

https://stagecast.se/api/events/:eventId/quests/
Create a quest in an event
Request
Response
Request
Path Parameters
eventId
required
string
The eventId as obtained from the web console
Headers
X-Token
required
string
The auth token
Body Parameters
title
optional
string
The title of the quest
Response
201: Created
{
"id": "abc-223-23c-cac",
"event": "dsadas-asdas-d-asdas",
"title": "My cool quest",
"challangesCount": 0
}
{
"title": "My quest",
"type": "sequence",
"config": {"n": 10},
"seriesDuration": 100001212,
"challengeDuration": 20000,
"prizesPerSeries": 3,
"challengesPerRound": 10,
"maxRoundsPerSeries": 10,
"maxSeries": 5,
"prizeType": "prizeOnCorrectAnswer",
"scoreFunction": "timeIndependent"
}

Field

Explanation

title

The title of the quest as shown in web console

type

The type of quest - "simple", "word", "randomInt", "sequence" or "question". "simple" means that the client will submit the score as part of the responses array when answering a challenge. "word" is for challenges that present a question or a task and the user is supposed to answer by typing in a word (example would be a treasure hunt moment), "randomInt" is a challenge where you are to pick one out a few available integers - like if the speed challenge was done this way (which it is not). "sequence" is a random sequence where the user should answer with a sequence of numbers (example is the memory challenge). "question" is for quiz like challenges where you get a question and should pick from a set of options.

config

A quest type specific configuration.

seriesDuration

How long each series will last. At the end of a series there could be prizes handed out.

prizesPerSeries

The number of prizes handed out at the end of a series

challengesPerRound

How many challenges one should run each round

maxRoundsPerSeries

How many rounds your are allowed to play within a series

maxSeries

How many series in total that will be run

prizeType

You can be given a prize at the end of a series or immediately if you answer correct. If you want to get a prize immediately - specify "prizeOnCorrectAnswer". If you want to get a prize when you have completed all the challenges (like in the treasure hunt) - specify "prizeOnCompletion". Otherwise prizes will be handed out at the end of a series. There will be more options to come here.

scoreFunction

You may either get a score depending on how fast you answer (if you answer correctly) or you can get a fixed score if you got the answer right. If you want the latter, specify "timeIndependent".

put
Update a quest in an event

https://stagcast.se/api/events/:eventId/quests/:questId
Modifies an existing quest
Request
Response
Request
Path Parameters
questId
required
string
The id of the existing quest
eventId
required
string
The eventId
Headers
X-Token
required
string
The auth token
Body Parameters
title
optional
string
The body is a json document with a bunch of optional parameters such as title
Response
200: OK

post
Add challenges to a quest

https://stagecast.se/api/events/:eventId/quests/:questId/challenges
Add challenges to
Request
Response
Request
Path Parameters
questId
required
string
The questId
eventId
required
string
The eventId
Headers
X-Token
required
string
The auth token
Body Parameters
params
required
object
An object describing the challenge
type
required
string
The type of challenge this is, such as TBD
group
optional
string
The group that the challenge belongs to
Response
200: OK
[{
"challenge": {
field1: ...,
field2: ...
},
"choices": [{
field1: ...,
}, {
field1: ...
}],
"correctResponses": [1, 2, 3],
"group": "group1"
}]

Field

Description

challenge

The challenge for challenges where you are presented some question or task in the form of a text or a picture..

choices

The different answers the user should pick from in the case of the type "question"

correctResponses

For the "question" type you specify which of the above choices are the correct alternatives. For the "word" type you specify which words are valid answers, so "correctResponses" can be either strings or integers. For the others you do not need to specify anything.

group

For analytics purposes you can group challenges to any group type

get
List challenges for a quest

https://stagecast.se/api/events/:eventId/quests/:questId/challenges
Get the list of challenges for a quest
Request
Response
Request
Path Parameters
eventId
required
string
The eventId as found in the web console
questId
required
string
The questId as found in the web console
Headers
X-Token
required
string
The authentication token as required from login
Query Parameters
offset
optional
integer
The offset from zero of the entries returned - used for pagination the (default: 0)
limit
optional
integer
The maximum number of entries to return for (default: 10)
Response
200: OK
The list of quests is returned in the response
[{"_id": "abc123", "title":"...", ...}...]

put
Update a challenge

https://stagecast.se/api/events/:eventId/quests/:questId/challenges/:challengeNumber
Update a challenge
Request
Response
Request
Path Parameters
challengeNumber
required
integer
The index of the challenge
questId
required
string
The questId
eventId
required
string
The eventId
Response
200: OK

delete
Delete a challenge

https://stagecast.se/api/events/:eventId/quests/:questId/challenges/:challengeNumber
Removes a challenge from a quest. As a side effect all challenges after the above challenge will be shifted one step up.
Request
Response
Request
Path Parameters
challengeNumber
required
integer
The index of the challenge
questId
required
string
The questId
eventId
required
string
The eventId
Response
200: OK

put
Trigger the prize handout to happen now

https://stagecast.se/api/events/:eventId/quests/:questId/moments/:momentId/assignPrizes
A owner or crew member of the event can trigger the prize handout to happen by issuing this request
Request
Response
Request
Path Parameters
momentId
required
string
The momentId
questId
required
string
The questId
eventId
required
string
The eventId
Headers
X-Token
required
string
The authentication token as required from login
Response
200: OK

Participation API

get
Get a quest via CDN

https://d5q8k8cx63nj4.cloudfront.net/api/quests/:questId
Reads quest information via the CDN
Request
Response
Request
Path Parameters
questId
required
string
The questId
Response
200: OK

get
Get quest runtime info

https://stagecast.se/api/quests/:questId/moments/:momentId/info
Get some runtime information about the quiz
Request
Response
Request
Path Parameters
momentId
required
string
The momentId
questId
required
string
The questId
Response
200: OK
TBD

put
Update user profile

https://stagecast.se/api/quests/:questId/moments/:momentId/profile
Updates the user profile
Request
Response
Request
Path Parameters
momentId
required
string
The moment id
questId
required
string
The quest id
Headers
X-Token
required
string
The auth token as retrieved in the moment configuration
Response
200: OK

get
Get the user profile

https://stagecast.se/api/quests/:questId/moments/:momentId/profile
Get the user profile
Request
Response
Request
Path Parameters
momentId
required
string
The moment id
questId
required
string
The quest id
Response
200: OK
{
"userId": "[email protected]",
"name": "User#9265",
"points": 0,
"bestScore": 0,
"momentId": "9FF7106A-ACB5-4296-8EEB-D40CC4965807",
"prizes": [...prizeRef],
"challengesResponded": 0,
"roundsPlayed": 0,
"totalRoundsPlayed": 5,
"totalChallengesResponded": 0
}

get
Fetch challenge

https://stagecast.se/api/quests/:questId/moments/:momentId/challenges/:challengeNumber
Get a new challenge
Request
Response
Request
Path Parameters
challengeNumber
required
integer
The challenge index
momentId
required
string
The moment id
questId
required
string
The quest id
Response
200: OK

put
Respond to a challenge

https://stagecast.se/api/quests/:questId/moments/:momentId/challenges/:challengeNumber/response
A user responds to a challenge
Request
Response
Request
Path Parameters
challengeNumber
required
integer
The challenge index
momentId
required
string
The moment id
questId
required
string
The quest id
Body Parameters
responses
required
array
The responses, depending on the type of challenge, see note below.
hash
required
string
The hash as retrieved when getting the challenge
Response
200: OK

Typically the responses are the choices the user has made, except for in the "simple" type where the first element of the responses array is the score sent by the client.

put
Play new round

https://stagecast.se/api/quests/:questId/moments/:momentId/playNewRound
User asks to play a new round
Request
Response
Request
Path Parameters
momentId
required
string
The moment id
questId
required
string
The quest id
Response
200: OK

get
Fetch top results for quest in current moment (via CDN)

https://d5q8k8cx63nj4.cloudfront.net/api/quests/:questId/moments/:momentId/results
Returns the top player leaderboard
Request
Response
Request
Path Parameters
momentId
required
string
The moment id
quizId
required
string
The quiz id
Query Parameters
series
optional
integer
Use this if you want to retrieve historical leaderboards (for quest types that support this)
limit
optional
integer
The maximum number of users to return (default: 10)
offset
optional
integer
The offset (default: 0)
Response
200: OK

get
Fetch your own results

https://stagecast.se/api/quests/:questId/moments/:momentId/results/myown
Get your own results
Request
Response
Request
Path Parameters
momentId
required
string
The moment id
questId
required
string
The quest id
Response
200: OK