Partager via


Obtenir educationModuleResource

Espace de noms: microsoft.graph

Importante

Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .

Obtient les propriétés d’une ressource associée à un module. Seuls les enseignants, les étudiants et les applications disposant d’autorisations d’application peuvent effectuer cette opération.

Cette API est disponible dans les déploiements de cloud national suivants.

Service global Gouvernement des États-Unis L4 Us Government L5 (DOD) Chine gérée par 21Vianet

Autorisations

Choisissez l’autorisation ou les autorisations marquées comme moins privilégiées pour cette API. Utilisez une autorisation ou des autorisations privilégiées plus élevées uniquement si votre application en a besoin. Pour plus d’informations sur les autorisations déléguées et d’application, consultez Types d’autorisations. Pour en savoir plus sur ces autorisations, consultez les informations de référence sur les autorisations.

Type d’autorisation Autorisations avec privilèges minimum Autorisations privilégiées plus élevées
Déléguée (compte professionnel ou scolaire) EduCurricula.Read EduCurricula.ReadWrite
Déléguée (compte Microsoft personnel) Non prise en charge. Non prise en charge.
Application EduCurricula.Read.All EduCurricula.ReadWrite.All

Requête HTTP

GET /education/classes/{class-id}/modules/{module-id}/resources/{resource-id}

Paramètres facultatifs de la requête

Cette méthode prend en charge le $select paramètre de requête OData pour vous aider à personnaliser la réponse. Pour des informations générales, consultez paramètres de la requête OData.

En-têtes de demande

En-tête Valeur
Autorisation Porteur {token}. Obligatoire. En savoir plus sur l’authentification et l’autorisation.

Corps de la demande

N’indiquez pas le corps de la demande pour cette méthode.

Réponse

Si elle réussit, cette méthode renvoie un 200 OK code de réponse et un objet educationModuleResource dans le corps de la réponse.

Exemples

Exemple 1 : Obtenir un educationWordResource

Demande

L’exemple suivant illustre une demande.

GET https://graph.microsoft.com/beta/education/classes/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/modules/72a3879f-af73-4179-8a0e-4cb29c0fa369/resources/3b0198d2-590b-497f-ada6-35e2ba841879

Réponse

L’exemple suivant illustre la réponse.

Remarque : l’objet de réponse affiché ci-après peut être raccourci pour plus de lisibilité.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('cff47bf3-791b-4b0a-ad6b-92fa66917cc7')/modules('72a3879f-af73-4179-8a0e-4cb29c0fa369')/resources/$entity",
    "id": "3b0198d2-590b-497f-ada6-35e2ba841879",
    "resource": {
        "@odata.type": "#microsoft.graph.educationWordResource",
        "displayName": "test_2023-07-25T22_02_34_134Z.docx",
        "createdDateTime": "2023-07-24T22:02:37.3803976Z",
        "lastModifiedDateTime": "2023-07-24T22:02:37.3804005Z",
        "fileUrl": "https://graph.microsoft.com/v1.0/drives/b!G2qSPDsXR0y4Bb2vODednawfynEIaD1OvPVeH4wbOp_3GV_mcV9MRLur9XlH200N/items/01IVG3LZKVUHVKYNV6RBEK3LBYR2VLXOEM",
        "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
            }
        }
    }
}
    

Exemple 2 : Obtenir un educationLinkResource

Demande

L’exemple suivant illustre une demande.

GET https://graph.microsoft.com/beta/education/classes/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/modules/72a3879f-af73-4179-8a0e-4cb29c0fa369/resources/5958ce41-9b9d-4e60-b8a6-5a4e7c41045c

Réponse

L’exemple suivant illustre la réponse.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('cff47bf3-791b-4b0a-ad6b-92fa66917cc7')/modules('72a3879f-af73-4179-8a0e-4cb29c0fa369')/resources/$entity",
    "id": "5958ce41-9b9d-4e60-b8a6-5a4e7c41045c",
    "resource": {
        "@odata.type": "#microsoft.graph.educationLinkResource",
        "displayName": "2023-07-25T22_02_13_541Z",
        "createdDateTime": "2023-07-24T22:02:16.067095Z",
        "lastModifiedDateTime": "2023-07-24T22:02:16.0670968Z",
        "link": "https://www.bing.com",
        "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
            }
        }
    }
}

Exemple 3 : Obtenir un educationExcelResource

Demande

L’exemple suivant illustre une demande.

GET https://graph.microsoft.com/beta/education/classes/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/modules/72a3879f-af73-4179-8a0e-4cb29c0fa369/resources/7a1c6461-2a2e-43b9-b8b4-bea316b7802b

Réponse

L’exemple suivant illustre la réponse.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('cff47bf3-791b-4b0a-ad6b-92fa66917cc7')/modules('72a3879f-af73-4179-8a0e-4cb29c0fa369')/resources/$entity",
    "id": "7a1c6461-2a2e-43b9-b8b4-bea316b7802b",
    "resource": {
        "@odata.type": "#microsoft.graph.educationExcelResource",
        "displayName": "test_2023-07-25T22_02_36_665Z.xlsx",
        "createdDateTime": "2023-07-24T22:02:39.7182968Z",
        "lastModifiedDateTime": "2023-07-24T22:02:39.7182995Z",
        "fileUrl": "https://graph.microsoft.com/v1.0/drives/b!G2qSPDsXR0y4Bb2vODednawfynEIaD1OvPVeH4wbOp_3GV_mcV9MRLur9XlH200N/items/01IVG3LZNHXFDGXMLE5VB3DUFKI5NKTDHS",
        "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
            }
        }
    }
}

Exemple 4 : Obtenir un educationPowerPointResource

Demande

L’exemple suivant illustre une demande.

GET https://graph.microsoft.com/beta/education/classes/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/modules/72a3879f-af73-4179-8a0e-4cb29c0fa369/resources/18e00c9f-0292-4a5b-be67-47edebe676a2

Réponse

L’exemple suivant illustre la réponse.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('cff47bf3-791b-4b0a-ad6b-92fa66917cc7')/modules('72a3879f-af73-4179-8a0e-4cb29c0fa369')/resources/$entity",
    "id": "18e00c9f-0292-4a5b-be67-47edebe676a2",
    "resource": {
        "@odata.type": "#microsoft.graph.educationPowerPointResource",
        "displayName": "PptTest_2023-07-25T22_02_37_776Z.pptx",
        "createdDateTime": "2023-07-24T22:02:41.1120038Z",
        "lastModifiedDateTime": "2023-07-24T22:02:41.1120064Z",
        "fileUrl": "https://graph.microsoft.com/v1.0/drives/b!G2qSPDsXR0y4Bb2vODednawfynEIaD1OvPVeH4wbOp_3GV_mcV9MRLur9XlH200N/items/01IVG3LZNMSPWWUYRRXVGIMDFREOBVH52L",
        "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
            }
        }
    }
}

Exemple 5 : Obtenir un educationFileResource

Demande

L’exemple suivant illustre une demande.

GET https://graph.microsoft.com/beta/education/classes/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/modules/72a3879f-af73-4179-8a0e-4cb29c0fa369/resources/f5d4ac54-10ae-48f1-9e8b-6e961f490652

Réponse

L’exemple suivant illustre la réponse.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('cff47bf3-791b-4b0a-ad6b-92fa66917cc7')/modules('72a3879f-af73-4179-8a0e-4cb29c0fa369')/resources/$entity",
    "id": "f5d4ac54-10ae-48f1-9e8b-6e961f490652",
    "resource": {
        "@odata.type": "#microsoft.graph.educationFileResource",
        "displayName": "test_2023-07-25T22_02_35_445Z.csv",
        "createdDateTime": "2023-07-24T22:02:38.6052639Z",
        "lastModifiedDateTime": "2023-07-24T22:02:38.6052675Z",
        "fileUrl": "https://graph.microsoft.com/v1.0/drives/b!G2qSPDsXR0y4Bb2vODednawfynEIaD1OvPVeH4wbOp_3GV_mcV9MRLur9XlH200N/items/01IVG3LZKHCVZECOHRIJDINECGB5LHPCJU",
        "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
            }
        }
    }
}

Exemple 6 : Obtenir une ressource educationMediaResource

Demande

L’exemple suivant illustre une demande.

GET https://graph.microsoft.com/beta/education/classes/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/modules/72a3879f-af73-4179-8a0e-4cb29c0fa369/resources/2bca0c1d-0bc6-4783-9451-1ba29b73421e

Réponse

L’exemple suivant illustre la réponse.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('cff47bf3-791b-4b0a-ad6b-92fa66917cc7')/modules('72a3879f-af73-4179-8a0e-4cb29c0fa369')/resources/$entity",
    "id": "2bca0c1d-0bc6-4783-9451-1ba29b73421e",
    "resource": {
        "@odata.type": "#microsoft.graph.educationMediaResource",
        "displayName": "MediaResource_2023-07-25T22_02_39_107Z.PNG",
        "createdDateTime": "2023-07-24T22:02:41.9950633Z",
        "lastModifiedDateTime": "2023-07-24T22:02:41.995065Z",
        "fileUrl": "https://graph.microsoft.com/v1.0/drives/b!G2qSPDsXR0y4Bb2vODednawfynEIaD1OvPVeH4wbOp_3GV_mcV9MRLur9XlH200N/items/01IVG3LZOYDB2FBK6DONA37DJ2VP6DNU4P",
        "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
            }
        }
    }
}

Exemple 7 : Obtenir une ressource educationChannelResource

Demande

L’exemple suivant illustre une demande.

GET https://graph.microsoft.com/beta/education/classes/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/modules/72a3879f-af73-4179-8a0e-4cb29c0fa369/resources/e123d8c6-29cd-4855-b1b6-9c6475290b1b

Réponse

L’exemple suivant illustre la réponse.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('cff47bf3-791b-4b0a-ad6b-92fa66917cc7')/modules('72a3879f-af73-4179-8a0e-4cb29c0fa369')/resources/$entity",
    "id": "e123d8c6-29cd-4855-b1b6-9c6475290b1b",
    "resource": {
        "@odata.type": "#microsoft.graph.educationChannelResource",
        "displayName": "General",
        "createdDateTime": "2023-07-24T22:02:44.2287362Z",
        "lastModifiedDateTime": "2023-07-24T22:02:44.2287383Z",
        "url": "https://graph.microsoft.com/v1.0/teams/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/channels/19:ad85e4c2f99f4df491971b12c40284a8@thread.tacv2",
        "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
            }
        }
    }
}

Exemple 8 : Obtenir un educationLinkedAssignmentResource

Demande

L’exemple suivant illustre une demande.

GET https://graph.microsoft.com/beta/education/classes/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/modules/72a3879f-af73-4179-8a0e-4cb29c0fa369/resources/c7a52867-11e9-4fb3-ae81-ce7d1fe0fd55

Réponse

L’exemple suivant illustre la réponse.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('cff47bf3-791b-4b0a-ad6b-92fa66917cc7')/modules('72a3879f-af73-4179-8a0e-4cb29c0fa369')/resources/$entity",
    "id": "c7a52867-11e9-4fb3-ae81-ce7d1fe0fd55",
    "resource": {
        "@odata.type": "#microsoft.graph.educationLinkedAssignmentResource",
        "displayName": "2023-07-25T22_02_31_674Z",
        "createdDateTime": "2023-07-24T22:02:34.3183458Z",
        "lastModifiedDateTime": "2023-07-24T22:02:34.3183472Z",
        "url": "https://graph.microsoft.com/beta/education/classes/cff47bf3-791b-4b0a-ad6b-92fa66917cc7/assignments/5f54e105-606b-49e0-868d-39fd32db4c61/",
        "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
            }
        }
    }
}