PUT
/ai_labs/organization/{Organization_Id}/course/{Course_Id}/students/
curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/ai_labs/organization/{Organization_Id}/course/{Course_Id}/students/?location=<LOCATION>&addition_type=group_ids&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "member_ids": [ 0 ], "group_ids": [ 0 ], "action": "add"}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/gpu/ai_labs/organization/{Organization_Id}/course/{Course_Id}/students/", params={"location": "<LOCATION>", "addition_type": "group_ids", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "member_ids": [ 0, ], "group_ids": [ 0, ], "action": "add", },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/gpu/ai_labs/organization/{Organization_Id}/course/{Course_Id}/students/");url.search = new URLSearchParams({ location: "<LOCATION>", addition_type: "group_ids", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "member_ids": [ 0 ], "group_ids": [ 0 ], "action": "add" }),});console.log(await response.json());Note: AI Labs is currently available only in the Delhi region. Select addition_type as ‘group_ids’ to add students via group IDs or ‘emails’ to add via email addresses. Make sure to change the request body using the dropdown in the examples section.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization_Id
required
integer
Organization ID
Course_Id
required
integer
Course ID
Query Parameters
Section titled “Query Parameters”location
required
string
Location
active_iam
integer
Active IAM ID (To access contact person account) Find your Active IAM ID here
addition_type
required
string
Type of student addition (by group IDs or emails)
Example
group_idsRequest Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
member_ids
List of student member IDs to add or remove
Array<integer>
group_ids
List of group IDs to add or remove
Array<integer>
action
Action to perform — either add or remove
string
Responses
Section titled “Responses”Successfully added or removed students from the course
Media typeapplication/json
object
code
integer
data
string
errors
object
message
string
Example
{ "code": 200, "data": "Successfully added/removed Students from the course", "errors": {}, "message": "Success"}