Groups
Create a group in the current user's account. Only administrators are allowed to perform this action.
Example:
curl -X POST -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/groups"
data.json:
{
"name": "The Group Name"
}
The desired name for the group
The newly created group
Bad Request
POST /api/groups HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"name": "The Group Name"
}
{
"id": "text",
"name": "text",
"accountId": "text"
}
Gets a list of all the groups the user has access to. If the user is an admin it will return all the groups in the account.
Example:
curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/groups"
An array of the groups for the account
Bad Request
GET /api/groups HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
"items": [
{
"id": "text",
"name": "text",
"accountId": "text",
"isManager": true
}
]
}
Update a group in the current user's account. Only an admin or manager of the group can perform this request.
Example:
curl -X PUT -H "X-Session-ID: 0123456789" -H "Content-Type: application/json" --data @data.json "https://lor.instructure.com/api/groups/:id"
data.json:
{
"name": "The Group Name"
}
The group id
The desired name for the group
The updated group
Bad Request
PUT /api/groups/{id} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 25
{
"name": "The Group Name"
}
{
"id": "text",
"name": "text",
"accountId": "text"
}
Get a group by its ID. Only an admin or manager of the group can use this endpoint.
Example:
curl -H "X-Session-ID: 0123456789" "https://lor.instructure.com/api/groups/:id"
The group id
The group object
Bad Request
GET /api/groups/{id} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
{
"id": "text",
"name": "text",
"accountId": "text"
}
Deletes a group. Only Administrators are allowed to perform this action.
Example:
curl -X DELETE -H "X-Session-ID: 01234567890" "https://lor.instructure.com/api/groups/asdf"
The group id
No Content
Bad Request
DELETE /api/groups/{id} HTTP/1.1
Host: lor.instructure.com
x-session-id: YOUR_API_KEY
Accept: */*
No content
Last updated
Was this helpful?