Skip to content

Commit 57f1f6a

Browse files
Merge pull request #185324 from vinnieangel/createLab
added a new article on how to create a lab
2 parents e880b85 + e474211 commit 57f1f6a

File tree

3 files changed

+262
-0
lines changed

3 files changed

+262
-0
lines changed
Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,256 @@
1+
---
2+
title: Create a lab in Azure Education Hub through REST APIs
3+
description: Learn how to set up a lab in education hub
4+
author: vinnieangel
5+
ms.author: vangellotti
6+
ms.service: azure-education
7+
ms.topic: how-to
8+
ms.date: 12/21/2021
9+
ms.custom: template-how-to
10+
---
11+
12+
<!-- 1. H1
13+
Required. Start your H1 with a verb. Pick an H1 that clearly conveys the task the
14+
user will complete.
15+
-->
16+
17+
# Create a lab in Azure Education Hub through REST APIs.
18+
19+
This article will walk you through how to create a lab, add students to that lab and verify that the lab has been created.
20+
21+
## Prerequisites
22+
23+
- Know billing account ID, Billing profile ID, and Invoice Section ID
24+
- Have an Edu approved Azure account
25+
26+
## Create a lab
27+
28+
```json
29+
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
30+
```
31+
32+
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.
33+
34+
```json
35+
{
36+
"properties": {
37+
"displayName": "string",
38+
"budgetPerStudent": {
39+
"currency": "string",
40+
"value": 0
41+
},
42+
"description": "string",
43+
"expirationDate": "2021-12-21T22:56:17.314Z",
44+
"totalBudget": {
45+
"currency": "string",
46+
"value": 0
47+
},
48+
"totalAllocatedBudget": {
49+
"currency": "string",
50+
"value": 0
51+
}
52+
}
53+
}
54+
```
55+
56+
The API response returns details of the newly created lab. Congratulations, you have created a lab in education hub.
57+
58+
```json
59+
{
60+
"id": "string",
61+
"name": "string",
62+
"type": "string",
63+
"systemData": {
64+
"createdBy": "string",
65+
"createdByType": "User",
66+
"createdAt": "2021-12-21T22:56:17.338Z",
67+
"lastModifiedBy": "string",
68+
"lastModifiedByType": "User",
69+
"lastModifiedAt": "2021-12-21T22:56:17.338Z"
70+
},
71+
"properties": {
72+
"displayName": "string",
73+
"budgetPerStudent": {
74+
"currency": "string",
75+
"value": 0
76+
},
77+
"description": "string",
78+
"expirationDate": "2021-12-21T22:56:17.339Z",
79+
"effectiveDate": "2021-12-21T22:56:17.339Z",
80+
"status": "Active",
81+
"maxStudentCount": 0,
82+
"invitationCode": "string",
83+
"totalBudget": {
84+
"currency": "string",
85+
"value": 0
86+
},
87+
"totalAllocatedBudget": {
88+
"currency": "string",
89+
"value": 0
90+
}
91+
}
92+
}
93+
```
94+
95+
## Add students to the lab
96+
97+
Now that the lab has been successfully created, you can begin to add students to the lab.
98+
99+
Call the endpoint below and make sure to replace the sections that are surrounded by <>.
100+
101+
```json
102+
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
103+
```
104+
105+
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.
106+
107+
```json
108+
{
109+
"properties": {
110+
"firstName": "string",
111+
"lastName": "string",
112+
"email": "string",
113+
"role": "Student",
114+
"budget": {
115+
"currency": "string",
116+
"value": 0
117+
},
118+
"expirationDate": "2021-12-21T23:01:41.943Z",
119+
"subscriptionAlias": "string",
120+
"subscriptionInviteLastSentDate": "string"
121+
}
122+
}
123+
```
124+
125+
The API response returns details of the newly added student.
126+
127+
```json
128+
{
129+
"id": "string",
130+
"name": "string",
131+
"type": "string",
132+
"systemData": {
133+
"createdBy": "string",
134+
"createdByType": "User",
135+
"createdAt": "2021-12-21T23:02:20.163Z",
136+
"lastModifiedBy": "string",
137+
"lastModifiedByType": "User",
138+
"lastModifiedAt": "2021-12-21T23:02:20.163Z"
139+
},
140+
"properties": {
141+
"firstName": "string",
142+
"lastName": "string",
143+
"email": "string",
144+
"role": "Student",
145+
"budget": {
146+
"currency": "string",
147+
"value": 0
148+
},
149+
"subscriptionId": "string",
150+
"expirationDate": "2021-12-21T23:02:20.163Z",
151+
"status": "Active",
152+
"effectiveDate": "2021-12-21T23:02:20.163Z",
153+
"subscriptionAlias": "string",
154+
"subscriptionInviteLastSentDate": "string"
155+
}
156+
}
157+
```
158+
159+
## Check the details of a lab
160+
161+
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.
162+
163+
```json
164+
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
165+
```
166+
167+
The API response will include information about the lab and budget information (if the include budget flag is set to true)
168+
169+
```json
170+
{
171+
"id": "string",
172+
"name": "string",
173+
"type": "string",
174+
"systemData": {
175+
"createdBy": "string",
176+
"createdByType": "User",
177+
"createdAt": "2021-12-21T23:10:10.867Z",
178+
"lastModifiedBy": "string",
179+
"lastModifiedByType": "User",
180+
"lastModifiedAt": "2021-12-21T23:10:10.867Z"
181+
},
182+
"properties": {
183+
"displayName": "string",
184+
"budgetPerStudent": {
185+
"currency": "string",
186+
"value": 0
187+
},
188+
"description": "string",
189+
"expirationDate": "2021-12-21T23:10:10.867Z",
190+
"effectiveDate": "2021-12-21T23:10:10.867Z",
191+
"status": "Active",
192+
"maxStudentCount": 0,
193+
"invitationCode": "string",
194+
"totalBudget": {
195+
"currency": "string",
196+
"value": 0
197+
},
198+
"totalAllocatedBudget": {
199+
"currency": "string",
200+
"value": 0
201+
}
202+
}
203+
}
204+
```
205+
206+
## Check the details of the students in a lab
207+
208+
Calling this API will allow us to see all of the students that are in the specified lab.
209+
210+
```json
211+
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
212+
```
213+
214+
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)
215+
216+
```json
217+
{
218+
"value": [
219+
{
220+
"id": "string",
221+
"name": "string",
222+
"type": "string",
223+
"systemData": {
224+
"createdBy": "string",
225+
"createdByType": "User",
226+
"createdAt": "2021-12-21T23:15:45.430Z",
227+
"lastModifiedBy": "string",
228+
"lastModifiedByType": "User",
229+
"lastModifiedAt": "2021-12-21T23:15:45.430Z"
230+
},
231+
"properties": {
232+
"firstName": "string",
233+
"lastName": "string",
234+
"email": "string",
235+
"role": "Student",
236+
"budget": {
237+
"currency": "string",
238+
"value": 0
239+
},
240+
"subscriptionId": "string",
241+
"expirationDate": "2021-12-21T23:15:45.430Z",
242+
"status": "Active",
243+
"effectiveDate": "2021-12-21T23:15:45.430Z",
244+
"subscriptionAlias": "string",
245+
"subscriptionInviteLastSentDate": "string"
246+
}
247+
}
248+
],
249+
"nextLink": "string"
250+
}
251+
```
252+
253+
## Next steps
254+
- [Manage your Academic Grant using the Overview page](hub-overview-page.md)
255+
256+
- [Support options](educator-service-desk.md)

articles/education-hub/index.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ landingContent:
2929
links:
3030
- text: Use the Education Hub
3131
url: access-education-hub.md
32+
- linkListType: how-to-guide
33+
links:
34+
- text: Create a lab in Education Hub using REST APIs
35+
url: create-lab-education-hub.md
3236

3337
# Card
3438
- title: Azure Dev Tools for Teaching

articles/education-hub/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
items:
1717
- name: Manage your Academic Grant
1818
href: hub-overview-page.md
19+
- name: Create a lab in Education Hub through REST APIs
20+
href: create-lab-education-hub.md
1921
- name: Create an assignment and allocate credit
2022
href: create-assignment-allocate-credit.md
2123
- name: Tutorials

0 commit comments

Comments
 (0)