REST Authentication
REST End Points
/1/clients - POST
Overview
The /1/clients endpoint provides for creation of new clients. For each separate client that creates a VB-Mapp a new client must be created.
Reqiured Headers
- Authorization: Token token="<your session token here>"
- User-Agent: dmtd-rest-api
- Content-Type: application/json
Fields
Field | Type | Optional | Description |
---|---|---|---|
id | 32-bit Integer | N/A | Unique client identifier |
code | String | Optional | A unique code that correlates the student to an external database and/or obfuscates the student's name |
date_of_birth | Date | Required | date of birth of the client |
diagnosis | String | Optional | |
first_name | String | Optional | |
last_name | String | Optional | |
gender | 32-bit Integer | Required | 1 = male, 2 = female |
organization_id | 32-bit Integer | Required | An id the identifies the organization that the client is created for. |
settings | String | Optional | Any information associated with the client |
Example
curl -X POST \
-H 'Authorization: Token token="9319224d0002e7a32b26c0686c42a0bf"' \
-H "Accept: application/json" \
-H "User-Agent: dmtd-rest-api" \
-H "Content-Type: application/json" \
-d '{ "object" : { "code" : "unique code 3", "date_of_birth" : "2014-01-01", "gender" : 1, "organization_id" : 1, "settings" : "anything you want here" } }' \
https://api-sandbox.datamtd.com/1/clients
Response
{ "response": { "id": 439, "organization_id": 1, "code": "unique code 3", "date_of_birth": "2014-01-01", "diagnosis": null, "first_name": null, "gender": 1, "last_name": null, "created_at": "2015-05-06T14:56:53.729Z", "updated_at": "2015-05-06T14:56:53.729Z", "settings": "anything you want here", "color": null } }
/1/clients - GET
Overview
The /1/clients endpoint provides for the examination of already created clients.
Required Headers
- Authorization: Token token="<your session token here>"
- User-Agent: dmtd-rest-api
- Content-Type: application/json
Arguments
Name | Type | Optional | Description |
---|---|---|---|
organization_id | Integer | Required | The organization identifier |
Example
curl -X GET \
-H 'Authorization: Token token="9319224d0002e7a32b26c0686c42a0bf"' \
-H "Accept: application/json" \
-H "User-Agent: dmtd-rest-api" \
-H "Content-Type: application/json" \
https://api-sandbox.datamtd.com/1/clients?organization_id=1
Response
{ "response": [ { "id": 1, "organization_id": 1, "code": null, "date_of_birth": "2015-04-30", "diagnosis": null, "first_name": null, "gender": 1, "last_name": null, "created_at": "2015-04-30T14:15:19.000Z", "updated_at": "2015-04-30T14:15:19.000Z", "settings": null, "color": null }, { "id": 2, "organization_id": 1, "code": null, "date_of_birth": "2015-04-30", "diagnosis": null, "first_name": null, "gender": 2, "last_name": null, "created_at": "2015-04-30T14:15:19.000Z", "updated_at": "2015-04-30T14:15:19.000Z", "settings": null, "color": null },
...
], "count": 56 }
/1/guide/index - GET
Overview
The /1/guide/index endpoint returns the structure of the VB-Mapp guide. The guide is divided as follows:
- Chapters
- Each chapter has sections
- Each section can have sub sections
The response to this endpoint contains an array of chapters, each of which in-turn contains the sections.
This information is used to query the remaining /1/guide/... APIs.
Required Headers
- Authorization: Token token="<your session token here>"
- User-Agent: dmtd-rest-api
- Content-Type: application/json
Optional Headers
- X-DocType: text or html – see Content Formatting for more information
- Accept-Language: <language> – see Content Formatting for more information
Chapter Fields
Field | Type | Optional | Description |
---|---|---|---|
sections | Array | Required | An array of sections in the chapter |
title | string | Required | This is equal to title from /1/guide/chapter - GET |
Section Fields
Field | Type | Optional | Description |
---|---|---|---|
title | String | Required | This is equal to title from /1/guide/section - GET |
Example
curl -X GET \
-H 'Authorization: Token token="9319224d0002e7a32b26c0686c42a0bf"' \
-H "Accept: application/json" \
-H "User-Agent: dmtd-rest-api" \
-H "Content-Type: application/json" \
https://api-sandbox.datamtd.com/1/guide/index
Response
{ "response": [ { "sections": [ ], "title": "Acknowledgements" }, { "sections": [ { "title": "About the VB-MAPP" }, { "title": "Research Using the VB-MAPP" }, { "title": "The Importance of Assessment" },
...
], "title": "Task Analysis and Skills Tracking: Level 3 (30-48 Months)" } ], "count": 16 }
Special Considerations
We reserve the right to alter the results of this index over time as updates to the guide are incorporated. Thus, it is very important that the results of this call are not cached for an indefinite period of time.
To reduce the chatter between servers, it is acceptable to cache this information during a single week period from 6am GMT Monday to 6am GMT Saturday. Any updates to the structures will be done between 6am GMT Saturday and 6am GMT Monday.
/1/guide/chapter - GET
Overview
The /1/guide/chapter endpoint provides access to the guide's chapter content.
Required Headers
- Authorization: Token token="<your session token here>"
- Content-Type: application/json
- User-Agent: dmtd-rest-api
- X-ClientId: <the client id here> or X-ClientCode: <the client code here>
Optional Headers
- X-DocType: text or html – see Content Formatting for more information
- Accept-Language: <language> – see Content Formatting for more information
Arguments
Field | Type | Optional | Description |
---|---|---|---|
chapter_num | 32-bit Integer | Required | One of the chapter numbers from (0..chapter count - 1) retrieved from the /1/guide/index - GET endpoint |
Fields
Field | Type | Optional | Description |
---|---|---|---|
content | string | Required | |
title | string | Required |
Example
curl -X GET \
-H 'Authorization: Token token="9319224d0002e7a32b26c0686c42a0bf"' \
-H "Accept: application/json" \
-H "User-Agent: dmtd-rest-api" \
-H "Content-Type: application/json" \
-H "X-ClientId: 1" \
https://api-sandbox.datamtd.com/1/guide/chapter?chapter_num=0
Response
{ "response": { "title": "Acknowledgements", "content": "B. F. Skinner's groundbreaking analysis of human behavior (1953) and language (1957) ... <p>Mark L. Sundberg<p>May, 2014 " } }
/1/guide/section - GET
Overview
The /1/guide/section endpoint provides access to the guide chapter's section content.
Required Headers
- Authorization: Token token="<your session token here>"
- Content-Type: application/json
- User-Agent: dmtd-rest-api
- X-ClientId: <the client id here> or X-ClientCode: <the client code here>
Optional Headers
- X-DocType: text or html – see Content Formatting for more information
- Accept-Language: <language> – see Content Formatting for more information
Arguments
Field | Type | Optional | Description |
---|---|---|---|
chapter_num | 32-bit Integer | Required | One of the chapter numbers from (0..chapter count - 1) retrieved from the /1/guide/index - GET endpoint |
section_num | 32-bit Integer | Required | One of the chapter numbers from (0..section count - 1) retrieved from the /1/guide/index - GET endpoint |
Fields
Field | Type | Optional | Description |
---|---|---|---|
content | string | Required | |
title | string | Required |
Example
curl -X GET \
-H 'Authorization: Token token="9319224d0002e7a32b26c0686c42a0bf"' \
-H "Accept: application/json" \
-H "User-Agent: dmtd-rest-api" \
-H "Content-Type: application/json" \
-H "X-ClientId: 1" \
https://api-sandbox.datamtd.com/1/guide/section?chapter_num=1\§ion_num=0
Response
{ "response": { "content": "There are five components of the VB-MAPP presented in this Guide. The first is the <B>VB-MAPP Milestones Assessment</B>, ... necessary intervention are included. ", "title": "About the VB-MAPP" } }
/1/guide/sub_section - GET
/1/vbmapp/index - GET
/1/vbmapp/area_question - GET
/1/assessment_report/iep - GET
Overview
The /1/assessment_report/iep endpoint returns the structure of the VB-Mapp IEP Assessment Report.
The response to this endpoint contains a list of paragraph descriptors.
Required Headers
- Authorization: Token token="<your session token here>"
- Content-Type: application/json
- User-Agent: dmtd-rest-api
- X-ClientId: <the client id here>
Optional Headers
- Accept-Language: <language> – see Content Formatting for more information
Paragraph Descriptor Fields
Field | Type | Optional | Description |
---|---|---|---|
Style | String | Required | The paragraph style |
Condition | String | Optional | An expression that determines if the paragraph belongs in the report |
Condition_Comment | String | Optional | A free-form comment describing the Condition field |
Text | String | Required | The paragraph's text, which might contain %SUBSTITUTION_FIELD%s |
Paragraph Descriptor Styles
The following table lists the various styles that can be used to apply common styling across the generated document.
Value | Description |
---|---|
H1 | Heading #1 |
H1NB | Heading #1, but not emphasized (bold) |
H2 | Heading #2 |
H3 | Heading #3 |
Indent | Normal paragraph, but shifted to the right |
Intro | Normal paragraph style, in the introduction. Can have alternate styling, if needed. |
List | Bullet list |
Warn | Adds emphasis to highlight something to the user |
Normal | Normal paragraph style |
Condition Grammar
The grammar for conditions is very trivial. It's simply: "expr op expr".
The Flex lexical description looks as follows:
[ \t\n] { /* skip spaces */ }
\%([a-zA-Z_][a-zA-Z0-9_]*)\% { yylval.string = yytext; return IDENTIFIER; }
[0-9]* { yylval.string = yytext; return INTEGER_LITERAL; }
\<= { return LT; }
\<= { return LTE; }
== { return EQ; }
\>= { return GT; }
\>= { return GTE; }
. { yyerror("Unknown token: %s", yytext); yyterminate(); }
A Bison grammar looks as follows:
binary_expr
: /* empty */
| value LT value
| value LTE value
| value EQ value
| value GT value
| value GTE value
;
value
: IDENTIFIER
| INTEGER_LITERAL
;
- Attached to this page is a full Xcode (iOS) application that can be used to verify strings: ReportGrammar.zip
- The list of IDENTIFIER (variable) definitions can be found in IEP - Variable Definitions
Example
curl -X GET \
-H 'Authorization: Token token="9319224d0002e7a32b26c0686c42a0bf"' \
-H "Accept: application/json" \
-H "User-Agent: dmtd-rest-api" \
-H "Content-Type: application/json" \
-H "X-ClientId: 1" \
https://api-sandbox.datamtd.com/1/assessment_report/iep
Response
{ "response": [ { "Style": "H1", "Text": "VB-MAPP Language Milestones, Barriers and EESA Assessment" }, { "Style": "Intro", "Text": "Name: %STUDENT_FULL_NAME%" }, { "Style": "Intro", "Text": "Date of Birth: Jan 01, 2014" }, { "Style": "Intro", "Text": "Age: 1" }, { "Style": "Intro", "Text": "Assessment Date: %STUDENT_ASSESSMENT_DATES%" }, { "Style": "Intro", "Text": "Report Date: Dec 13, 2014" }, { "Style": "Intro", "Text": "Assessor: %STUDENT_ASSESSOR%" }, { "Style": "H1NB", "Text": "General Information" },
...
{ "Style": "Normal", "Condition_Comment": "If the highest milestone the child scores 1 point in Listener is milestone 1", "Condition": "%ASSESSMENT_MILESTONE_LISTENER_HIGHEST1POINTSCORE% == 1", "Text": "Once a child begins to attend to speech sounds, the next task is to get different responses under the control of different sounds. This, of course, is the main activity of standard listener discrimination (LD) training (also identified as receptive labeling). The focus for this child might be to just get him to attend to his own name, or the name of a favorite person, pet, or character (e.g., \"There's Big Bird!\"). A variety of additional activities for developing listener skills can be found in the VB-MAPP Listener Task Analysis." }, { "Style": "Normal", "Condition_Comment": "If the highest milestone the child scores 1 point in Listener is milestone 2", "Condition": "%ASSESSMENT_MILESTONE_LISTENER_HIGHEST1POINTSCORE% == 2", "Text": "The focus for a child who does attend to his own name and perhaps a few other verbal stimuli is to increase the number of listener discriminations that he is able to make. Again, procedures that establish attending to favorite items should be the focus of the intervention at this point. This child may also be ready for more intensive listener training, perhaps beginning with listener discriminations that involve only two stimuli in an array (e.g., responding to, \"Where's Cookie Monster?\" when shown Cookie Monster and a cat)." }, { "Style": "Normal", "Condition_Comment": "If the highest milestone the child scores 1 point in Listener is milestone 3", "Condition": "%ASSESSMENT_MILESTONE_LISTENER_HIGHEST1POINTSCORE% == 3", "Text": "Reaching this milestone means a child has begun to differentially respond to verbal stimuli as demonstrated by identifying specific items during testing. The focus should now be on (1) increasing the number of items the child is able to identify as a listener, (2) begin generalization to different people, settings, and materials, etc., (3) beginning work on emitting specific motor actions on command, and (4) increasing the number of items in a visual array." }, { "Style": "Normal", "ConditionC_Comment": "If the highest milestone the child scores 1 point in Listener is milestone 4", "Condition": "%ASSESSMENT_MILESTONE_LISTENER_HIGHEST1POINTSCORE% == 4", "Text": "A score at this level suggests that listener training should become a significant part of the child's daily intervention program, along with mands, tacts, and social behavior. The other skills are clearly important, but not as critical as these four skills are for a child whose scores begin to reach the top of Level 1. At this point in the intervention program the focus should be on (1) increasing the number of items the child is able to identify as a listener, (2) increasing the number of items in a visual array\u2014more extensive use of pictures and the use of picture books, (3) an increased effort to generalize to different materials, (4) an increase in training on actions, and (5) more LD training in the natural environment and in the context of social games and social interaction." },
...
{ "Style": "Normal", "Text": "Sundberg, M. L., & Partington, J. W. (1998). Teaching language to children with autism or other developmental disabilities. Concord, CA: AVB Press." } ], "count": 687 }
Appendix
Scoring
Scoring the VB-MAPP is done by evaluating each question from the /1/protocol/area_question - GET api. The result of the area_question api contains a responses field, which is an array of possible responses for that particular question. For example, here is the response from the REST api for Milestone/MAND/1:
Milestone-MAND-1
{ "response": { "example": "A child says or signs \u201cswing\u201d when he is on a swing and wants to be pushed, and he does so without an echoic or imitative prompt.", "guideContent": { "code": "Mand 1-M", "definition": "Emits 4 different mands without prompts (except, What do you want?) the desired item can be present (e.g., music, Slinky, ball). (E)", "examples": "A child says or signs \u201cswing\u201d when he is on a swing and wants to be pushed, and he does so without an echoic or imitative prompt.", "guidePageNumber": 27, "halfPointScoreDefinition": "Give the child \u00bd point if he emits 3 of these types of mands.", "level": 1, "materials": "Gather items or plan actions that function as reinforcement for the child.", "objective": "To determine if a child mands with echoic prompts. For a child using sign language or a child selecting pictures, can the child mand with imitative or pointing prompts? If early manding is weak, limited, or typically requires physical prompting, a more careful assessment of the child's exact level will be necessary.", "onePointScoreDefinition": "Give the child 1 point if he mands for 4 different reinforcers without the adult saying the target word (echoic prompt), giving an imitative or pointing prompt, or for a child using signs, speaking the word (intraverbal prompt). The desired item or activity can be present, as well as the verbal prompt, \u201cWhat do you want?\u201d (or something similar).", "title": "Mand - Level 1" }, "guidePageNumber": 27, "materials": "Gather items or plan actions that function as reinforcement for the child.", "questionNumber": 2, "questionText": "Emits 4 different mands without prompts (except, What do you want?) the desired item can be present (e.g., music, Slinky, ball)\n\n Either testing or observation", "questionType": "E", "responses": [ { "score": 0, "text": "Score 0 Points" }, { "score": 0.5, "text": "Score 1\/2 Point" }, { "score": 1, "text": "Score 1 Point" } ] } }
The user can be prompted with the information found in the questionText field and then asked to select from 1 of the 3 possible responses provided in the text field of each possible response. When the selection is made, the corresponding score value should be stored. Typically, the best way to store these question-response pairs is in a dictionary with the key being a compound value of area:group:question# and then then value being an integer of the score chosen. For example:
Score JSON Example
{
"milestones" : {
"mand" : [
0,
1,
0.5,
...
]
}
"barriers" : {
"group1" : [
"values" :
]
},
...
}
These values are then used by the reporting modules. See IEP - Variable Definitions for further information.
IEP - Variable Definitions
Overview
The /1/assessment_report/iep endpoint returns the structure of the VB-Mapp IEP Assessment Report. That report contains multiple variables that need to be substituted by the consumer of the report.
Some of the variable bindings are a bit difficult to describe so we've provided a reference implementation: assessment_report_binder.rb
IEP Report Variables
The following table lists the variables that need to be bound:
Variable | Reference Implementation Method | Acceptable Values | Description |
---|---|---|---|
ASSESSMENT_MILESTONE_OVERALL_SCORE | merged_milestone_score | 0..170 | The sum of all of the milestone scores (see also: ASSESSMENT_MILESTONE_<GROUP>_SCORE) |
ASSESSMENT_MILESTONE_LEVEL_ACHIEVED | bind_milestone_variable | 1, 2, 3 | Based on ASSESSMENT_MILESTONE_OVERALL_SCORE:
|
ASSESSMENT_MILESTONE_SKIPPED_DOMAINS | bind_milestone_variable | Localized list of skipped group names, for example: "Mand, Tact" | A group is considered 'skipped' if there are no recorded scores for the entire group. Note that even a value of 0 is considered recorded, so this case is where no input at all was taken for the group. |
ASSESSMENT_MILESTONE_<GROUP>_SCORE | milestone_score | 0..question_count | Each MILESTONE question is scored as one of 0, 0.5 or 1. The group score is the sum of all of the question scores for that group. See /1/protocol/index - GET for the group's question_count. |
ASSESSMENT_MILESTONE_<GROUP>_GAPS | milestone_gaps, score_gaps |
| Identifies the questions in the group that have not reached full criteria (< 1.0) but whose successors (question_num+1) have. |
ASSESSMENT_MILESTONE_<GROUP>_HIGHEST | milestone_highest1_point_score | 0..question_count | The last MILESTONE (question_num) that scored 1. See /1/protocol/index - GET for the group's question_count. |
ASSESSMENT_MILESTONE_<GROUP>_ATLEASTONE | milestone_has_at_least_one | 0 (false), 1 (true) | If any of the questions scored 1 |
ASSESSMENT_MILESTONE_<GROUP>_LEVEL | milestone_level_with_first_gap | 1, 2, 3 | Using the same gap determination as 'score_gaps', determines the level in the group that has the 1st gap. See /1/protocol/index - GET for the group's level definitions. |
ASSESSMENT_MILESTONE_<GROUP>_KNOWNS_<QUESTION_NUM> | milestone_knowns |
| A list of acquired knowns for the question. ** This is not fully implemented functionality at this time. Reserved for future use. These sections have conditionals that evaluate to false, so these variables should never need to be resolved.** |
ASSESSMENT_BARRIERS_SCORE_<QUESTION_NUM> | bind_barrier_variable, barrier_score | 0..4 | The score for the barrier question. See /1/protocol/index - GET for the group's question_count. |
ASSESSMENT_BARRIERS_NUMBER_ELEVATED | bind_barrier_variable | 0..question_count | The number of barrier question responses that had a value >= 2 |
ASSESSMENT_BARRIERS_COUNT_OVER_ZERO | bind_barrier_variable | 0..question_count | The number of barrier question responses that had a value > 0 |
ASSESSMENT_BARRIERS_OVERALLSCORE | bind_barrier_variable | 0..96 | The sum of all barrier question responses |
STUDENT_FULL_NAME | bind_other_variable | The student's full name | |
STUDENT_FIRST_NAME | bind_other_variable | The student's first name | |
STUDENT_ASSESSOR | bind_other_variable | The person conducting the assessment | |
STUDENT_ASSESSMENT_DATES | bind_other_variable | "2014-12-12, 2014-9-12, ..." | The dates that assessments were conducted |