This repository was archived by the owner on Jun 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
API Endpoints
Andrew Chan edited this page Dec 29, 2017
·
20 revisions
The Application Portal API exposes resources like forms, categories, and applications for logged in users and is used extensively by the frontend.
Gets the full list of forms as form objects. Each form object should also contain the list of question objects associated with it, in the correct order.
Example response:
{
'forms': [
{
'id': 4,
'name': 'Consulting Spring 2018',
'created_at': '2017/12/07 17:55:48 +0000',
'archived': false,
'questions': [
{
'id': 1,
'form': 4,
'question_text': 'Check the classes you have taken:',
'question_type': 'Checkbox',
'options': "['CS61A', 'CS61B', 'CS61C']",
},
{
'id': 2,
'form': 4,
'question_text': 'Why CodeBase?',
'question_type': 'Paragraph',
'options': '',
},
],
},
{
'id': 3,
'name': 'Mentored Spring 2018',
'created_at': '2017/12/07 17:55:00 +0000',
'archived': false,
'questions': [
{
'id': 3,
'form': 3,
'question_text': 'Check the classes you have taken:',
'question_type': 'Checkbox',
'options': "['CS61A', 'CS61B', 'CS61C']",
},
{
'id': 4,
'form': 3,
'question_text': 'Why CodeBase?',
'question_type': 'Paragraph',
'options': '',
},
],
},
{
'id': 2,
'name': 'Consulting Fall 2017',
'created_at': '2017/08/07 17:55:48 +0000',
'archived': false,
'questions': [
{
'id': 5,
'form': 2,
'question_text': 'Check the classes you have taken:',
'question_type': 'Checkbox',
'options': "['CS170', 'CS162', 'CS189']",
},
],
},
{
'id': 1,
'name': 'Mentored Fall 2017',
'created_at': '2017/08/07 17:30:00 +0000',
'archived': false,
'questions': [
{
'id': 6,
'form': 1,
'question_text': "What's something that technology could improve?",
'question_type': 'Paragraph',
'options': '',
},
],
},
],
};