User

Users are usually created within the learn endpoint. The User service enables you to access the User entities directly.

Note: to access any learning-related information on a User, please use the Learner service. The Users service just manages basic creation and deleting of users.

The User object

Property

Description

guid

Internal Adaptemy id of the user

homepage

The URI of the identity provider

name

The user's unique identifier at this identity provider.

role

One of {student, teacher}. Learning is only modelled where role = student.

isenabled

true/false

registeredOn

Datetime of user creation on the Adaptemy system

deletedOn

Datetime of user deletion on the Adaptemy system

Note: the role of the User is the default role for this user. Within any classgroup, a User can take a role that differs from their default role e.g. a teacher can also join another classgroup as a student.

Sample User object

[
    {
        "account": {
            "homepage": "https://buildup.ie",
            "name": "1234adb6-a90b-4ae2-9ea3-28f5577848d9"
        }
    }
]

Users

GET https://api.adaptemy.io/users

Get the list of all users in your organisation, or any single user that matches the filter criteria specified.

Query Parameters

Name
Type
Description

guid

string

Internal Adaptemy guid for this user

account

string

The URI (namespace/ID) of the user

{
    "guid": "fc2ffc69-7ac7-43b5-8997-d0005e944015",
    "account": {
        "homepage": "https://buildup.ie",
        "name": "f28cadb6-a90b-4ae2-9ea3-28f5577848d9"
    },
    "registeredOn": "2021-01-29T10:34:44.678Z",
    "isEnabled": true
}

Users

POST https://api.adaptemy.io/users

Create or update a user or or list of users.

Request Body

Name
Type
Description

user object

object

An array of valid User objects. See above.

[
  {
    "guid": "29f93ae8-bfc9-41cc-b06f-ea9ac38ce62e",
    "homepage": "https://adaptemy.io",
    "name": "f28cadb6-a90b-4ae2-9ea3-28f55778484c",
    "registeredOn": "2021-01-21T13:39:41.577Z"
  }
]

Users

DELETE https://api.adaptemy.io/users

Deletes the User record. Note that any historic learning data is retained (as it was used to train the models) but this user's account is de-activated. All modelling of the learner will stop, and this account can no longer be accessed. Any new /learn events on this account will not succeed.

Query Parameters

Name
Type
Description

guid

string

Internal Adaptemy ID of this user

account

string

The URI (namespace/ID) of the user.

The Classgroup object

Classgroups are collections of users, both teachers and students, that are taking a course(s) together as a group. It is the core entity for group analytics and reporting.

In K-12 settings, a classgroup usually corresponds to the group of approx 25 students and their teacher, taking a course for a year. If, however, a teacher has a class of students taking different course (perhaps two levels age-groups or exam-levels), it may be the case that the 25 students are split between 2 classgroups. For Adaptemy, it is the unit of peer analysis rather than the physical grouping.

A classgroup can have multiple teachers, and a teacher or student can be in multiple classgroups.

If a classgroup definition can include users that have not yet been registered with Adaptemy: in this case they will be created as part of the classgroup call. This can be a more efficient alternative to using the POST Users call.

Property

Description

id

Client's classgroup identifier

students

Array of user objects with role of student in this classgroup.

teachers

Array of user objects with role of teacher in this classgroup

extensions

An custom configured properties of the classgroup.

Sample Classgroups object

[
    {
        "id": "https://client.com/classgroups/c0f52b70-ead6-4064-b944-fd6c07d1f627",
        "students": [
            {
                "account": {
                    "homepage": "https://client.com",
                    "name": "7c055012-fe32-49ed-a668-21d7914ba334"
                }
            },
            {
                "account": {
                    "homepage": "https://client.com",
                    "name": "65255c3a-737d-4718-ad82-88ef841358ea"
                }
            }
        ],
        "teachers": [
            {
                "account": {
                    "homepage": "https://client.com",
                    "name": "6d2035ab-63e0-4748-963f-3053f2bde4e6"
                }
            }
        ],
        "extensions": {
            "https://client.com/classgroups/year": 1
        }
    }
]

Classgroups

GET https://api.adaptemy.io/classgroups

Returns all classgroups in your organisation, or filtered by any query parameters.

Query Parameters

Name
Type
Description

id

string

Classgroup id

[
    {
        "guid": "32d351ab-b1fa-4484-9cc7-44a6b2a0718a",
        "id": "https://client.com/classgroups/c0f52b70-ead6-4064-b944-fd6c07d1f630",
        "students": [
            {
                "account": {
                    "homepage": "https://test.adaptemy.io",
                    "name": "549f431a-3ff8-aabb-b02d-000000000007"
                }
            },
            {
                "account": {
                    "homepage": "https://test.adaptemy.io",
                    "name": "549f431a-3ff8-aabb-b02d-000000000026"
                }
            }
        ],
        "teachers": [
            {
                "account": {
                    "homepage": "https://test.adaptemy.io",
                    "name": "549f431a-3ff8-aabb-b02d-000000000006"
                }
            }
        ],
        "createdOn": "2021-03-10T10:14:28.251Z"
    }
]

Classgroups

POST https://api.adaptemy.io/classgroups

Create or update an array of classgroups. If the classgroup ID does not exist, a new classgroup is created. If the classgroup ID exists, the classgroup is overwritten with the new data; so can include removing students/teachers from the classgroup.

Request Body

Name
Type
Description

Array of classgroup objects

array

See definition above.

The following endpoints also allow students and teachers to be added/removed from existing classgroups:

  • POST /classgroups/students

  • DELETE /classgroups/students

  • POST /classgroups/teachers

  • DELETE /classgroups/teachers

Last updated