Dartmouth API Developer Portal
Agreements and Agreement Types
Returns policy content and markup related to an agreement, acceptance state of an agreement for a particular user, and allows the state to be changed.
Agreements API
Returns acceptance state of an agreement for a particular user and allows the acceptance state to be changed.
Required Scopes
Scope | Description |
---|---|
urn:dartmouth:agreements:write.acceptance | Optional scope required to create/update/delete (i.e. POST/PATCH/DEL) agreements |
Requests
GET /api/agreements?netid={netid}
POST /api/agreements
PATCH /api/agreements/{id}
DEL /api/agreements/{id}
Required Headers
Authorization: Bearer {jwt}
Parameters
Parameter Name | Type | Description | Valid values | Required |
---|
(standard filter parameters)
Notes on usage
The agreements APIs must be used by applications that display photos of "confidential" students. The agreement policy (available via /agreement_types API) should be displayed for users that have not yet accepted, and acceptance state should be set after a user has acknowledged/accepted the agreement. And markup included with the policy must be displayed with a "confidential" student's photo.
Returns
Status Code | Description |
---|---|
200 | Successful GET (payload could be an empty array if no agreements found) or PATCH |
201 | Successful POST |
400 | Invalid or missing payload with POST/PATCH |
403 | Required scope missing with POST/PATCH |
409 | Failed POST due to duplicate agreement |
Sample Requests
GET https://api.dartmouth.edu/api/agreements?netid=d35022g
POST https://api.dartmouth.edu/api/agreements
body:
{
"netid": "d35022g",
"agreement_type_id": "confid",
"is_accepted": true
}
PATCH https://api.dartmouth.edu/api/agreements/5cf00020129f9a66db7af74a
body:
{
"is_accepted": true
}
DEL https://api.dartmouth.edu/api/agreements/5cf00020129f9a66db7af74a
Field | Type | Description |
---|---|---|
netid | string | |
agreement_type_id | string | Must be one of the following: confid (confidentialty), ferpa (not used), or chsn (chosen name, gender, etc.) |
is_accepted | boolean |
Sample Return
[
{
"agreement_type_id": "confid",
"updated_date": "2019-05-30T16:09:03Z",
"created_date": "2019-05-29T16:15:16Z",
"netid": "d35022g",
"is_accepted": false,
"id": "5cf00020129f9a66db7af74a"
}
]
Agreements Types API
Returns policy content and markup related to a policy (e.g. icon and text to be displayed near photos of "confidential" students).
Required Scopes
Scope | Description |
---|
(none)
Requests
GET /api/agreement_types/{id}
Required Headers
Authorization: Bearer {jwt}
Parameters
Parameter Name | Type | Description | Valid values | Required |
---|
(none)
Notes on usage
The agreement policy (agreement_html) should be displayed for users that have not yet accepted. And markup included with the policy (label_html and image_base64) must be displayed with a "confidential" student's photo.
Returns
Status Code | Description |
---|---|
200 | The URI parameter {id} passed in represent a valid agreement type |
404 | The URI parameter {id} passed in does not represent a valid agreement type (must be either confid, ferpa, or chsn) |
Sample Requests
GET https://api.dartmouth.edu/api/agreement_types/confid
1.10.7.1.8. Sample Return
{
"id": "confid",
"description": "Confidentiality",
"label_html": "<style>.confidential_label { font-size: 0.9em; color: red }</style><span class=\"confidential_label\">**Confidential**</span>",
"agreement_html": "<style type=\"text/css\" media=\"screen\">\n div.agreement {\n font: 12px/1.7em 'Open Sans', arial, sans-serif;\n }\n\n div.agreement h3 {\n font-size: 18px;\n margin-top: 0;\n font-weight: 600;\n line-height: 40px;\n margin: 10px 0;\n font-family: inherit;\n color: inherit;\n text-rendering: optimizelegibility;\n }\n\n div.agreement p {\n margin-bottom: 1.5em;\n margin: 0 0 10px;\n }\n\n div.agreement a {\n color: #2a7752;\n text-decoration: none;\n }\n\n div.agreement a:hover {\n color: #2a7752;\n }\n\n div.agreement a:hover, a:focus {\n text-decoration: underline;\n }\n\n div.agreement a:hover, a:active {\n outline: 0;\n }\n\n div.agreement a.accept {\n -webkit-box-shadow: rgba(255, 255, 255, 0.2) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.0470588) 0px 1px 2px 0px;\n background-color: rgb(146, 183, 101);\n background-image: linear-gradient(rgb(160, 194, 119), rgb(125, 166, 75));\n background-repeat: repeat-x;\n border-bottom-color: rgba(0, 0, 0, 0.247059);\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n border-image-outset: 0px;\n border-image-repeat: stretch;\n border-image-slice: 100%;\n border-image-source: none;\n border-image-width: 1;\n border-left-color: rgba(0, 0, 0, 0.0980392);\n border-left-style: solid;\n border-left-width: 1px;\n border-right-color: rgba(0, 0, 0, 0.0980392);\n border-right-style: solid;\n border-right-width: 1px;\n border-top-color: rgba(0, 0, 0, 0.0980392);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-top-style: solid;\n border-top-width: 1px;\n box-shadow: rgba(255, 255, 255, 0.2) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.0470588) 0px 1px 2px 0px;\n color: rgb(255, 255, 255);\n cursor: pointer;\n display: inline-block;\n font-family: 'Open Sans', arial, sans-serif;\n font-size: 14px;\n font-style: normal;\n font-variant-caps: normal;\n font-weight: normal;\n height: 20px;\n line-height: 20px;\n margin-bottom: 0px;\n margin-right: 5px;\n padding-bottom: 4px;\n padding-left: 12px;\n padding-right: 12px;\n padding-top: 4px;\n text-align: center;\n text-decoration: none;\n text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px;\n vertical-align: middle;\n }\n\n div.agreement a.accept {\n -webkit-box-shadow: rgba(255, 255, 255, 0.2) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.0470588) 0px 1px 2px 0px;\n background-color: rgb(146, 183, 101);\n background-image: linear-gradient(rgb(160, 194, 119), rgb(125, 166, 75));\n background-repeat: repeat-x;\n border-bottom-color: rgba(0, 0, 0, 0.247059);\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n border-image-outset: 0px;\n border-image-repeat: stretch;\n border-image-slice: 100%;\n border-image-source: none;\n border-image-width: 1;\n border-left-color: rgba(0, 0, 0, 0.0980392);\n border-left-style: solid;\n border-left-width: 1px;\n border-right-color: rgba(0, 0, 0, 0.0980392);\n border-right-style: solid;\n border-right-width: 1px;\n border-top-color: rgba(0, 0, 0, 0.0980392);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-top-style: solid;\n border-top-width: 1px;\n box-shadow: rgba(255, 255, 255, 0.2) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.0470588) 0px 1px 2px 0px;\n color: rgb(255, 255, 255);\n cursor: pointer;\n display: inline-block;\n font-family: 'Open Sans', arial, sans-serif;\n font-size: 14px;\n font-style: normal;\n font-variant-caps: normal;\n font-weight: normal;\n height: 20px;\n line-height: 20px;\n margin-bottom: 0px;\n margin-right: 5px;\n padding-bottom: 4px;\n padding-left: 12px;\n padding-right: 12px;\n padding-top: 4px;\n text-align: center;\n text-decoration: none;\n text-shadow: rgba(0, 0, 0, 0.247059) 0px -1px 0px;\n vertical-align: middle;\n }\n\n</style>\n<div class=\"agreement\">\n <h3>Confidentiality Agreement</h3>\n <p>\n\tThe information provided on this website is confidential. Faculty and staff have the responsibility to maintain the rights of students particularly as outlined in the Family Educational Rights and Privacy Act (FERPA). Please remember that some students exercise their right under FERPA to have <strong>*all*</strong> their information excluded from Directory Information. (See <a href=\"http://student-affairs.dartmouth.edu/resources/student-handbook/\" target=\"_blank\">Student Handbook</a> for a list of Directory Information). Students who have done so are noted by the word \"Confidential\" on the roster. The \"Confidential\" designation does not require that you treat the student differently, but rather further limits information that Dartmouth may provide without the student's written consent. If you have questions about FERPA and/or the information provided on this website, please contact (The Registrar).\n </p>\n</div>",
"short_text": "All information pertaining to this student is strictly confidential. Information regarding this student should not be released to any parties outside Dartmouth College.",
"image_base64": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAA6ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6e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