編輯

共用方式為


List class modules

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Retrieve a list of module objects. Only teachers, students, and applications with application permissions can perform this operation.

A teacher or an application with application permissions can see all module objects for the class. Students can only see published modules.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) EduCurricula.Read EduCurricula.ReadWrite
Delegated (personal Microsoft account) Not supported. Not supported.
Application EduCurricula.Read.All EduCurricula.ReadWrite.All

HTTP request

GET /education/classes/{id}/modules

Optional query parameters

This method supports the OData Query Parameters to help customize the response.

The available $expand option for this method is: resources.

Request headers

Header Value
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and a collection of educationModule objects in the response body.

Examples

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/education/classes/37d99af7-cfc5-4e3b-8566-f7d40e4a2070/modules

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 200 OK
Content-type: application/json

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('37d99af7-cfc5-4e3b-8566-f7d40e4a2070')/modules",
    "value": [
        {
            "displayName": "Module 1",
            "description": "<div style=\"font-family: inherit; font-size: inherit; color: inherit; background-color: inherit;\">Description for module 1 updated</div>",
            "resourcesFolderUrl": "https://graph.microsoft.com/v1.0/drives/b!-Ik2sRPLDEWy_bR8l75jfeDcpXQcRKVOmcml10NQLQ1F2UVvTgEnTKi0GO59dbCL/items/01VANVJQZUN7H5IXZPURF3DDZKOAEHN6ZW",
            "isPinned": false,
            "status": "draft",
            "createdDateTime": "2023-07-19T22:18:24.0753841Z",
            "lastModifiedDateTime": "2023-07-19T22:38:03.8575605Z",
            "id": "5955f965-99aa-4fba-ad88-e291afeaf81d",
            "createdBy": {
                "application": null,
                "device": null,
                "user": {
                    "id": "cb1a4af3-0aba-4679-aa12-9f99bab0b61a",
                    "displayName": null
                }
            },
            "lastModifiedBy": {
                "application": null,
                "device": null,
                "user": {
                    "id": "cb1a4af3-0aba-4679-aa12-9f99bab0b61a",
                    "displayName": null
                }
            }
        },
        {
            "displayName": "Module 4",
            "description": "<div style=\"font-family: inherit; font-size: inherit; color: inherit; background-color: inherit;\">description for module 4</div>",
            "resourcesFolderUrl": null,
            "isPinned": false,
            "status": "published",
            "createdDateTime": "2023-07-20T17:24:54.6405196Z",
            "lastModifiedDateTime": "2023-07-20T17:32:25.4635665Z",
            "id": "4ae4afc7-af22-45c1-9f11-cee40a60c967",
            "createdBy": {
                "application": null,
                "device": null,
                "user": {
                    "id": "cb1a4af3-0aba-4679-aa12-9f99bab0b61a",
                    "displayName": null
                }
            },
            "lastModifiedBy": {
                "application": null,
                "device": null,
                "user": {
                    "id": "cb1a4af3-0aba-4679-aa12-9f99bab0b61a",
                    "displayName": null
                }
            }
        }
    ]
}