Namespace: microsoft.graph
Wichtig
Die APIs unter der /beta Version in Microsoft Graph können sich ändern. Die Verwendung dieser APIs in Produktionsanwendungen wird nicht unterstützt. Um festzustellen, ob eine API in v1.0 verfügbar ist, verwenden Sie die Version Selektor.
Listet die Ressourcen auf, die einer Übermittlung zugeordnet sind. Nur Lehrkräfte, Kursteilnehmer und Anwendungen mit Anwendungsberechtigungen können diesen Vorgang ausführen.
Das educationSubmissionResource-Objekt ist ein Wrapper um das eigentliche Ressourcenobjekt, an dem der Kursteilnehmer arbeitet. Der Wrapper enthält auch einen Zeiger auf die Ressourcen in der Zuweisung, wenn die Ressource während des Zuweisungsprozesses aus der Zuweisung kopiert wurde. Diese Ressourcen sind die Arbeitskopie der Zuweisung. Die übermittelten Ressourcen sind die Ressourcen, die offiziell zur Bewertung eingereicht wurden.
Diese API ist in den folgenden nationalen Cloudbereitstellungen verfügbar.
| Weltweiter Service |
US Government L4 |
US Government L5 (DOD) |
China, betrieben von 21Vianet |
| ✅ |
❌ |
❌ |
❌ |
Berechtigungen
Wählen Sie die Berechtigungen aus, die für diese API als am wenigsten privilegiert markiert sind. Verwenden Sie eine höhere Berechtigung oder Berechtigungen nur, wenn Ihre App dies erfordert. Ausführliche Informationen zu delegierten Berechtigungen und Anwendungsberechtigungen finden Sie unter Berechtigungstypen. Weitere Informationen zu diesen Berechtigungen finden Sie in der Berechtigungsreferenz.
| Berechtigungstyp |
Berechtigungen mit den geringsten Berechtigungen |
Berechtigungen mit höheren Berechtigungen |
| Delegiert (Geschäfts-, Schul- oder Unikonto) |
EduAssignments.ReadBasic |
EduAssignments.Read, EduAssignments.ReadWrite, EduAssignments.ReadWriteBasic |
| Delegiert (persönliches Microsoft-Konto) |
Nicht unterstützt |
Nicht unterstützt |
| Application |
EduAssignments.ReadBasic.All |
EduAssignments.Read.All, EduAssignments.ReadWrite.All, EduAssignments.ReadWriteBasic.All |
HTTP-Anforderung
GET /education/classes/{id}/assignments/{id}/submissions/{id}/resources
Optionale Abfrageparameter
Diese Methode unterstützt die $topOData-Abfrageparameter , $filter, $orderbyund $select zum Anpassen der Antwort. Allgemeine Informationen finden Sie unter OData-Abfrageparameter.
Alle Eigenschaften werden für die Abfrageparameter $filter und $orderbyunterstützt.
Anforderungstext
Geben Sie keinen Anforderungstext für diese Methode an.
Antwort
Bei erfolgreicher Ausführung gibt die Methode einen 200 OK Antwortcode und eine Auflistung von educationSubmissionResource-Objekten im Antworttext zurück.
Beispiel
Beispiel 1: Abrufen aller Ressourcen
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
GET https://graph.microsoft.com/beta/education/classes/{id}/assignments/{id}/submissions/{id}/resources
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Resources.GetAsync();
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
//other-imports
)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
resources, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().ByEducationAssignmentId("educationAssignment-id").Submissions().ByEducationSubmissionId("educationSubmission-id").Resources().Get(context.Background(), nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationSubmissionResourceCollectionResponse result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignments().byEducationAssignmentId("{educationAssignment-id}").submissions().byEducationSubmissionId("{educationSubmission-id}").resources().get();
const options = {
authProvider,
};
const client = Client.init(options);
let resources = await client.api('/education/classes/{id}/assignments/{id}/submissions/{id}/resources')
.version('beta')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->byEducationAssignmentId('educationAssignment-id')->submissions()->byEducationSubmissionId('educationSubmission-id')->resources()->get()->wait();
Import-Module Microsoft.Graph.Beta.Education
Get-MgBetaEducationClassAssignmentSubmissionResource -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.by_education_assignment_id('educationAssignment-id').submissions.by_education_submission_id('educationSubmission-id').resources.get()
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"assignmentResourceUrl": "https://graph.microsoft.com/beta/drives/b!8-QjN2tsv0WyGnTv7vOvnQkmGHbbeMNLqYKONmHLVnvCVmBYIGpeT456457AdW9f/items/017NJZI25NOB5XZNLABF7646XAMDZTQQ6T",
"id": "f2387c3b-ec39-4bf2-a399-d7242677f024",
"resource": {
"@odata.type": "#microsoft.graph.educationLinkResource",
"displayName": "Microsoft Homepage",
"createdDateTime": "2017-10-21T07:52:45.5675913Z",
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "63cc91d2-59c7-4732-9594-35b91a26b340",
"displayName": null
}
},
"lastModifiedDateTime": "2017-10-21T07:52:45.5675913Z",
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "63cc91d2-59c7-4732-9594-35b91a26b340",
"displayName": null
}
},
"link": "https://www.microsoft.com"
}
}
]
}
Beispiel 2: Verwenden von $filter zum Abrufen von Ressourcen
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
GET https://graph.microsoft.com/beta/education/classes/2003c52e-807a-4186-9b49-60c573095461/assignments/8f5311bb-ee1e-4bf0-9827-3fd8c57bdde2/submissions/57ef8ee2-4755-4351-66d0-8e37192870a5/resources?$filter= id eq 'c4682401-6866-4962-94d9-7499782a13e9'
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Resources.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Filter = " id eq 'c4682401-6866-4962-94d9-7499782a13e9'";
});
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
grapheducation "github.com/microsoftgraph/msgraph-beta-sdk-go/education"
//other-imports
)
requestFilter := " id eq 'c4682401-6866-4962-94d9-7499782a13e9'"
requestParameters := &grapheducation.ClassesItemAssignmentsItemSubmissionsItemResourcesRequestBuilderGetQueryParameters{
Filter: &requestFilter,
}
configuration := &grapheducation.ClassesItemAssignmentsItemSubmissionsItemResourcesRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
resources, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().ByEducationAssignmentId("educationAssignment-id").Submissions().ByEducationSubmissionId("educationSubmission-id").Resources().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationSubmissionResourceCollectionResponse result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignments().byEducationAssignmentId("{educationAssignment-id}").submissions().byEducationSubmissionId("{educationSubmission-id}").resources().get(requestConfiguration -> {
requestConfiguration.queryParameters.filter = " id eq 'c4682401-6866-4962-94d9-7499782a13e9'";
});
const options = {
authProvider,
};
const client = Client.init(options);
let resources = await client.api('/education/classes/2003c52e-807a-4186-9b49-60c573095461/assignments/8f5311bb-ee1e-4bf0-9827-3fd8c57bdde2/submissions/57ef8ee2-4755-4351-66d0-8e37192870a5/resources')
.version('beta')
.filter(' id eq \'c4682401-6866-4962-94d9-7499782a13e9\'')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Education\Classes\Item\Assignments\Item\Submissions\Item\Resources\ResourcesRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new ResourcesRequestBuilderGetRequestConfiguration();
$queryParameters = ResourcesRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->filter = " id eq 'c4682401-6866-4962-94d9-7499782a13e9'";
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->byEducationAssignmentId('educationAssignment-id')->submissions()->byEducationSubmissionId('educationSubmission-id')->resources()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Education
Get-MgBetaEducationClassAssignmentSubmissionResource -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId -Filter " id eq 'c4682401-6866-4962-94d9-7499782a13e9'"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.education.classes.item.assignments.item.submissions.item.resources.resources_request_builder import ResourcesRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = ResourcesRequestBuilder.ResourcesRequestBuilderGetQueryParameters(
filter = " id eq 'c4682401-6866-4962-94d9-7499782a13e9'",
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.by_education_assignment_id('educationAssignment-id').submissions.by_education_submission_id('educationSubmission-id').resources.get(request_configuration = request_configuration)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('2003c52e-807a-4186-9b49-60c573095461')/assignments('8f5311bb-ee1e-4bf0-9827-3fd8c57bdde2')/submissions('57ef8ee2-4755-4351-66d0-8e37192870a5')/resources",
"value": [
{
"assignmentResourceUrl": "https://assignments.onenote.com/api/beta/edu/classes/2003c52e-807a-4186-9b49-60c573095461/assignments/8f5311bb-ee1e-4bf0-9827-3fd8c57bdde2/resources/781c546e-380d-4506-b093-97deca996bca",
"id": "c4682401-6866-4962-94d9-7499782a13e9",
"resource": {
"@odata.type": "#microsoft.graph.educationWordResource",
"displayName": "Document1",
"createdDateTime": "2022-07-28T22:10:23.713329Z",
"lastModifiedDateTime": "2022-07-28T22:10:23.7133476Z",
"fileUrl": "https://graph.microsoft.com/beta/drives/b!IDwAYNkmlUucm64fxXxnzYYTuh2luKRDvUVGQBLOmvYqism21WrdQ4Aijx5lDIKE/items/0173CEVEIK3DYCBRKZLZEYKAGP73TAVKM2",
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
}
}
}
]
}
Beispiel 3: Verwenden von $orderby zum Abrufen von Ressourcen
Anforderung
Das folgende Beispiel zeigt eine Anfrage.
GET https://graph.microsoft.com/beta/education/classes/2003c52e-807a-4186-9b49-60c573095461/assignments/131eeaaa-829e-4c6c-9cf3-491b1320fe4d/submissions/603e719d-4bcd-7b78-be60-1194b3921b50/resources?$orderby=resource/createdDateTime
// Code snippets are only available for the latest version. Current version is 5.x
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Education.Classes["{educationClass-id}"].Assignments["{educationAssignment-id}"].Submissions["{educationSubmission-id}"].Resources.GetAsync((requestConfiguration) =>
{
requestConfiguration.QueryParameters.Orderby = new string []{ "resource/createdDateTime" };
});
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
grapheducation "github.com/microsoftgraph/msgraph-beta-sdk-go/education"
//other-imports
)
requestParameters := &grapheducation.ClassesItemAssignmentsItemSubmissionsItemResourcesRequestBuilderGetQueryParameters{
Orderby: [] string {"resource/createdDateTime"},
}
configuration := &grapheducation.ClassesItemAssignmentsItemSubmissionsItemResourcesRequestBuilderGetRequestConfiguration{
QueryParameters: requestParameters,
}
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
resources, err := graphClient.Education().Classes().ByEducationClassId("educationClass-id").Assignments().ByEducationAssignmentId("educationAssignment-id").Submissions().ByEducationSubmissionId("educationSubmission-id").Resources().Get(context.Background(), configuration)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
EducationSubmissionResourceCollectionResponse result = graphClient.education().classes().byEducationClassId("{educationClass-id}").assignments().byEducationAssignmentId("{educationAssignment-id}").submissions().byEducationSubmissionId("{educationSubmission-id}").resources().get(requestConfiguration -> {
requestConfiguration.queryParameters.orderby = new String []{"resource/createdDateTime"};
});
const options = {
authProvider,
};
const client = Client.init(options);
let resources = await client.api('/education/classes/2003c52e-807a-4186-9b49-60c573095461/assignments/131eeaaa-829e-4c6c-9cf3-491b1320fe4d/submissions/603e719d-4bcd-7b78-be60-1194b3921b50/resources')
.version('beta')
.orderby('resource/createdDateTime')
.get();
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Education\Classes\Item\Assignments\Item\Submissions\Item\Resources\ResourcesRequestBuilderGetRequestConfiguration;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestConfiguration = new ResourcesRequestBuilderGetRequestConfiguration();
$queryParameters = ResourcesRequestBuilderGetRequestConfiguration::createQueryParameters();
$queryParameters->orderby = ["resource/createdDateTime"];
$requestConfiguration->queryParameters = $queryParameters;
$result = $graphServiceClient->education()->classes()->byEducationClassId('educationClass-id')->assignments()->byEducationAssignmentId('educationAssignment-id')->submissions()->byEducationSubmissionId('educationSubmission-id')->resources()->get($requestConfiguration)->wait();
Import-Module Microsoft.Graph.Beta.Education
Get-MgBetaEducationClassAssignmentSubmissionResource -EducationClassId $educationClassId -EducationAssignmentId $educationAssignmentId -EducationSubmissionId $educationSubmissionId -Sort "resource/createdDateTime"
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.education.classes.item.assignments.item.submissions.item.resources.resources_request_builder import ResourcesRequestBuilder
from kiota_abstractions.base_request_configuration import RequestConfiguration
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
query_params = ResourcesRequestBuilder.ResourcesRequestBuilderGetQueryParameters(
orderby = ["resource/createdDateTime"],
)
request_configuration = RequestConfiguration(
query_parameters = query_params,
)
result = await graph_client.education.classes.by_education_class_id('educationClass-id').assignments.by_education_assignment_id('educationAssignment-id').submissions.by_education_submission_id('educationSubmission-id').resources.get(request_configuration = request_configuration)
Antwort
Das folgende Beispiel zeigt die Antwort.
Hinweis: Das hier gezeigte Antwortobjekt kann zur besseren Lesbarkeit gekürzt werden.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#education/classes('2003c52e-807a-4186-9b49-60c573095461')/assignments('131eeaaa-829e-4c6c-9cf3-491b1320fe4d')/submissions('603e719d-4bcd-7b78-be60-1194b3921b50')/resources",
"@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET education/classes('<2003c52e-807a-4186-9b49-60c573095461>')/assignments('<131eeaaa-829e-4c6c-9cf3-491b1320fe4d>')/submissions('<603e719d-4bcd-7b78-be60-1194b3921b50>')/resources?$select=assignmentResourceUrl,resource",
"value": [
{
"assignmentResourceUrl": null,
"id": "8d3829c0-cf39-4e7e-b193-229ed0da2e5a",
"resource": {
"@odata.type": "#microsoft.graph.educationLinkResource",
"displayName": "https://efwrr",
"createdDateTime": "2023-09-07T15:46:13.9731771Z",
"lastModifiedDateTime": "2023-09-07T15:46:13.973187Z",
"link": "https://efwrr",
"createdBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
},
"lastModifiedBy": {
"application": null,
"device": null,
"user": {
"id": "fffafb29-e8bc-4de3-8106-be76ed2ad499",
"displayName": null
}
}
}
}
]
}