-
Notifications
You must be signed in to change notification settings - Fork 7
Question Endpoints
Ryan Christiani edited this page Nov 29, 2016
·
8 revisions
##Authentication
All routes require you to be authorized. Make a GET
request to /v1/user/authenticate
to get your token. Every authenticated route requires a x-access-token
header with your token sent.
####Available Fields
{
type: 'string',
category: 'string',
difficulty: 'string',
body: 'string',
multiAnswer: 'string',
multiChoice: [{
label: 'string',
value: 'string'
}],
unitTest: 'string',
codeBody: 'string'
title: String,
created_at: Number,
created_by: String,
updated_at: Number,
updated_by: String
}
###/v2/question
GET Return all questions
Headers | Value | Description |
---|---|---|
x-access-token : string |
token |
Token received from authentication. |
Response
{
"questions": [
{
//...
},
{
//...
},
{
//...
}
]
}
###/v2/question/:id
GET Return single question
Headers | Value | Description |
---|---|---|
x-access-token : string |
token |
Token received from authentication. |
Params | Value | Description |
---|---|---|
id |
string | ID for question that you want to get. |
Response
{
"question": {
title: "Sample Question",
//...
}
}