Skip to content

Commit 1400f6e

Browse files
authored
Merge pull request #230356 from vinnieangel/eduapiupdate
updated api documentation
2 parents a68c6e2 + 8f6b648 commit 1400f6e

File tree

4 files changed

+145
-116
lines changed

4 files changed

+145
-116
lines changed
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
title: Add a student to a lab in Azure Education Hub through REST APIs
3+
description: Learn how to add students to labs in Azure Education Hub through REST APIs
4+
author: vinnieangel
5+
ms.author: vangellotti
6+
ms.service: azure-education
7+
ms.topic: how-to
8+
ms.date: 03/11/2023
9+
ms.custom: template-how-to
10+
---
11+
12+
# Add students to a lab in Education Hub using REST APIs
13+
14+
This article walks through how to add students to a lab.
15+
16+
## Prerequisites
17+
18+
- Know billing account ID, Billing profile ID, and Invoice Section ID
19+
- Have an Edu approved Azure account
20+
- Have already created a lab in Education Hub
21+
22+
## Add students to the lab
23+
24+
After a lab has been created, call the add students endpoint and make sure to replace the sections that are surrounded by <>.
25+
The invoice section ID must be the same invoice section ID of the lab you want to add this student to.
26+
27+
28+
```json
29+
PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<BillingAccountID>/billingProfiles/<BillingProfileID>/invoiceSections/<InvoiceSectionID>/providers/Microsoft.Education/labs/default/students/<StudentID>?api-version=2021-12-01-preview
30+
```
31+
32+
Call the API with a body similar to the following. Change the body to include details of the student you want to add to the lab.
33+
34+
```json
35+
{
36+
"properties": {
37+
"firstName": "string",
38+
"lastName": "string",
39+
"email": "string",
40+
"role": "Student",
41+
"budget": {
42+
"currency": "string",
43+
"value": 0
44+
},
45+
"expirationDate": "2021-12-21T23:01:41.943Z",
46+
"subscriptionAlias": "string",
47+
"subscriptionInviteLastSentDate": "string"
48+
}
49+
}
50+
```
51+
52+
The API response returns details of the newly added student.
53+
54+
```json
55+
{
56+
"id": "string",
57+
"name": "string",
58+
"type": "string",
59+
"systemData": {
60+
"createdBy": "string",
61+
"createdByType": "User",
62+
"createdAt": "2021-12-21T23:02:20.163Z",
63+
"lastModifiedBy": "string",
64+
"lastModifiedByType": "User",
65+
"lastModifiedAt": "2021-12-21T23:02:20.163Z"
66+
},
67+
"properties": {
68+
"firstName": "string",
69+
"lastName": "string",
70+
"email": "string",
71+
"role": "Student",
72+
"budget": {
73+
"currency": "string",
74+
"value": 0
75+
},
76+
"subscriptionId": "string",
77+
"expirationDate": "2021-12-21T23:02:20.163Z",
78+
"status": "Active",
79+
"effectiveDate": "2021-12-21T23:02:20.163Z",
80+
"subscriptionAlias": "string",
81+
"subscriptionInviteLastSentDate": "string"
82+
}
83+
}
84+
```
85+
86+
## Check the details of the students in a lab
87+
88+
Calling this API allows you to see all of the students that are in the specified lab.
89+
90+
```json
91+
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<BillingAccountID/billingProfiles/<BillingProfileID>/invoiceSections/<InvoiceSectionID>/providers/Microsoft.Education/labs/default/students?includeDeleted=true&api-version=2021-12-01-preview
92+
```
93+
94+
The API response includes information about the students in the lab.
95+
96+
```json
97+
{
98+
"value": [
99+
{
100+
"id": "string",
101+
"name": "string",
102+
"type": "string",
103+
"systemData": {
104+
"createdBy": "string",
105+
"createdByType": "User",
106+
"createdAt": "2021-12-21T23:15:45.430Z",
107+
"lastModifiedBy": "string",
108+
"lastModifiedByType": "User",
109+
"lastModifiedAt": "2021-12-21T23:15:45.430Z"
110+
},
111+
"properties": {
112+
"firstName": "string",
113+
"lastName": "string",
114+
"email": "string",
115+
"role": "Student",
116+
"budget": {
117+
"currency": "string",
118+
"value": 0
119+
},
120+
"subscriptionId": "string",
121+
"expirationDate": "2021-12-21T23:15:45.430Z",
122+
"status": "Active",
123+
"effectiveDate": "2021-12-21T23:15:45.430Z",
124+
"subscriptionAlias": "string",
125+
"subscriptionInviteLastSentDate": "string"
126+
}
127+
}
128+
],
129+
"nextLink": "string"
130+
}
131+
```
132+
133+
## Next steps
134+
- [Manage your Academic Grant using the Overview page](hub-overview-page.md)
135+
136+
- [Support options](educator-service-desk.md)

articles/education-hub/create-lab-education-hub.md

Lines changed: 5 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ author: vinnieangel
55
ms.author: vangellotti
66
ms.service: azure-education
77
ms.topic: how-to
8-
ms.date: 12/21/2021
8+
ms.date: 03/11/2023
99
ms.custom: template-how-to
1010
---
1111

1212
# Create a lab in Azure Education Hub through REST APIs.
1313

14-
This article will walk you through how to create a lab, add students to that lab and verify that the lab has been created.
14+
This article walks you through how to create a lab and verify that the lab has been created.
1515

1616
## Prerequisites
1717

@@ -24,7 +24,7 @@ This article will walk you through how to create a lab, add students to that lab
2424
PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<BillingAccountID>/billingProfiles/<BillingProfileID>/invoiceSections/<InvoiceSectionID>/providers/Microsoft.Education/labs/default?api-version=2021-12-01-preview
2525
```
2626

27-
Call the above API with the body similar to the one below. Include your details for what the display name will be and how much budget you will allocate for this lab.
27+
Call the create lab API with the body similar to the following. Include your details for the display name and how much budget you allocate for this lab.
2828

2929
```json
3030
{
@@ -87,79 +87,15 @@ The API response returns details of the newly created lab. Congratulations, you
8787
}
8888
```
8989

90-
## Add students to the lab
91-
92-
Now that the lab has been successfully created, you can begin to add students to the lab.
93-
94-
Call the endpoint below and make sure to replace the sections that are surrounded by <>.
95-
96-
```json
97-
PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<BillingAccountID>/billingProfiles/<BillingProfileID>/invoiceSections/<InvoiceSectionID>/providers/Microsoft.Education/labs/default/students/<StudentID>?api-version=2021-12-01-preview
98-
```
99-
100-
Call the above API with a body similar to the one below. Change the body to include details of the student you want to add to the lab.
101-
102-
```json
103-
{
104-
"properties": {
105-
"firstName": "string",
106-
"lastName": "string",
107-
"email": "string",
108-
"role": "Student",
109-
"budget": {
110-
"currency": "string",
111-
"value": 0
112-
},
113-
"expirationDate": "2021-12-21T23:01:41.943Z",
114-
"subscriptionAlias": "string",
115-
"subscriptionInviteLastSentDate": "string"
116-
}
117-
}
118-
```
119-
120-
The API response returns details of the newly added student.
121-
122-
```json
123-
{
124-
"id": "string",
125-
"name": "string",
126-
"type": "string",
127-
"systemData": {
128-
"createdBy": "string",
129-
"createdByType": "User",
130-
"createdAt": "2021-12-21T23:02:20.163Z",
131-
"lastModifiedBy": "string",
132-
"lastModifiedByType": "User",
133-
"lastModifiedAt": "2021-12-21T23:02:20.163Z"
134-
},
135-
"properties": {
136-
"firstName": "string",
137-
"lastName": "string",
138-
"email": "string",
139-
"role": "Student",
140-
"budget": {
141-
"currency": "string",
142-
"value": 0
143-
},
144-
"subscriptionId": "string",
145-
"expirationDate": "2021-12-21T23:02:20.163Z",
146-
"status": "Active",
147-
"effectiveDate": "2021-12-21T23:02:20.163Z",
148-
"subscriptionAlias": "string",
149-
"subscriptionInviteLastSentDate": "string"
150-
}
151-
}
152-
```
153-
15490
## Check the details of a lab
15591

156-
Now that the lab has been created and a student has been added to the lab, let's get the details for the lab. Getting the lab details will provide you with meta data like when the lab was created and how much budget it has. It will not include information about students in the lab.
92+
Now that the lab has been created and a student has been added to the lab, let's get the details for the lab. Getting the lab details will provide you with meta data like when the lab was created and how much budget it has.
15793

15894
```json
15995
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<BillingAccountID>/billingProfiles/<BillingProfileID>/invoiceSections/<InvoiceSectionID>/providers/Microsoft.Education/labs/default?includeBudget=true&api-version=2021-12-01-preview
16096
```
16197

162-
The API response will include information about the lab and budget information (if the include budget flag is set to true)
98+
The API response includes information about the lab and budget information.
16399

164100
```json
165101
{
@@ -198,53 +134,6 @@ The API response will include information about the lab and budget information (
198134
}
199135
```
200136

201-
## Check the details of the students in a lab
202-
203-
Calling this API will allow us to see all of the students that are in the specified lab.
204-
205-
```json
206-
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/<BillingAccountID/billingProfiles/<BillingProfileID>/invoiceSections/<InvoiceSectionID>/providers/Microsoft.Education/labs/default/students?includeDeleted=true&api-version=2021-12-01-preview
207-
```
208-
209-
The API response will include information about the students in the lab and will even show student that have been deleted from the lab (if the includeDeleted flag is set to true)
210-
211-
```json
212-
{
213-
"value": [
214-
{
215-
"id": "string",
216-
"name": "string",
217-
"type": "string",
218-
"systemData": {
219-
"createdBy": "string",
220-
"createdByType": "User",
221-
"createdAt": "2021-12-21T23:15:45.430Z",
222-
"lastModifiedBy": "string",
223-
"lastModifiedByType": "User",
224-
"lastModifiedAt": "2021-12-21T23:15:45.430Z"
225-
},
226-
"properties": {
227-
"firstName": "string",
228-
"lastName": "string",
229-
"email": "string",
230-
"role": "Student",
231-
"budget": {
232-
"currency": "string",
233-
"value": 0
234-
},
235-
"subscriptionId": "string",
236-
"expirationDate": "2021-12-21T23:15:45.430Z",
237-
"status": "Active",
238-
"effectiveDate": "2021-12-21T23:15:45.430Z",
239-
"subscriptionAlias": "string",
240-
"subscriptionInviteLastSentDate": "string"
241-
}
242-
}
243-
],
244-
"nextLink": "string"
245-
}
246-
```
247-
248137
## Next steps
249138
- [Manage your Academic Grant using the Overview page](hub-overview-page.md)
250139

articles/education-hub/index.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,7 @@ landingContent:
6262
links:
6363
- text: How to create a lab
6464
url: create-lab-education-hub.md
65+
- text: How to add a student to a lab
66+
url: add-student-api.md
6567
- text: How to delete a lab
6668
url: delete-lab-education-hub-apis.md

articles/education-hub/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
items:
5757
- name: How to create a lab
5858
href: create-lab-education-hub.md
59+
- name: How to add students to a lab
60+
href: add-student-api.md
5961
- name: How to delete a lab
6062
href: delete-lab-education-hub-apis.md
6163
- name: Tutorials

0 commit comments

Comments
 (0)