Back to list

user/{API key}/id/{user_id}/

Get some of a user's account information.

Extra Parameters:

Parameter API key
Type (20 character) string
Description This identifier is given to you by a national administrator.
Example https://api.agclassroom.org/api/7374b52ca0fcff775bcd/id/b2cb192ac1fdbbb79ad2/
Parameter user_id
Type (20 character) string
Description This identifier is given to you when the user logs in.
Example https://api.agclassroom.org/api/7374b52ca0fcff775bcd/id/b2cb192ac1fdbbb79ad2/

HTTP Method

GET

Requires authentication:

Yes

Return Format:

JSON

Return Example:

{

success:true

message:Found 1 user.

resultcount:1

result: [..]

0 {...}

id:7823

username:johndoe+3@gmail.com

name:John Doe

firstname:John

lastname:Doe

email:johndoe+3@gmail.com

joined:December 2, 2017 - 3:46 PM

last_login:July 11, 2019 - 10:34 AM

active:1

location:43

permission_group:4

affiliation: [..]

0 {..}

id:6

abbreviation:VOLUNTEER

title:Volunteer

specialization: [..]

0 {..}

id:3

abbreviation:MSS

title:Middle School (6-8) Science

1 {..}

id:5

abbreviation:MSHG

title:Middle School (6-8) History and Geography

. . .

}

Back to list

user/{API key}/createuser/

Creates a new user in the NAITC system.

Extra Parameters:

Parameter API key
Type (20 character) string
Description This identifier is given to you by a national administrator.
Example https://api.agclassroom.org/api/7374b52ca0fcff775bcd/createuser/b2cb192ac1fdbbb79ad2/
POSTParameter firstname
Type url-encoded string
Description The user's first name (must be longer than 2 characters).
POSTParameter lastname
Type url-encoded string
Description The user's last name (must be longer than 2 characters).
POSTParameter email
Type url-encoded string
Description The user's valid email address. At minimum it must be longer than 7 characters and have an '@' symbol.
POSTParameter password
Type url-encoded string
Description The user's password. All passwords must be longer than 8 characters, have at least one capital letter, one lowercase letter, one number, and one special character.
POSTParameter location
Type number
Description The location identifier that corresponds to the state/province/country that the user resides in.
POSTParameter affiliation[]
Type number(s)
Description An array of affiliations that the teacher is associated with.
POSTParameter specialization[]
Type number(s)
Description An array of specialization areas that the teacher teaches.

HTTP Method

POST

Requires authentication:

Yes

Return Format:

JSON

Return Example:

{

success:true

message:Created new user.

resultcount:1

result: [...]

0 {...}

id:4

title:Food, Health, and Lifecycle

}

Back to list

user/{API key}/editprofile/{user id}/

Edit the user's MyBinder profile in the NAITC system.

Extra Parameters:

Parameter API key
Type (20 character) string
Description This identifier is given to you by a national administrator.
Example https://api.agclassroom.org/api/7374b52ca0fcff775bcd/editprofile/b2cb192ac1fdbbb79ad2/
Parameter user id
Type (20 character) string
Description This identifier is given to you when the user logs in.
Example https://api.agclassroom.org/api/7374b52ca0fcff775bcd/editprofile/b2cb192ac1fdbbb79ad2/
POSTParameter firstname
Type url-encoded string
Description The user's first name (must be longer than 2 characters).
POSTParameter lastname
Type url-encoded string
Description The user's last name (must be longer than 2 characters).
POSTParameter email
Type url-encoded string
Description The user's valid email address. At minimum it must be longer than 7 characters and have an '@' symbol.
POSTParameter password
Type url-encoded string
Description The user's password. All passwords must be longer than 8 characters, have at least one capital letter, one lowercase letter, one number, and one special character.
POSTParameter location
Type number
Description The location identifier that corresponds to the state/province/country that the user resides in.
POSTParameter affiliation[]
Type number(s)
Description An array of affiliations that the teacher is associated with.
POSTParameter specialization[]
Type number(s)
Description An array of specialization areas that the teacher teaches.

HTTP Method

POST

Requires authentication:

Yes

Return Format:

JSON

Return Example:

{

success:true

message:Edited user profile.

resultcount:1

result: [...]

0 {...}

id:7823

username:johndoe+3@gmail.com

name:John Doe

firstname:John

lastname:Doe

email:johndoe+3@gmail.com

joined:December 2, 2017 - 3:46 PM

last_login:July 11, 2019 - 10:34 AM

active:1

location:43

permission_group:4

affiliation: [..]

0 {..}

id:6

abbreviation:VOLUNTEER

title:Volunteer

specialization: [..]

0 {..}

id:3

abbreviation:MSS

title:Middle School (6-8) Science

1 {..}

id:5

abbreviation:MSHG

title:Middle School (6-8) History and Geography

. . .

}

Back to list

user/{API key}/addlesson/

user/{API key}/addlesson/{user_id}/{lesson_id}/

Adds a lesson to the user's MyBinder list.

Extra Parameters:

Parameter API key
Type (20 character) string
Description This identifier is given to you by a national administrator.
Example https://api.agclassroom.org/api/d364b5cfa0a4f780ab45/addlesson/
POSTParameter user_id, user, user_identifier
Type (20 character) string
Description The user's identifier given when logging in.
[Optional syntax] You can also append it to the API function call: GET
/user/{APIkey}/addlesson/{user_id}/{lesson_id}.
POSTParameter lesson_id, lesson, lesson_identifier
Type number
Description The lesson identifier to add to My Binder.
[Optional syntax] You can also append it to the API function call: GET
/user/{APIkey}/addlesson/{user_id}/{lesson_id}.

HTTP Method

POST

Requires authentication:

Yes

Return Format:

JSON

Return Example:

{

success:true

message:Added lesson to My Binder.

resultcount:1

result: [...]   (lessons in My Binder)

0 {...}

id:4

title:Food, Health, and Lifecycle

1 {...}

id:462

title:It's A Moo-stery!

}

Back to list

user/{API key}/deletelesson/

user/{API key}/deletelesson/{user_id}/{lesson_id}/

Deletes a lesson or lessons from the user's MyBinder list.

Extra Parameters:

Parameter API key
Type (20 character) string
Description This identifier is given to you by a national administrator.
Example https://api.agclassroom.org/api/d364b5cfa0a4f780ab45/deletelesson/
POSTParameter user_id, user, user_identifier
Type (20 character) string
Description The user's identifier given when logging in.
[Optional syntax] You can also append it to the API function call: GET
/user/{APIkey}/deletelesson/{user_id}/{lesson_id}.
POSTParameter lesson_id, lesson, lesson_identifier
Type number (or array of numbers)
Description The lesson identifier to add to My Binder.
[Optional syntax] You can also append it to the API function call: GET
/user/{APIkey}/deletelesson/{user_id}/{lesson_id}.

HTTP Method

POST

Requires authentication:

Yes

Return Format:

JSON

Return Example:

{

success:true

message:Deleted lesson from My Binder.

resultcount:1

result: [...]   (lessons still in My Binder)

0 {...}

id:4

title:Food, Health, and Lifecycle

1 {...}

id:462

title:It's A Moo-stery!

}

Back to list

user/{API key}/passwordrequest/

user/{API key}/passwordrequest/{user email}/

Makes a password reset request for a user.

Extra Parameters:

Parameter API key
Type (20 character) string
Description This identifier is given to you by a national administrator.
Example https://api.agclassroom.org/api/d364b5cfa0a4f780ab45/passwordrequest/
POSTParameter email, useremail, user_email, emailaddress, email_address
Type string
Description The user's email tied to their account. This information will need to come from the user through a form.

HTTP Method

POST

Requires authentication:

Yes

Return Format:

JSON

Return Example:

{

success:true

message:Made a reset request.

result: {..}

key:c6f7b1e570ce53163462

expiration:January 25, 2020

name:John Doe

username:johndoe34@yahoo.com

email:johndoe34@yahoo.com

}

Back to list

user/{API key}/validatekey/{key}/

Validate a reset password key.

Extra Parameters:

Parameter API key
Type (20 character) string
Description This identifier is given to you by a national administrator.
Example https://api.agclassroom.org/api/d364b5cfa0a4f780ab45/validatekey/53e80e38488485efecc3/
Parameter key
Type string
Description An alphanumeric key given to you when a user requests a password change.
Example https://api.agclassroom.org/api/d364b5cfa0a4f780ab45/validatekey/53e80e38488485efecc3/

HTTP Method

GET

Requires authentication:

Yes

Return Format:

JSON

Return Example:

{

success:true

message:This key maps onto a user.

}

Back to list

user/{API key}/updatepassword/

Update the user's password.

Extra Parameters:

Parameter API key
Type (20 character) string
Description This identifier is given to you by a national administrator.
Example https://api.agclassroom.org/api/d364b5cfa0a4f780ab45/validatekey/53e80e38488485efecc3/
POSTParameter key, emailkey
Type string
Description An alphanumeric key given to you when a user requests a password change.
POSTParameter password, newpassword
Type string
Description The new password given by the user (through a form).

HTTP Method

POST

Requires authentication:

Yes

Return Format:

JSON

Return Example:

{

success:true

message:The password was updated.

}