POST /oauth/access_token
A web client can request access on behalf of a resource owner by sending the resource owner's
credentials via POST /oauth/access_token
:
A successful response will be JSON with the following attributes:
{ "access_token":"…", "token_type":"Bearer", "expires_in":3600 }
Status code | Error value* | Reason |
---|---|---|
400 | invalid_request | The required credentials are missing |
401 | invalid_credentials | The credentials aren't correct |
GET /assessments/{id}
Path parameters:
Parameter | Notes |
---|---|
id | The id of the assessment to fetch |
Query parameters:
Parameter | Required? | Notes |
---|---|---|
include | No | Can be a comma-separated list containing related entites to include those full relationships in the response (e.g. GET /assessments/1?include=child,coder,eci_observations). |
{ "data": { "type": "assessments", "id": "1", "attributes": { }, "relationships": { }, "links": { "self": "http://example.org/assessments/1" } }, "included": [ { "type": "children", "id": "2", "attributes": …, … }, { "type": "eci_observations", "id": "4", "attributes": …, … } ] }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "403", "title": "Forbidden" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. trying to include an invalid relationship) |
403 | Forbidden | The requestor is not allowed to access the assessment with the specified {id} |
404 | Not found | The assessment with the specified {id} cannot be found |
POST /assessments
The request should be a JSON API document.
Required attributes:
Required relationships:
{ "data": { "type": "assessments", "attributes": { "assessment_date": "Mar 10, 2016", "duration_in_seconds": "300", "play_partner_type": "Parent or Primary caregiver", "location": "Home" }, "relationships": { "child": { "data": { "type": "children", "id": "4" } }, "coder": { "data": { "type": "users", "id": "3" } }, "languages": { "data": [ { "type": "languages", "id": "1" }, { "type": "languages", "id": "2" }, { "type": "languages", "id": "3" }, { "type": "languages", "id": "4" } ] }, "eci_observations": { "data": [ { "type": "eci_observations", "attributes": { "interval": "Aggregate", "gesture_count": "15", "vocalization_count": "15", "single_word_count": "15", "multiple_word_count": "15", }, "relationships": { "toy_set: { "data": { "type": "toy_sets", "id": "2" } } } } ] } } } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "assessments", "id": "4", "attributes": { }, "relationships": { }, "links": { "self": "http://example.org/assessments/4" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
PATCH /assessments/id
The request should be a JSON API document.
Path parameters:
Parameter | Notes |
---|---|
id | The id of the assessment to update |
See POST /assessments
for fields that cannot be specified as empty/null (although they can be omitted). If specified, languages
and eci_observations
relationships in the request will replace all corresponding associations on the assessment.
{ "data": { "id": 4, "type": "assessments", "attributes": { "assessment_date": "Mar 10, 2016", "duration_in_seconds": "300", "play_partner_type": "Parent or Primary caregiver", "location": "Home" }, "relationships": { "child": { "data": { "type": "children", "id": "4" } }, "coder": { "data": { "type": "users", "id": "3" } }, "languages": { "data": [ { "type": "languages", "id": "1" }, { "type": "languages", "id": "2" }, { "type": "languages", "id": "3" }, { "type": "languages", "id": "4" } ] }, "eci_observations": { "data": [ { "type": "eci_observations", "attributes": { "interval": "Aggregate", "gesture_count": "15", "vocalization_count": "15", "single_word_count": "15", "multiple_word_count": "15", }, "relationships": { "toy_set: { "data": { "type": "toy_sets", "id": "2" } } } } ] } } } }
A successful response will be a JSON API object with HTTP status 200:
{ "data": { "type": "assessments", "id": "4", "attributes": { }, "relationships": { }, "links": { "self": "http://example.org/assessments/4" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
403 | Forbidden | The requestor is not allowed to access the assessment with specified id |
404 | Not found | The assessment with the specified id cannot be found |
GET /assessment_charts/subject={subject};subject_id={subject_id};igdi_measure={igdi_measure_id}
An assessment chart comprises data for graphing assessment scores versus time, only considering assessments for children who were between the ages of 0 and 42 months at the time of assessment. The chart is always in the context of one igdi measure assessment observation type. Two additional parameters are required to identify the subject of the chart: the subject must be one of child, program, or program group, and will be identified by subject_id. The following example id segments are valid:
Note that the following paths identify the same assessment chart (i.e. parameter order doesn't matter):
Path parameters:
Parameter | Notes |
---|---|
subject | Subject must be one of child, program, or program_group |
subject_id | The id of the subject |
igdi_measure_id | The id of the igdi measure, designating assessment observation type, to chart |
A successful response will be a JSON API document with HTTP status 200. Note that all chart dates are formatted as MM/DD/YYYY
.
{ "data": { "type": "assessment_charts", "id": "subject=child;subject_id=4;igdi_measure=1", "links": { "self": "http://example.org/assessment_charts/subject=child;subject_id=4;igdi_measure=1" }, "attributes": { "score_segments": [ { "dataPoints": [ { "id": 1, "date": "04/01/2016", "toySets": [ "House" ], "x": 3, "y": 4 }, { "id": 2, "date": "04/07/2016", "toySets": [ "Barn" ], "x": 3.2, "y": 6 } ] }, { "dataPoints": [ { "id": 3, "date": "07/01/2016", "toySets": [ "House" ], "x": 6, "y": 2 }, { "id": 4, "date": "08/31/2016", "toySets": [ "Barn" ], "x": 8, "y": 10 }, { "id": 5, "date": "10/31/2016", "toySets": [ "House" ], "x": 10, "y": 11 } ], "trend": [ { "x": 6, "y": 2.5 }, { "x": 10, "y": 12 } ] }, { "dataPoints": [ { "id": 6, "date": "12/31/2016", "toySets": [ "House" ], "x": 12, "y": 10 }, { "id": 7, "date": "03/02/2017", "toySets": [ "Barn" ], "x": 14, "y": 8 }, { "id": 8, "date": "05/01/2017", "toySets": [ "House" ], "x": 16, "y": 14 } ], "trend": [ { "x": 12, "y": 8 }, { "x": 16, "y": 13 } ] } ], "interventions": [ { "value": 6, "label": "Promoting Communication Strategies" }, { "value": 11.7, "label": "MOD Recommendations" } ], "normative_data": { "mean": [ { "x": 6, "y": 1.999793 }, { "x": 7, "y": 2.375551 }, { "x": 8, "y": 2.773089 }, { "x": 9, "y": 3.192407 }, { "x": 10, "y": 3.633505 }, { "x": 11, "y": 4.096383 }, { "x": 12, "y": 4.581041 }, { "x": 13, "y": 5.087479 }, { "x": 14, "y": 5.615697 }, { "x": 15, "y": 6.165695 }, { "x": 16, "y": 6.737473 }, { "x": 17, "y": 7.331031 }, { "x": 18, "y": 7.946369 }, { "x": 19, "y": 8.583487 }, { "x": 20, "y": 9.242385 }, { "x": 21, "y": 9.923063 }, { "x": 22, "y": 10.625521 }, { "x": 23, "y": 11.349759 }, { "x": 24, "y": 12.095777 }, { "x": 25, "y": 12.863575 }, { "x": 26, "y": 13.653153 }, { "x": 27, "y": 14.464511 }, { "x": 28, "y": 15.297649 }, { "x": 29, "y": 16.152567 }, { "x": 30, "y": 17.029265 }, { "x": 31, "y": 17.927743 }, { "x": 32, "y": 18.848001 }, { "x": 33, "y": 19.790039 }, { "x": 34, "y": 20.753857 }, { "x": 35, "y": 21.739455 }, { "x": 36, "y": 22.746833 }, { "x": 37, "y": 23.775991 }, { "x": 38, "y": 24.826929 }, { "x": 39, "y": 25.899647 }, { "x": 40, "y": 26.994145 }, { "x": 41, "y": 28.110423 }, { "x": 42, "y": 29.248481 } ], "minusOneSd": [ { "x": 6, "y": 1.672806762 }, { "x": 7, "y": 1.973655491 }, { "x": 8, "y": 2.292506021 }, { "x": 9, "y": 2.632121359 }, { "x": 10, "y": 2.993723787 }, { "x": 11, "y": 3.377828896 }, { "x": 12, "y": 3.784598912 }, { "x": 13, "y": 4.214003185 }, { "x": 14, "y": 4.665897021 }, { "x": 15, "y": 5.140063487 }, { "x": 16, "y": 5.63623733 }, { "x": 17, "y": 6.154119788 }, { "x": 18, "y": 6.693388553 }, { "x": 19, "y": 7.253705063 }, { "x": 20, "y": 7.834720267 }, { "x": 21, "y": 8.436079476 }, { "x": 22, "y": 9.057426615 }, { "x": 23, "y": 9.698408038 }, { "x": 24, "y": 10.35867597 }, { "x": 25, "y": 11.03789157 }, { "x": 26, "y": 11.73572764 }, { "x": 27, "y": 12.45187094 }, { "x": 28, "y": 13.18602403 }, { "x": 29, "y": 13.93790676 }, { "x": 30, "y": 14.70725725 }, { "x": 31, "y": 15.49383257 }, { "x": 32, "y": 16.29740891 }, { "x": 33, "y": 17.11778153 }, { "x": 34, "y": 17.95476429 }, { "x": 35, "y": 18.80818906 }, { "x": 36, "y": 19.67790485 }, { "x": 37, "y": 20.56377681 }, { "x": 38, "y": 21.46568518 }, { "x": 39, "y": 22.38352414 }, { "x": 40, "y": 23.31720062 }, { "x": 41, "y": 24.2666332 }, { "x": 42, "y": 25.23175099 } ], "minusOneAndAHalfSd": [ { "x": 6, "y": 1.509313643 }, { "x": 7, "y": 1.772707737 }, { "x": 8, "y": 2.052214531 }, { "x": 9, "y": 2.351978538 }, { "x": 10, "y": 2.673833181 }, { "x": 11, "y": 3.018551844 }, { "x": 12, "y": 3.386377868 }, { "x": 13, "y": 3.777265277 }, { "x": 14, "y": 4.190997032 }, { "x": 15, "y": 4.627247731 }, { "x": 16, "y": 5.085619496 }, { "x": 17, "y": 5.565664183 }, { "x": 18, "y": 6.06689833 }, { "x": 19, "y": 6.588814094 }, { "x": 20, "y": 7.130887901 }, { "x": 21, "y": 7.692587714 }, { "x": 22, "y": 8.273379423 }, { "x": 23, "y": 8.872732557 }, { "x": 24, "y": 9.49012545 }, { "x": 25, "y": 10.12504985 }, { "x": 26, "y": 10.77701496 }, { "x": 27, "y": 11.44555091 }, { "x": 28, "y": 12.13021155 }, { "x": 29, "y": 12.83057663 }, { "x": 30, "y": 13.54625337 }, { "x": 31, "y": 14.27687735 }, { "x": 32, "y": 15.02211287 }, { "x": 33, "y": 15.78165279 }, { "x": 34, "y": 16.55521793 }, { "x": 35, "y": 17.34255609 }, { "x": 36, "y": 18.14344077 }, { "x": 37, "y": 18.95766972 }, { "x": 38, "y": 19.78506327 }, { "x": 39, "y": 20.6254627 }, { "x": 40, "y": 21.47872842 }, { "x": 41, "y": 22.34473831 }, { "x": 42, "y": 23.22338598 } ] }, "next_recommended_date": "08/01/2017" } } }
Note that some situations will result in a 200 response with no results:
HTTP/1.1 200 OK { "data": { "type": "assessment_charts", "id": "subject=child;subject_id=4;igdi_measure=2", "links": { "self": "http://example.org/assessment_charts/subject=child;subject_id=4;igdi_measure=2" }, "attributes": { "score_segments": [], "interventions": [], "normative_data": null "next_recommended_date": null } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "404", "title": "Not found" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed because the id path contains invalid parameters/values or is missing required parameters and values |
403 | Forbidden | The requestor is not allowed to access the specified igdi measure observation type or the requested subject |
404 | Not found | Could not find the specified igdi_measure_id or subject_id. |
GET /children
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[by_oauth_token] | Yes* | If present, all children who can be accessed by the resource owner for the supplied authorization token will be returned. This filter overrides any other filters that are present. |
filter[program] | Yes* | Fetch all children enrolled in the specified program. Only one program id should be specified. |
include | No | Can be a comma-separated list containing a subset of {program} to include those full relationships in the response (e.g. GET /children/?filter[program]=1&include=program). |
{ "data": [ { "type": "children", "id": "4", "attributes": { }, "relationships": { }, "links": { "self": "http://example.org/children/4" }, //… } ], "included": [ { "type": "programs", "id": "2", "attributes": …, … } ] }
Results are sorted by last name, then first name, then id (all ascending).
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "403", "title": "Forbidden" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values |
403 | Forbidden | The requestor is not allowed to access the full list of children in the specified program |
GET /children/{id}
Path parameters:
Parameter | Notes |
---|---|
id | The id of the child to fetch |
Query parameters:
Parameter | Required? | Notes |
---|---|---|
include | No | Can be a comma-separated list containing a subset of {program} to include those full relationships in the response (e.g. GET /children/4?include=program). |
{ "data": { "type": "children", "id": "4", "attributes": { }, "relationships": { }, "links": { "self": "http://example.org/children/4" } }, "included": [ { "type": "programs", "id": "2", "attributes": …, … } ] }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "403", "title": "Forbidden" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. trying to include an invalid relationship) |
403 | Forbidden | The requestor is not allowed to access the child with the specified {id} |
404 | Not found | The child with the specified {id} cannot be found |
POST /children
The request should be a JSON API document.
Required attributes:
Required relationships:
{ "data": { "type": "children", "attributes": { "enroll_date": "2016-04-28", "first_name": "Patty", "last_name": "Lynn" }, "relationships": { "program": { "data": { "type": "programs", "id": "1" } }, "gender": { "data": { "type": "users", "id": "3" } }, "languages": { "data": [ { "type": "languages", "id": "1" }, { "type": "languages", "id": "2" }, { "type": "languages", "id": "3" }, { "type": "languages", "id": "4" } ] }, "ifsps": { "data": [ { "type": "ifsps", "id": "4" }, { "type": "ifsps", "attributes": { "name": "Custom IFSP for Patty Lynn", "defined_by": "Child" } } ] } } } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "children", "id": "4", "attributes": { } "relationships": { }, "links": { "self": "http://example.org/children/4" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
PATCH /children/{id}
Currently, PATCH
ing children is limited to IFSPs; everything else will be scrubbed from the request.
Path parameters:
Parameter | Notes |
---|---|
id | The id of the child to update |
The request should be a JSON API document with the id
specified.
{ "data": { "type": "children", "id": "5", "relationships": { "ifsps": { "data": [ { "type": "ifsps", "id": "4" }, { "type": "ifsps", "attributes": { "name": "Custom IFSP for Patty Lynn", "defined_by": "Child" } } ] } } } }
A successful response will be a JSON API object with HTTP status 200:
{ "data": { "type": "children", "id": "5", "attributes": { } "relationships": { }, "links": { "self": "http://example.org/children/4" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
403 | Forbidden | The requestor is not allowed to access the child with the specified {id} |
404 | Not found | The child with the specified {id} cannot be found |
GET /child_reports/child={childId};igdi_measure={igdiMeasureId}
An individual child report includes assessment chart data (see Assessment Charts), additional assessment data, and Key Skill data.
Path parameters:
Parameter | Notes |
---|---|
childId | The id of the child |
igdiMeasureId | The id of the igdi measure designating report type |
TODO: Add data struct description
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "403", "title": "Forbidden" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. IGDI measure) |
403 | Forbidden | The requestor is not allowed to access the specified child's data or that IGDI measure |
404 | Not found | The specified child cannot be found |
GET /countries
No additional parameters are used.
A successful response will be a JSON API document:
{ "data": [ { "type": "countries", "id": "1", "attributes": { "name": "Abkhazia" }, "links": { "self": "http://example.org/countries/1" } }, { "type": "countries", "id": "2", "attributes": { "name": "Afghanistan" }, "links": { "self": "http://example.org/countries/2" } } ] }
GET /genders
No additional parameters are used.
A successful response will be a JSON API document:
{ "data": [ { "type": "genders", "id": "1", "attributes": { "name": "Male" }, "links": { "self": "http://example.org/genders/1" } }, { "type": "genders", "id": "2", "attributes": { "name": "Female" }, "links": { "self": "http://example.org/genders/2" } } ] }
GET /group_progress_reports
Query parameters:
Parameter | Required? | Notes | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filter[igdi_measures] | Yes* | ID of the measures you would like to query. 1=ECI, 2=EMI, 3=EPSI, 4=ESI. Separate multiple by comma (,).
Eg., /group_progress_reports/?filter[igdi_measures]=1,2,3 |
||||||||||||
filter[programs] | Yes* | ID of the programs you would like to query. Separate multiple by comma (,).
Eg., /group_progress_reports/?filter[igdi_measures]=1,2,3&filter[programs]=1,2,3 |
||||||||||||
filter[status] | 1 | Include active/inactive children in returned results. Defaults to 1 for active. Can separate by comma if both desired.
Eg., /group_progress_reports/?filter[igdi_measures]=1,2,3&filter[programs]=1,2,3&filter[status]=0,1 |
||||||||||||
fields[group_progress_reports] | Yes* | Data field(s) to returny. Separate multiple by comma (,).
Eg., /group_progress_reports/?filter[igdi_measures]=1&filter[programs]=1&fields[group_progress_reports]=overdueChildren,overallProficiency Options
|
A successful response will be a JSON API document:
{ "data": { "type": "group_progress_reports", "id": "program_ids=1%2C2", "attributes": { "programs": [ { "name": "Program Name 1" }, { "name": "Another Queried Program" } ], "overdue_children": [ { "childName": "Beth, Jehnny" , "igdiMeasureName": "ECI" , "latestAssessmentDate": "3/3/17" , "proficiency": "Below Benchmark" , "coderName": "Stephen King" , "dueDate": "6/1/17" }, { "childName": "Grohl, Dave" , "igdiMeasureName": "ECI" , "latestAssessmentDate": "6/1/17" , "proficiency": "Below Benchmark" , "coderName": "Stephen King" , "dueDate": "9/1/17" }, { "childName": "Grohl, Dave" , "igdiMeasureName": "EMI" , "latestAssessmentDate": "6/1/17" , "proficiency": "Slightly Below Benchmark" , "coderName": "Anne Rice" , "dueDate": "9/1/17" }, { "childName": "Homme, Josh" , "igdiMeasureName": "EPSI" , "latestAssessmentDate": "6/1/17" , "proficiency": "Below Benchmark" , "coderName": "Anne Rice" , "dueDate": "9/1/17" }, { "childName": "Peterson, Megan" , "igdiMeasureName": "EPSI" , "latestAssessmentDate": "4/18/17" , "proficiency": "Below Benchmark" , "coderName": "Stephen King" , "dueDate": "7/1/17" }, { "childName": "Waters, Roger" , "igdiMeasureName": "ECI" , "latestAssessmentDate": "6/1/17" , "proficiency": "Slightly Below Benchmark" , "coderName": "Anne Rice" , "dueDate": "9/1/17" } ], "children_without_assessments": [ { "childName": "Poe, Edgar" , "ageInMonths": "7" , "igdiMeasureNames": "ECI, EMI" }, { "childName": "Seuss, Doctor" , "ageInMonths": "12" , "igdiMeasureNames": "EMI" } ], "below_benchmark_counts": [ { "igdiMeasureName": "ECI" , "numChildrenSlightlyBelow": "8" , "numChildrenBelow": "10" }, { "igdiMeasureName": "EMI" , "numChildrenSlightlyBelow": "5" , "numChildrenBelow": "6" }, { "igdiMeasureName": "EPSI" , "numChildrenSlightlyBelow": "2" , "numChildrenBelow": "6" }, { "igdiMeasureName": "ESI" , "numChildrenSlightlyBelow": "0" , "numChildrenBelow": "0" } ], "children_below_benchmark": [ { "childName": "Beth, Jehnny" , "ageInMonths": "33" , "igdiMeasureName": "EPSI" , "latestAssessmentDate": "3/1/17" , "proficiency": "Below Benchmark" , "proficiencyCount": "3" }, { "childName": "Grohl, Dave" , "ageInMonths": "7" , "igdiMeasureName": "ECI" , "latestAssessmentDate": "6/1/16" , "proficiency": "Below Benchmark" , "proficiencyCount": "2" }, { "childName": "Grohl, Dave" , "ageInMonths": "12" , "igdiMeasureName": "EMI" , "latestAssessmentDate": "12/1/16" , "proficiency": "Slightly Below Benchmark" , "proficiencyCount": "1" }, { "childName": "Patterson, Megan" , "ageInMonths": "18" , "igdiMeasureName": "ECI" , "latestAssessmentDate": "6/1/17" , "proficiency": "Slightly Below Benchmark" , "proficiencyCount": "4" } ], "charts": { "ECI": [ { "type": "total", "name": "Weighted Total ECI", "scores": [ { "x": 3.97, "y": 0.67 }, { "x": 5.3, "y": 1.34 }, { "x": 7.42, "y": 1.34 }, { "x": 11.45, "y": 1.01 }, { "x": 14.35, "y": 0.67 } ], "trend": [ { "x": 3.97, "y": 1.12 }, { "x": 14.35, "y": 0.86 } ], "benchmarks": [ { "x": 6, "y": 1.999793 }, { "x": 7, "y": 2.375551 }, etc..., ] }, { "type": "keySkill", "name": "Gestures", "scores": see above, "trend": see above, "benchmarks": see above }, { "type": "keySkill", "name": repeats for each skill type } ], "EMI": [ { "type": "total", "name": "Total EMI", etc...see above }, { "type": "keySkill", etc...see above } ] } } } }
GET /igdi_admins/{id}
Igdi Admin info is used on the Implementation Dashboard. This is the data that does not have a dismiss option.
Path parameters:
Parameter | Notes |
---|---|
id | The id of the logged in user |
A successful response will be a JSON API document:
{ "data": { "type": "igdi_admins", "id": "50", "attributes": { "total_assessments": 41, "children_over_age_limit": [ { "id": 103, "first_name": "Jack", "last_name": "Middleton", "birthdate": "2011-05-09" } ], "children_over_age_limit_count": 1, "children_below_benchmark": [ { "first_name": "Jan28 Kid", "last_name": "test", "age_of_months": 12, "child_id": 102, "igdi_id": "ECI", "last_assessment": "2019-01-22", "assessment_id": 196, "age_last_assessment": 11 }, { "first_name": "billy", "last_name": "kid", "age_of_months": 13, "child_id": 101, "igdi_id": "EMI", "last_assessment": "2019-01-31", "assessment_id": 243, "age_last_assessment": 12 }, { "first_name": "billy", "last_name": "kid", "age_of_months": 13, "child_id": 101, "igdi_id": "EPSI", "last_assessment": "2019-02-03", "assessment_id": 213, "age_last_assessment": 13 } ], "children_below_benchmark_count": 3, "children_need_first_assessment": [ { "first_name": "jan29testtest", "last_name": "test", "birthdate": "2018-03-04", "child_id": 104, "igdi_measure": "ECI" }, { "first_name": "Secondfebtest", "last_name": "test", "birthdate": "2018-03-07", "child_id": 106, "igdi_measure": "EPSI" } ], "children_need_first_assessment_count": 2 } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "403", "title": "Forbidden" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values |
403 | Forbidden | The requestor is not allowed to access the specified user's data |
404 | Not found | The specified user cannot be found |
GET /igdi_measures
No additional parameters are used.
A successful response will be a JSON API document:
{ "data": [ { "type": "igdi_measures", "id": "1", "attributes": { "short_name": "ECI", "long_name": "Early Communication Indicator" }, "links": { "self": "http://example.org/igdi_measures/1" } }, { "type": "igdi_measures", "id": "2", "attributes": { "short_name": "EMI", "long_name": "Early Movement Indicator" }, "links": { "self": "http://example.org/igdi_measures/2" } } ] }
GET /interventions
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[defined_by] | Yes* | Currently the only acceptable filter value is 'System' (get system-defined interventions) |
filter[assessment_id] | Yes* | Filter interventions associated with the specified assessment_id. Note that this also returns system-defined interventions (as with the 'System' filter above), which can be considered to be associated with all assessments in general. |
{ "data": [ { "type": "interventions", "id": "1", "attributes": { }, "relationships": { } }, { "type": "interventions", "id": "2", "attributes": { }, "relationships": { } } ] }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required parameters, or the parameter value is incorrectly formatted. |
GET /ifsps
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[defined_by] | Yes | Currently the only acceptable filter value is 'System' (get system-defined interventions) |
{ "data": [ { "type": "ifsps", "id": "1", "attributes": { }, "relationships": { } }, { "type": "ifsps", "id": "2", "attributes": { }, "relationships": { } } ] }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required parameters, or the parameter value is incorrectly formatted. |
GET /languages
Returns a list of languages sorted by their display_rank attribute, ascending, then name ascending.
No additional parameters are used.
A successful response will be a JSON API document:
{ "data": [ { "type": "languages", "id": "1", "attributes": { "name": "English", "display_rank": "1" }, "links": { "self": "http://example.org/languages/1" } }, { "type": "languages", "id": "2", "attributes": { "name": "Spanish", "display_rank": "2" }, "links": { "self": "http://example.org/languages/2" } } ] }
GET /program_groups
Returns a list of program groups.
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[user] | No | If given, fetch program groups that user belongs to. Only one user id should be specified. |
A successful response will be a JSON API document:
{ "data": [ { "type": "program_groups", "id": "1", "attributes": { }, "relationships": { }, "links": { "self": "http://example.org/program_groups/1" } }, { "type": "program_groups", "id": "2", "attributes": { }, "relationships": { }, "links": { "self": "http://example.org/program_groups/2" } } ] }
POST /program_groups
The request should be a JSON API document.
Required attributes:
Required relationships:
{ "data": { "type": "program-groups", "attributes": { "display_name": "Cool Program Group", "internal_name": "cool_program_group" }, "relationships": { "country": { "data": { "type": "countries", "id": "1" } }, "program_mod_type": { "data": { "type": "program_mod_types", "id": "1" } }, "us_states": { "data": [ { "type": "us_states", "id": "16" } ] }, "program_types": { "data": [ { "type": "program_types", "id": "3" }, { "type": "program_types", "id": "4" }, { "type": "program_types", "id": "1" } ] }, "program_models": { "data": [ { "type": "program_models", "id": "1" }, { "type": "program_models", "id": "2" } ] }, "igdi_measures": { "data": [ { "type": "igdi_measures", "id": "1" }, { "type": "igdi_measures", "id": "2" }, { "type": "igdi_measures", "id": "3" }, { "type": "igdi_measures", "id": "4" } ] } } } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "program_groups", "id": "1", "attributes": { "display_name": "Cool Program Group", "internal_name": "cool_program_group" }, "relationships": { "country": { "data": { "type": "countries", "id": "197" } }, "program_mod_type": { "data": { "type": "program_mod_types", "id": "1" } }, "igdi_measures": { "data": [ { "type": "igdi_measures", "id": "1" }, { "type": "igdi_measures", "id": "2" }, { "type": "igdi_measures", "id": "3" }, { "type": "igdi_measures", "id": "4" } ] }, "program_types": { "data": [ { "type": "program_types", "id": "1" }, { "type": "program_types", "id": "3" }, { "type": "program_types", "id": "4" } ] }, "program_models": { "data": [ { "type": "program_model", "id": "1" }, { "type": "program_model", "id": "2" } ] }, "us_states": { "data": [ { "type": "us_states", "id": "16" } ] } }, "links": { "self": "http://example.org/program_groups/1" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required attributes/relationships or malformed syntax |
GET /program_mod_types
No additional parameters are used.
A successful response will be a JSON API document:
{ "data": [ { "type": "program_mod_types", "id": "1", "attributes": { "name": "Non-MOD" }, "links": { "self": "http://example.org/program_mod_types/1" } }, { "type": "program_mod_types", "id": "2", "attributes": { "name": "Standard MOD" }, "links": { "self": "http://example.org/program_mod_types/2" } } ] }
GET /program_models
No additional parameters are used.
A successful response will be a JSON API document:
{ "data": [ { "type": "program_models", "id": "1", "attributes": { "name": "Home based" }, "links": { "self": "http://example.org/program_models/1" } }, { "type": "program_models", "id": "2", "attributes": { "name": "Center based" }, "links": { "self": "http://example.org/program_models/2" } } ] }
GET /program_types
Returns a list of program types sorted by their display_order attribute, ascending.
No additional parameters are used.
A successful response will be a JSON API document:
{ "data": [ { "type": "program_types", "id": "3", "attributes": { "name": "Early Head Start", "display_order": "1" }, "links": { "self": "http://example.org/program_types/3" } }, { "type": "program_types", "id": "4", "attributes": { "name": "Part C IDEA", "display_order": "2" }, "links": { "self": "http://example.org/program_types/4" } } ] }
GET /programs
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[program_group] | Yes* | *Required for Administrators and Directors (not allowed for program-level users). Only one program group id can be specified. |
filter[user] | Yes* | *Required for Coordinators. Only one user id can be specified. |
A successful response will be a JSON API object containing an array of programs with HTTP status 200.
{ "data": [ { "type": "programs", "id": "1", "attributes": { … }, "relationships": { … }, "links": { "self": "/programs/1" } }, { "type": "programs", "id": "2", "attributes": { … }, "relationships": { … }, "links": { "self": "/programs/2" } } ] }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required parameters, or the parameter value is incorrectly formatted. |
POST /programs
The request should be a JSON API document.
Required attributes:
Required relationships:
{ "data": { "type": "programs", "attributes": { "name": "Test program 1234", "city": "Lawrence Jayhawk City", "address_street": "1234 Juniper Gardens Lane, Apt. 11A", "postal_code": "66101-A354" }, "relationships": { "program_group": { "data": { "type": "program_groups", "id": "1" } }, "country": { "data": { "type": "countries", "id": "197" } }, "program_mod_type": { "data": { "type": "program_mod_types", "id": "1" } }, "us_state": { "data": { "type": "us_states", "id": "16" } }, "program_types": { "data": [ { "type": "program_types", "id": "3" }, { "type": "program_types", "id": "4" }, { "type": "program_types", "id": "1" } ] }, "program_models": { "data": [ { "type": "program_models", "id": "1" }, { "type": "program_models", "id": "2" } ] }, "igdi_measures": { "data": [ { "type": "igdi_measures", "id": "1" }, { "type": "igdi_measures", "id": "2" }, { "type": "igdi_measures", "id": "3" }, { "type": "igdi_measures", "id": "4" } ] } } } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "programs", "id": "4", "attributes": { } "relationships": { }, "links": { "self": "http://example.org/programs/4" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required attributes/relationships or malformed syntax |
GET /recertifications?filter=user_id={user_id}status={status}
The request should be a JSON API document.
Path parameters:
Parameter | Required? | Notes |
---|---|---|
filter[user_id] | No | If present, only the resource owner for the supplied authorization token will have their recertification data returned |
filter[assessment_id] | No | If present, only the recertification date connected to the assessment id will be returned. |
filter[program_id] | No | If present, only the recertifications connected to the program id will be returned. |
A successful response will be a JSON API document with HTTP status 200.
{ "data": { "type": "recertification", "id": "user_id=child;subject_id=4;igdi_measure=1", "links": { "self": "http://example.org/assessment_charts/subject=child;subject_id=4;igdi_measure=1" }, "attributes": { }, "relationships": { }, } }
GET /total_admin_concerns
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[program_group] | No* | This is for admin users so they can filter the report by program group. s |
A successful response will be a JSON API document:
{ "data": [ { "type": "total_admin_concerns", "status": "200", "id": 1, "attributes": { "id": 1, "child_id": 101, "child_first_name": "billy", "child_last_name": "kid", "birthdate": "2018-01-02", "user_first_name": "Bryan", "user_last_name": "Cisler", "admin_concerns_id": "Less than 5:30 minutes or more than 6:30", "concern_type": "total_admin_concern", "igdi_id": "ECI", "assessment_id": 179, "assessment_date": "2018-11-05" } }, { "type": "total_admin_concerns", "status": "200", "id": 4, "attributes": { "id": 4, "child_id": 101, "child_first_name": "billy", "child_last_name": "kid", "birthdate": "2018-01-02", "user_first_name": "Bryan", "user_last_name": "Cisler", "admin_concerns_id": "Less than 5:30 minutes or more than 6:30", "concern_type": "total_admin_concern", "igdi_id": "ECI", "assessment_id": 184, "assessment_date": "2019-01-08" } } ] }
GET /toy_sets
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[igdi_measure] | Yes | Fetch toy sets associated with the specified IGDI measure. Only one IGDI measure id should be specified |
{ "data": [ { "type": "toy_sets", "id": "1", "attributes": { }, "relationships": { } }, { "type": "toy_sets", "id": "2", "attributes": { }, "relationships": { } } ] }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required parameters, or the parameter value is incorrectly formatted. |
GET /us_states
No additional parameters are used.
A successful response will be a JSON API document:
{ "data": [ { "type": "us_states", "id": "1", "attributes": { "name": "Alabama", "abbreviation": "AL" }, "links": { "self": "http://example.org/us_states/1" } }, { "type": "us_states", "id": "2", "attributes": { "name": "Alaska", "abbreviation": "AK" }, "links": { "self": "http://example.org/us_states/2" } } ] }
GET /user_roles
No additional parameters are used.
A success response will be a JSON API document:
{ "data": [ { "type": "user_roles", "id": "1", "attributes": { "name": "Administrator", "description": "The ADMIN" }, "links": { "self": "http://example.org/user_roles/1" } } ] }
GET /users
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[by_oauth_token] | No | If present, only the resource owner for the supplied authorization token will be returned. This filter overrides any other filters that are present. |
filter[program] | No | If present, fetch all Educators, Coordinators, and Directors who have access to the specified program. Only one program id should be specified. |
include | No | Can be a comma-separated list containing a subset of {children, igdi_measures, program_groups, program, user_role} to include those full relationships in the response (e.g. GET /users/?include=user_role,program_groups). |
{ "data": [ { "type": "users", "id": "4", "attributes": { } "relationships": { }, "links": { "self": "http://example.org/users/4" } } ], "included": [ { "type": "user_roles", "id": "2", "attributes": … }, { "type": "program_groups", "id": "1", "attributes": …, … }, { "type": "program_groups", "id": "2", "attributes": …, … } ] }
GET /users/{id}
Path parameters:
Parameter | Notes |
---|---|
id | The id of the user to fetch |
Query parameters:
Parameter | Required? | Notes |
---|---|---|
include | No | Can be a comma-separated list containing a subset of {children, igdi_measures, program_groups, program, user_role} to include those full relationships in the response (e.g. GET /users/4?include=user_role,program_groups). |
{ "data": { "type": "users", "id": "4", "attributes": { } "relationships": { }, "links": { "self": "http://example.org/users/4" } } "included": [ { "type": "user_roles", "id": "2", "attributes": … }, { "type": "program_groups", "id": "1", "attributes": …, … }, { "type": "program_groups", "id": "2", "attributes": …, … } ] }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "404", "title": "Not found" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. trying to include an invalid relationship) |
404 | Not found | Could not find a user with the specified {id} |
POST /users
The request should be a JSON API document.
Required attributes:
Required relationships:
{ "data": { "type": "users", "attributes": { "first_name": "Test user first", "last_name": "Test user last", "email": "test.user@example.org", "password": "test pass-phrase" }, "relationships": { "user_role": { "data": { "type": "user_roles", "id": "4" } }, "igdi_measures": { "data": [ { "type": "igdi_measures", "id": "1" }, { "type": "igdi_measures", "id": "2" }, { "type": "igdi_measures", "id": "3" }, { "type": "igdi_measures", "id": "4" } ] }, "program_groups": { "data": [ { "type": "program_groups", "id": "1" } ] }, "programs": { "data": [ { "type": "programs", "id": "1" } ] } } } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "users", "id": "4", "attributes": { } "relationships": { }, "links": { "self": "http://example.org/users/4" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
children
relationship.is_restricted
attribute on a user being saved.include
parameter to include child lists.GET /mod_items
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[child_id] | No | If present, only MOD items assigned to specified child are returned. |
{ "data": [ { "type": "mod_items", "id": "1", "attributes": { "label": "Item 1", "name": "Item 1", "desc": "test", "short_desc": "test", "content": "[{"type":"text","data":"This item should display if the ECI score is 1 SD below benchmark or lower"}]", "response_choices": [], "response_type_id": 1, "correct_response": "", "response_no_effect": 0, "published_path": null, "child_id": 0, "root_id": 0 }, "relationships": { "triggers": { "data": [] }, "igdi": { "data": { "type": "igdi_measures", "id": "1" } }, "item_type": { "data": { "type": "mod_item_types", "id": "1" } }, "response_type": { "data": { "type": "mod_response_types", "id": "1" } } }, "links": { "self": "http://dev.igdi.services/mod_items/1" } } ] }
GET /mod_items/{id}
Path parameters:
Parameter | Notes |
---|---|
id | The id of the MOD item to fetch |
{ "data": { "type": "mod_items", "id": "1", "attributes": { "label": "Item 1", "name": "Item 1", "desc": "test", "short_desc": "test", "content": "[{"type":"text","data":"This item should display if the ECI score is 1 SD below benchmark or lower"}]", "response_choices": [], "response_type_id": 1, "correct_response": "", "response_no_effect": 0, "published_path": "Group 1 > Unit 1 > ProgramsApiTest Program \n Group 1 > Unit 3 > ProgramsApiTest Program
", "child_id": 0, "root_id": 0 }, "relationships": { "triggers": { "data": [] }, "igdi": { "data": { "type": "igdi_measures", "id": "1" } }, "item_type": { "data": { "type": "mod_item_types", "id": "1" } }, "response_type": { "data": { "type": "mod_response_types", "id": "1" } } }, "links": { "self": "http://dev.igdi.services/mod_items/1" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "404", "title": "Not found" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. trying to include an invalid relationship) |
404 | Not found | Could not find a user with the specified {id} |
POST /mod_items
The request should be a JSON API document.
Required attributes:
Required relationships:
{ "data":{ "attributes":{ "duplicate_id":0, "name":"Item 9", "desc":"Desc", "short_desc":"Short Desc", "content":"[{"type":"text","data":"This item should display if the ECI score is 1 SD below benchmark or lower"}]", "correct_response":"test response", "response_no_effect":0, "response_choices":[ ], "touched_by":"1" }, "relationships":{ "item_type":{ "data":{ "type":"mod-item-types", "id":"1" } }, "triggers":{ "data":[ ] }, "igdi":{ "data":{ "type":"igdi-measures", "id":"1" } }, "response_type":{ "data":{ "type":"mod-response-types", "id":"3" } } }, "type":"mod-items" } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "mod_items", "id": "12", "attributes": { "label": "Item 12", "name": "Item 12", "desc": "desc", "short_desc": "short_desc", "content": "[{"type":"text","data":"This item should display if the ECI score is 1 SD below benchmark or lower"}]", "response_choices": [], "response_type_id": 3, "correct_response": "test response", "response_no_effect": 0, "published_path": null, "child_id": 0, "root_id": 0 }, "relationships": { "triggers": { "data": [] }, "igdi": { "data": { "type": "igdi_measures", "id": "1" } }, "item_type": { "data": { "type": "mod_item_types", "id": "1" } }, "response_type": { "data": { "type": "mod_response_types", "id": "3" } } }, "links": { "self": "http:\/\/dev.igdi.services\/mod_items\/12" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
GET /mod_groups
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[child_id] | No | If present, only MOD groups assigned to specified child are returned. |
{ "data": [ { "type": "mod_groups", "id": "1", "attributes": { "name": "Group 1", "desc": "test", "label": "Group 1", "published_path": null, "child_id": 0, "root_id": 0 }, "relationships": { "items": { "data": [ { "type": "mod_items", "id": "1" }, { "type": "mod_items", "id": "2" }, { "type": "mod_items", "id": "3" }, { "type": "mod_items", "id": "4" } ] }, "triggers": { "data": [] }, "igdi": { "data": { "type": "igdi_measures", "id": "1" } } }, "links": { "self": "http://dev.igdi.services/mod_groups/1" } }, ] }
GET /mod_groups/{id}
Path parameters:
Parameter | Notes |
---|---|
id | The id of the MOD group to fetch |
{ "data": { "type": "mod_groups", "id": "1", "attributes": { "name": "Group 1", "desc": "test", "label": "Group 1", "published_path": "Unit 1 > ProgramsApiTest Program \n Unit 1 > ProgramsApiTest Program \n Unit 1 > ProgramsApiTest Program \n > Unit 1 > ProgramsApiTest Program \n Element 1 > Unit 3 > ProgramsApiTest Program \n Element 1 > Unit 3 > ProgramsApiTest Program \n Element 1 > Unit 3 > ProgramsApiTest Program \n Element 1 > Unit 3 > ProgramsApiTest Program", "child_id": 0, "root_id": 0 }, "relationships": { "items": { "data": [ { "type": "mod_items", "id": "1" }, { "type": "mod_items", "id": "2" }, { "type": "mod_items", "id": "3" }, { "type": "mod_items", "id": "4" } ] }, "triggers": { "data": [] }, "igdi": { "data": { "type": "igdi_measures", "id": "1" } } }, "links": { "self": "http://dev.igdi.services/mod_groups/1" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "404", "title": "Not found" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. trying to include an invalid relationship) |
404 | Not found | Could not find a user with the specified {id} |
POST /mod_groups
The request should be a JSON API document.
Required attributes:
Required relationships:
{ "data":{ "attributes":{ "duplicate_id":0, "name":"Group 5", "desc":"Description", "touched_by":"1" }, "relationships":{ "items":{ "data":[ { "type":"mod-items", "id":"1" }, { "type":"mod-items", "id":"2" }, { "type":"mod-items", "id":"3" }, { "type":"mod-items", "id":"4" } ] }, "triggers":{ "data":[ ] }, "igdi":{ "data":{ "type":"igdi-measures", "id":"1" } } }, "type":"mod-groups" } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "mod_groups", "id": "3", "attributes": { "name": "Group 5", "desc": "Description", "label": "Group 5", "published_path": null, "child_id": 0, "root_id": 0 }, "relationships": { "items": { "data": [ { "type": "mod_items", "id": "1" }, { "type": "mod_items", "id": "2" }, { "type": "mod_items", "id": "3" }, { "type": "mod_items", "id": "4" } ] }, "triggers": { "data": [] }, "igdi": { "data": { "type": "igdi_measures", "id": "1" } } }, "links": { "self": "http:\/\/dev.igdi.services\/mod_groups\/3" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
GET /mod_units
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[child_id] | No | If present, only MOD units assigned to specified child are returned. |
{ "data": [ { "type": "mod_units", "id": "1", "attributes": { "name": "Unit 1", "desc": "test", "published_path": null, "child_id": 0, "root_id": 0 }, "relationships": { "program": { "data": { "type": "programs", "id": "1" } }, "groups": { "data": [ { "type": "mod_groups", "id": "1" }, { "type": "mod_groups", "id": "3" } ] }, "triggers": { "data": [ { "type": "mod_triggers", "id": "1" } ] }, "igdi": { "data": { "type": "igdi_measures", "id": "1" } } }, "links": { "self": "http://dev.igdi.services/mod_units/1" } }, ] }
GET /mod_units/{id}
Path parameters:
Parameter | Notes |
---|---|
id | The id of the MOD unit to fetch |
{ "data": { "type": "mod_units", "id": "1", "attributes": { "name": "Unit 1", "desc": "test", "published_path": "ProgramsApiTest Program \n ProgramsApiTest Program \n ProgramsApiTest Program \n ProgramsApiTest Program", "child_id": 0, "root_id": 0 }, "relationships": { "program": { "data": { "type": "programs", "id": "1" } }, "groups": { "data": [ { "type": "mod_groups", "id": "1" }, { "type": "mod_groups", "id": "3" } ] }, "triggers": { "data": [ { "type": "mod_triggers", "id": "1" } ] }, "igdi": { "data": { "type": "igdi_measures", "id": "1" } } }, "links": { "self": "http://dev.igdi.services/mod_units/1" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "404", "title": "Not found" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. trying to include an invalid relationship) |
404 | Not found | Could not find a user with the specified {id} |
POST /mod_units
The request should be a JSON API document.
Required attributes:
Required relationships:
{ "data":{ "attributes":{ "duplicate_id":0, "name":"Unit 5", "desc":"Desc", "touched_by":"1" }, "relationships":{ "program":{ "data":{ "type":"programs", "id":"1" } }, "groups":{ "data":[ { "type":"mod-groups", "id":"1" } ] }, "triggers":{ "data":[ { "type":"mod-triggers", "id":"1" } ] }, "igdi":{ "data":{ "type":"igdi-measures", "id":"1" } } }, "type":"mod-units" } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "mod_units", "id": "5", "attributes": { "name": "Unit 5", "desc": "Desc", "published_path": null, "child_id": 0, "root_id": 0 }, "relationships": { "program": { "data": { "type": "programs", "id": "1" } }, "groups": { "data": [ { "type": "mod_groups", "id": "1" } ] }, "triggers": { "data": [ { "type": "mod_groups", "id": "1" } ] }, "igdi": { "data": { "type": "igdi_measures", "id": "1" } } }, "links": { "self": "http:\/\/dev.igdi.services\/mod_units\/5" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
GET /mod_trigger_igdi_scores
{ "data": [ { "type": "mod_trigger_igdi_scores", "id": "1", "attributes": { "title": "igdi-score behavior 1", "desc": "test", "weighted_selected": 1, "weighted_score": 0, "weighted_score_min": 0, "weighted_score_max": 0, "weighted_slope": 1, "weighted_slope_min": 0, "weighted_slope_max": 0, "weighted_age": 0, "weighted_age_min": 0, "weighted_age_max": 0, "gestures_selected": 1, "gestures_score": 0, "gestures_score_min": 0, "gestures_score_max": 0, "gestures_slope": 1, "gestures_slope_min": 0, "gestures_slope_max": 0, "gestures_age": 0, "gestures_age_min": 0, "gestures_age_max": 0, "vocalization_selected": 1, "vocalization_score": 0, "vocalization_score_min": 0, "vocalization_score_max": 0, "vocalization_slope": 1, "vocalization_slope_min": 0, "vocalization_slope_max": 0, "vocalization_age": 0, "vocalization_age_min": 0, "vocalization_age_max": 0, "multi_selected": 1, "multi_score": 0, "multi_score_min": 0, "multi_score_max": 0, "multi_slope": 1, "multi_slope_min": 0, "multi_slope_max": 0, "multi_age": 0, "multi_age_min": 0, "multi_age_max": 0, "single_selected": 1, "single_score": 0, "single_score_min": 0, "single_score_max": 0, "single_slope": 1, "single_slope_min": 0, "single_slope_max": 0, "single_age": 0, "single_age_min": 0, "single_age_max": 0 }, "links": { "self": "http://dev.igdi.services/mod_trigger_igdi_scores/1" } } ] }
GET /mod_trigger_igdi_scores/{id}
Path parameters:
Parameter | Notes |
---|---|
id | The id of the IGDI-Score Behavior to fetch |
{ "data": { "type": "mod_trigger_igdi_scores", "id": "1", "attributes": { "title": "igdi-score behavior 1", "desc": "test", "weighted_selected": 1, "weighted_score": 0, "weighted_score_min": 0, "weighted_score_max": 0, "weighted_slope": 1, "weighted_slope_min": 0, "weighted_slope_max": 0, "weighted_age": 0, "weighted_age_min": 0, "weighted_age_max": 0, "gestures_selected": 1, "gestures_score": 0, "gestures_score_min": 0, "gestures_score_max": 0, "gestures_slope": 1, "gestures_slope_min": 0, "gestures_slope_max": 0, "gestures_age": 0, "gestures_age_min": 0, "gestures_age_max": 0, "vocalization_selected": 1, "vocalization_score": 0, "vocalization_score_min": 0, "vocalization_score_max": 0, "vocalization_slope": 1, "vocalization_slope_min": 0, "vocalization_slope_max": 0, "vocalization_age": 0, "vocalization_age_min": 0, "vocalization_age_max": 0, "multi_selected": 1, "multi_score": 0, "multi_score_min": 0, "multi_score_max": 0, "multi_slope": 1, "multi_slope_min": 0, "multi_slope_max": 0, "multi_age": 0, "multi_age_min": 0, "multi_age_max": 0, "single_selected": 1, "single_score": 0, "single_score_min": 0, "single_score_max": 0, "single_slope": 1, "single_slope_min": 0, "single_slope_max": 0, "single_age": 0, "single_age_min": 0, "single_age_max": 0 }, "links": { "self": "http://dev.igdi.services/mod_trigger_igdi_scores/1" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "404", "title": "Not found" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. trying to include an invalid relationship) |
404 | Not found | Could not find a user with the specified {id} |
POST /mod_trigger_igdi_scores
The request should be a JSON API document.
Required attributes:
{ "data":{ "attributes":{ "title":"IGDI-Score Behavior 1", "desc":"Desc", "weighted_selected":"2", "weighted_score":0, "weighted_score_min":"", "weighted_score_max":"", "weighted_slope":1, "weighted_slope_min":"", "weighted_slope_max":"", "weighted_age":0, "weighted_age_min":"", "weighted_age_max":"", "gestures_selected":"1", "gestures_score":0, "gestures_score_min":"", "gestures_score_max":"", "gestures_slope":1, "gestures_slope_min":"", "gestures_slope_max":"", "gestures_age":0, "gestures_age_min":"", "gestures_age_max":"", "vocalization_selected":"1", "vocalization_score":0, "vocalization_score_min":"", "vocalization_score_max":"", "vocalization_slope":1, "vocalization_slope_min":"", "vocalization_slope_max":"", "vocalization_age":0, "vocalization_age_min":"", "vocalization_age_max":"", "multi_selected":"1", "multi_score":0, "multi_score_min":"", "multi_score_max":"", "multi_slope":1, "multi_slope_min":"", "multi_slope_max":"", "multi_age":0, "multi_age_min":"", "multi_age_max":"", "single_selected":"1", "single_score":0, "single_score_min":"", "single_score_max":"", "single_slope":1, "single_slope_min":"", "single_slope_max":"", "single_age":0, "single_age_min":"", "single_age_max":"" }, "type":"mod-trigger-igdi-scores" } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "mod_trigger_igdi_scores", "id": "2", "attributes": { "title": "IGDI-Score Behavior 2", "desc": "Desc", "weighted_selected": 2, "weighted_score": 0, "weighted_score_min": 0, "weighted_score_max": 0, "weighted_slope": 1, "weighted_slope_min": 0, "weighted_slope_max": 0, "weighted_age": 0, "weighted_age_min": 0, "weighted_age_max": 0, "gestures_selected": 1, "gestures_score": 0, "gestures_score_min": 0, "gestures_score_max": 0, "gestures_slope": 1, "gestures_slope_min": 0, "gestures_slope_max": 0, "gestures_age": 0, "gestures_age_min": 0, "gestures_age_max": 0, "vocalization_selected": 1, "vocalization_score": 0, "vocalization_score_min": 0, "vocalization_score_max": 0, "vocalization_slope": 1, "vocalization_slope_min": 0, "vocalization_slope_max": 0, "vocalization_age": 0, "vocalization_age_min": 0, "vocalization_age_max": 0, "multi_selected": 1, "multi_score": 0, "multi_score_min": 0, "multi_score_max": 0, "multi_slope": 1, "multi_slope_min": 0, "multi_slope_max": 0, "multi_age": 0, "multi_age_min": 0, "multi_age_max": 0, "single_selected": 1, "single_score": 0, "single_score_min": 0, "single_score_max": 0, "single_slope": 1, "single_slope_min": 0, "single_slope_max": 0, "single_age": 0, "single_age_min": 0, "single_age_max": 0 }, "links": { "self": "http:\/\/dev.igdi.services\/mod_trigger_igdi_scores\/3" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
GET /mod_trigger_message_reminders
{ "data": [ { "type": "mod_trigger_message_reminders", "id": "1", "attributes": { "title": "message-reminder behavior 1", "desc": "test", "display_on_home_screen": 1, "send_to_email": 1, "message": "test message here", "email_receiver": 0, }, "relationships": { "users": { "data": [ { "type": "users", "id": "1" }, { "type": "users", "id": "3" }, { "type": "users", "id": "2" } ] } }, "links": { "self": "http://dev.igdi.services/mod_trigger_message_reminders/1" } } ] }
GET /mod_trigger_message_reminders/{id}
Path parameters:
Parameter | Notes |
---|---|
id | The id of the Message-Reminder Behavior to fetch |
{ "data": { "type": "mod_trigger_message_reminders", "id": "1", "attributes": { "title": "message-reminder behavior 1", "desc": "test", "display_on_home_screen": 1, "send_to_email": 1, "message": "test message here", "email_receiver": 0, }, "relationships": { "users": { "data": [ { "type": "users", "id": "1" }, { "type": "users", "id": "3" }, { "type": "users", "id": "2" } ] } }, "links": { "self": "http://dev.igdi.services/mod_trigger_message_reminders/1" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "404", "title": "Not found" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. trying to include an invalid relationship) |
404 | Not found | Could not find a user with the specified {id} |
POST /mod_trigger_message_reminders
The request should be a JSON API document.
Required attributes:
Required relationships:
{ "data":{ "attributes":{ "title":"Message-Reminder Behavior 2", "desc":"Desc", "display_on_home_screen":true, "send_to_email":true, "message":"Test Message", "email_receiver":true, }, "relationships":{ "users":{ "data":[ { "type":"users", "id":"1" }, { "type":"users", "id":"3" } ] } }, "type":"mod-trigger-message-reminders" } }
A successful response will be a JSON API object with HTTP status 201:
{ "data": { "type": "mod_trigger_message_reminders", "id": "2", "attributes": { "title": "Message-Reminder Behavior 2", "desc": "Desc", "display_on_home_screen": 1, "send_to_email": 1, "message": "Test Message", "email_receiver": 1, }, "relationships": { "users": { "data": [ { "type": "users", "id": "1" }, { "type": "users", "id": "3" } ] } }, "links": { "self": "http:\/\/dev.igdi.services\/mod_trigger_message_reminders\/2" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "400", "title": "Bad request" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to missing required fields or malformed syntax |
GET /child_mod_items
Query parameters:
Parameter | Required? | Notes |
---|---|---|
filter[child_id] | No | If present, only MOD Units/Groups/Items assigned to specified child are returned. |
filter[delete_id] | No | If present, MOD Units/Groups/Items whose root_id is [delete_id] will be deleted permanently. |
{ "data": [ { "type": "child_mod_item", "id": "356", "attributes": { "child_id": 4, "mod_item_id": 1, "mod_item_type": "unit", "behavior_id": 1, "root_id": 356, "parent_id": 0, "completed_percent": 13, "completed_date": "", "response_type_id": 0, "response_value": "", "created_at": "2019-02-16", "first_name": null, "last_name": null, "title": null, "desc": null }, "links": { "self": "http://dev.igdi.services/child_mod_item/356" } }, { "type": "child_mod_item", "id": "358", "attributes": { "child_id": 4, "mod_item_id": 1, "mod_item_type": "group", "behavior_id": 1, "root_id": 356, "parent_id": 357, "completed_percent": 25, "completed_date": "", "response_type_id": 0, "response_value": "", "created_at": "2019-02-16", "first_name": null, "last_name": null, "title": null, "desc": null }, "links": { "self": "http://dev.igdi.services/child_mod_item/358" } }, ] }
GET /child_mod_units/{id}
Path parameters:
Parameter | Notes |
---|---|
id | The id of the Child MOD Item to fetch |
{ "data": { "type": "child_mod_item", "id": "356", "attributes": { "child_id": 4, "mod_item_id": 1, "mod_item_type": "unit", "behavior_id": 1, "root_id": 356, "parent_id": 0, "completed_percent": 13, "completed_date": "", "response_type_id": 0, "response_value": "", "created_at": "2019-02-16", "first_name": null, "last_name": null, "title": null, "desc": null }, "links": { "self": "http://dev.igdi.services/child_mod_item/356" } } }
If any errors occur, a JSON API errors object array will be returned:
{ "errors": [ { "status": "404", "title": "Not found" } ] }
Status code | Title | Reason |
---|---|---|
400 | Bad request | Validation failed due to invalid parameter values (e.g. trying to include an invalid relationship) |
404 | Not found | Could not find a user with the specified {id} |
Unless otherwise specified, dates should be specified using YYYY-MM-DD
format. Responses will follow the same format.
TBD
TBD