D4SD API
Resource Group ¶
Challenges ¶
Microchallenges
Display a listing of the resource.GET/challenges{?phase,allPhases,include}
- phase
number
(optional)Get challenges from specific phase.
- allPhases
boolean
(optional) Default: 0Get relations for each challenge from all phases.
- include
string
(optional)Relations to include
Choices:
category
resources
questions
insights{?:type()}
Headers
Content-Type: application/json
Body
{
"name": "Name",
"summary": "This is a challenge.",
"description": "Challenge description"
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Consequatur voluptatem atque blanditiis.",
"summary": "In vel eaque ut reprehenderit voluptates.",
"thumbnail": "http://thumbnail.com/img.jpg",
"phase": 2,
"created_at": "2017-05-31 05:06:00",
"updated_at": "2017-05-31 05:06:00"
}
}
Store a newly created resource in storage.POST/challenges
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Consequatur voluptatem atque blanditiis.",
"summary": "In vel eaque ut reprehenderit voluptates.",
"thumbnail": "http://thumbnail.com/img.jpg",
"phase": 2,
"created_at": "2017-05-31 05:06:00",
"updated_at": "2017-05-31 05:06:00"
}
}
Display the specified resource.GET/challenges/{id}{?phase,allPhases,include}
- id
integer
(required)ID of Challenge
- phase
number
(optional)Get relations from specific phase.
- allPhases
boolean
(optional) Default: 0Get relations from all phases.
- include
string
(optional)Relations to include
Choices:
category
resources
questions
insights{?:type()}
Headers
Content-Type: application/json
Body
{
"name": "Name",
"summary": "This is a challenge.",
"description": "Challenge description"
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Consequatur voluptatem atque blanditiis.",
"summary": "In vel eaque ut reprehenderit voluptates.",
"thumbnail": "http://thumbnail.com/img.jpg",
"phase": 2,
"created_at": "2017-05-31 05:06:00",
"updated_at": "2017-05-31 05:06:00"
}
}
Update the specified resource in storage.PUT/challenges/{id}
- id
integer
(required)ID of Challenge
Headers
Content-Type: application/json
Remove the specified resource from storage.DELETE/challenges/{id}
- id
integer
(required)ID of Challenge
Headers
Content-Type: application/json
Body
{
"data": {
"name": "Test",
"url": "http://test.com",
"description": "Test description",
"type": "PDF",
"phase": 2,
"challenge_id": 1,
"updated_at": "2017-05-31 06:33:25",
"created_at": "2017-05-31 06:33:25",
"id": 23
}
}
Get Resources belonging to ChallengeGET/challenges/{id}/resources
- id
integer
(required)ID of Challenge
Headers
Content-Type: application/json
Body
{
"name": "Test",
"url": "http://test.com",
"description": "Test description",
"type": "PDF"
}
Headers
Content-Type: application/json
Body
{
"data": {
"name": "Test",
"url": "http://test.com",
"description": "Test description",
"type": "PDF",
"phase": 2,
"challenge_id": 1,
"updated_at": "2017-05-31 06:33:25",
"created_at": "2017-05-31 06:33:25",
"id": 23
}
}
Store new Resource for ChallengePOST/challenges/{id}/resources
- id
integer
(required)ID of Challenge
Headers
Content-Type: application/json
Get Questions belonging to ChallengeGET/challenges/{id}/questions/{?insights}
- id
integer
(required)ID of Challenge
- insights
boolean
(optional)Include associated insights.
Headers
Content-Type: application/json
Body
{
"text": "What?"
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"text": "What?",
"challenge_id": 1,
"phase": 1,
"created_at": "2017-05-31 17:00:27",
"updated_at": "2017-05-31 17:18:28"
}
}
Store new Question for ChallengePOST/challenges/{id}/questions
- id
integer
(required)ID of Challenge
Headers
Content-Type: application/json
Body
{
"data": []
}
Get Insights for ChallengeGET/challenges/{id}/insights
- id
integer
(required)ID of Challenge
Slack Channels ¶
Class ChannelController
Display a listing of the resource.GET/channels{?condition,include}
- condition
integer
(optional)Condition ID
- include
string
(optional)Relations to include
Choices:
challenge
questions
Display the specified resource.GET/channels/{id}{?include}
- id
integer
(required)ID of Channel
- include
string
(optional)Relations to include
Choices:
challenge
questions
Challenge Resources ¶
Resources for Challenges. i.e. Student work, external resources
Display a listing of the resource.GET/resources
Headers
Content-Type: application/json
Body
{
"name": "Test",
"url": "http://test.com",
"description": "Test description",
"type": "PDF",
"challenge_id": 1
}
Headers
Content-Type: application/json
Body
{
"data": {
"name": "Test",
"url": "http://test.com",
"description": "Test description",
"type": "PDF",
"phase": 2,
"challenge_id": 1,
"updated_at": "2017-05-31 06:33:25",
"created_at": "2017-05-31 06:33:25",
"id": 23
}
}
Store a newly created resource in storage.POST/resources
Headers
Content-Type: application/json
Body
{
"data": {
"name": "Test",
"url": "http://test.com",
"description": "Test description",
"type": "PDF",
"phase": 2,
"challenge_id": 1,
"updated_at": "2017-05-31 06:33:25",
"created_at": "2017-05-31 06:33:25",
"id": 23
}
}
Display the specified resource.GET/resources/{id}{?include}
- id
integer
(required)ID of Resource
- include
string
(optional)Relations to include
Choices:
challenge
Headers
Content-Type: application/json
Body
{
"name": "Test",
"url": "http://test.com",
"description": "Test description",
"type": "PDF",
"challenge_id": 1
}
Headers
Content-Type: application/json
Body
{
"data": {
"name": "Test",
"url": "http://test.com",
"description": "Test description",
"type": "PDF",
"phase": 2,
"challenge_id": 1,
"updated_at": "2017-05-31 06:33:25",
"created_at": "2017-05-31 06:33:25",
"id": 23
}
}
Update the specified resource in storage.PUT/resources/{id}
- id
integer
(required)ID of Resource
Headers
Content-Type: application/json
Remove the specified resource from storage.DELETE/resources/{id}
- id
integer
(required)ID of Resource
Categories ¶
Categories of Microchallenges
List categories.GET/categories{?include}
Option to include challenges as well as resources. Resources default to current phase only.
- include
string
(optional)Relations to include
Choices:
challenges
challenges.questions{?:allPhases(true)}
Headers
Content-Type: application/json
Body
{
"name": "Name",
"description": "Category description"
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Name",
"description": "Category description",
"created_at": "2017-05-31 07:35:50",
"updated_at": "2017-05-31 07:35:50"
}
}
Store a newly created resource in storage.POST/categories
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Explicabo doloribus distinctio nulla.",
"description": "Quas ad officia alias asperiores laborum hic aut ex.",
"created_at": "2017-05-31 07:35:50",
"updated_at": "2017-05-31 07:35:50"
}
}
Get Category by ID.GET/categories/{id}{?include}
Option to include challenges as well as resources. Resources default to current phase only.
- id
integer
(required)ID of Category
- include
string
(optional)Relations to include
Choices:
challenges
challenges.questions
Headers
Content-Type: application/json
Body
{
"name": "Name"
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name": "Name",
"description": "Quas ad officia alias asperiores laborum hic aut ex.",
"created_at": "2017-05-31 07:35:50",
"updated_at": "2017-05-31 07:35:50"
}
}
Update the specified resource in storage.POST/categories/{id}
- id
integer
(required)ID of Category
Headers
Content-Type: application/json
Delete category. Any challenges within the category will have its category set to NULL.DELETE/categories/{id}
- id
integer
(required)ID of Category
Discussion Questions ¶
Discussion Questions
Headers
Content-Type: application/json
Display a listing of the resource.GET/questions{?challenge,phase,include}
- challenge
number
(optional)Get insights from challenge ID.
- phase
number
(optional)Get insights from specific phase
- include
string
(optional)Relations to include
Choices:
insights
challenge
Headers
Content-Type: application/json
Body
{
"text": "What?",
"challenge_id": 1
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"text": "What?",
"challenge_id": 1,
"phase": 1,
"created_at": "2017-05-31 17:00:27",
"updated_at": "2017-05-31 17:18:28"
}
}
Store a newly created resource in storage.POST/questions
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"text": "What?",
"challenge_id": 1,
"phase": 1,
"created_at": "2017-05-31 17:00:27",
"updated_at": "2017-05-31 17:18:28"
}
}
Display the specified resource.GET/questions/{id}{?include}
- id
integer
(required)ID of Question
- include
string
(optional)Relations to include
Choices:
insights
challenge
Headers
Content-Type: application/json
Body
{
"text": "What?"
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"text": "What?",
"challenge_id": 1,
"phase": 1,
"created_at": "2017-05-31 17:00:27",
"updated_at": "2017-05-31 17:18:28"
}
}
Update the specified resource in storage.PUT/questions/{id}
- id
integer
(required)ID of Question
Headers
Content-Type: application/json
Remove the specified resource from storage.DELETE/questions/{id}
- id
integer
(required)ID of Question
Insights ¶
Insights i.e. Discussion, comments, prototypes, ideas
Headers
Content-Type: application/json
Display a listing of the resource.GET/insights{?types,challenge,phase,include}
- types
array|number
(optional)Filter by type (0 = NORMAL, 1 = CURATED, 2 = HIGHLIGHT)
- challenge
number
(optional)Get insights from challenge ID.
- phase
number
(optional)Get insights from specific phase
- include
string
(optional)Relations to include
Choices:
user
question
challenge
Headers
Content-Type: application/json
Body
{
"text": "Eos ipsa possimus nemo voluptas facilis in.",
"user_id": 1,
"timestamp": "1999-01-31 00:00:00",
"thumbnail": "http://lorempixel.com/640/480/?44834",
"type": 0,
"question_id": 1,
"challenge_id": 1,
"slack_meta": {
"var1": "content"
}
}
Headers
Content-Type: application/json
Body
{
"data": {
"text": "Eos ipsa possimus nemo voluptas facilis in.",
"user_id": 1,
"timestamp": "1999-01-31 00:00:00",
"thumbnail": "http://lorempixel.com/640/480/?44834",
"type": 0,
"question_id": 1,
"challenge_id": 1,
"slack_meta": "",
"phase": 0,
"updated_at": "2017-05-31 19:58:08",
"created_at": "2017-05-31 19:58:08",
"id": 1261
}
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Body
{
"insights": []
}
Headers
Content-Type: application/json
Body
{
"data": {
"text": "Eos ipsa possimus nemo voluptas facilis in.",
"user_id": 1,
"timestamp": "1999-01-31 00:00:00",
"thumbnail": "http://lorempixel.com/640/480/?44834",
"type": 0,
"question_id": 1,
"challenge_id": 1,
"slack_meta": "",
"phase": 0,
"updated_at": "2017-05-31 19:58:08",
"created_at": "2017-05-31 19:58:08",
"id": 1261
}
}
Headers
Content-Type: application/json
Store a newly created resource in storage.POST/insights
Headers
Content-Type: application/json
Body
{
"data": {
"text": "Eos ipsa possimus nemo voluptas facilis in.",
"user_id": 1,
"timestamp": "1999-01-31 00:00:00",
"thumbnail": "http://lorempixel.com/640/480/?44834",
"type": 0,
"question_id": 1,
"challenge_id": 1,
"slack_meta": "",
"phase": 0,
"updated_at": "2017-05-31 19:58:08",
"created_at": "2017-05-31 19:58:08",
"id": 1261
}
}
Display the specified resource.GET/insights/{id}{?include}
- id
integer
(required)ID of Insight
- include
string
(optional)Relations to include
Choices:
user
question
challenge
Headers
Content-Type: application/json
Body
{
"type": 1
}
Headers
Content-Type: application/json
Body
{
"data": {
"text": "Eos ipsa possimus nemo voluptas facilis in.",
"user_id": 1,
"timestamp": "1999-01-31 00:00:00",
"thumbnail": "http://lorempixel.com/640/480/?44834",
"type": 1,
"question_id": 1,
"challenge_id": 1,
"slack_meta": "",
"phase": 0,
"updated_at": "2017-05-31 19:58:08",
"created_at": "2017-05-31 19:58:08",
"id": 1261
}
}
Update the specified resource in storage.PUT/insights/{id}
- id
integer
(required)ID of Insight
Headers
Content-Type: application/json
Remove the specified resource from storage.DELETE/insights/{id}
- id
integer
(required)ID of Insight
Events ¶
Events
Headers
Content-Type: application/json
Body
{
"data": [
{
"id": 1,
"name": "Name",
"date": "2018-12-03 11:33:37",
"description": "Desc."
},
{
"id": 2,
"name": "Name",
"date": "2018-12-03 11:33:37",
"description": "Desc."
}
]
}
Display a listing of the resource.GET/events
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"name”:”Event Name”,”date": "2018-12-03 11:33:37",
"description”:”Description,”created_at": "2017-06-13 16:35:34",
"updated_at": "2017-06-13 16:35:34"
}
}
Users ¶
Users
Headers
Content-Type: application/json
Body
{
"data": [
{
"id": 1,
"slack_id": "UrH6vj8",
"name": "Wilma Hickle",
"email": "kallie68@example.org",
"thumbnail": null,
"admin": 0,
"created_at": "2017-06-13 17:57:56",
"updated_at": "2017-06-13 17:57:56"
}
]
}
Display a listing of the resource.GET/users
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"slack_id": "UuwXqgS",
"name": "Lambert Feest",
"email": "uwintheiser@example.com",
"thumbnail": null,
"admin": 0,
"survey": "",
"created_at": "2017-06-19 20:06:49",
"updated_at": "2017-06-19 20:13:45"
}
}
Display the specified resource.GET/users/{id}
- id
integer|string
(required)ID of User OR Slack ID of user
- include
string
(optional)Relations to include
Choices:
challenge
Headers
Content-Type: application/json
Body
{
"survey": ""
}
Headers
Content-Type: application/json
Body
{
"data": {
"id": 1,
"slack_id": "UuwXqgS",
"name": "Lambert Feest",
"email": "uwintheiser@example.com",
"thumbnail": null,
"admin": 0,
"survey": "",
"created_at": "2017-06-19 20:06:49",
"updated_at": "2017-06-19 20:13:45"
}
}
Update the specified resource in storage.PUT/users/{id}
- id
integer|string
(required)ID of User OR Slack ID of user
Generated by aglio on 30 Jun 2017