我可以通过调用获取用户列表,通过调用获取/education/users
类列表/education/classes
;但是有没有办法让包含外键的类?
到目前为止,我发现这样做的唯一方法是使用/education/users/{id}/classes
,但我不想为每个用户都调用它。
上述端点返回的示例:
/education/users
:
{
"surname"=>"Wyatt",
"usageLocation"=>"CA",
"userPrincipalName"=>"DWyatt@fairviewss.onmicrosoft.com",
"userType"=>"Member",
"middleName"=>"Robert",
"externalSource"=>"sis",
"primaryRole"=>"teacher",
"teacher"=>{
"teacherNumber"=>"105",
"externalId"=>"14005"
}
}
education/classes
:
{
"id"=>"6981f588-c561-4156-8eb9-d733360e3d76",
"description"=>"Super science",
"displayName"=>"Science",
"mailNickname"=>"Science"
},
{
"id"=>"788ee4cd-82a4-4c39-a9e5-0ce6c1877a09",
"description"=>"Math",
"displayName"=>"Math",
"mailNickname"=>"Math"
},
{
"id"=>"9c4af1e4-98eb-4cb0-9288-95b5defe4579",
"description"=>nil,
"displayName"=>"Science - Biology 1",
"mailNickname"=>"Section_11018",
"classCode"=>"11018",
"externalName"=>"Science - Biology 1",
"externalId"=>"11018",
"externalSource"=>"sis",
"term"=>{
"externalId"=>"12000",
"startDate"=>"2017-07-01",
"endDate"=>"2018-06-30",
"displayName"=>"SY1516"
}
}
我确定我做错了什么,我只是不确定是什么。