Overview
This article provides details for listing, creating, reading, updating, and deleting high priority groups via the OpenLoop API.
High Priority Groups (HPGs) have names, descriptions, and a unique ID, set when the group is created, that allows subsequent retrieval and operations on that group. Student group members are manged through the High Priority Group Students Resource.
Resource Details
Operations
The HPG resource provides operations to create, read, update, and delete high priority groups. The operations are summarized below:
Operation
|
HTTP Method
|
Description
|
Sample URI
|
List
|
GET |
Get a list of the current HP Groups
|
https://myhs.schoolloop.com/api/hpgroups |
Create
|
POST |
Create a new group
|
https://myhs.schoolloop.com/api/hpgroups?name=Group+One&unique_id=hpgroup1&description=HP+Group+One |
Read
|
GET |
Get a description of a specific group
|
https://myhs.schoolloop.com/api/hpgroups/mygroup1 |
Update
|
PUT |
Update group name or description
|
https://myhs.schoolloop.com/api/hpgroups/\[unique_group_id\]?name=newName&description=new+description |
Delete
|
DELETE |
Delete a group
|
https://myhs.schoolloop.com/api/hpgroups/\[unique_group_id\] |
Listing Existing Groups
The existing API-created HPGs can be listed with the HTTP method GET
to the following URI:
https://myhs.schoolloop.com/api/hpgroups
The existing groups are listed as rows of tab-separated group names and unique IDs.
Example:
Group One mygroup1
Group Two mygroup2
…
Creating a Group
The create operation is executed with the HTTP method POST
. The URI format to create a new HPG is
https://myhs.schoolloop.com/api/hpgroups/\[unique_group_id\]?name=newName&description=new+description
Example: The following command creates a group named “Group One” with the unique ID “mygroup1” and the description “This is my first group.”
https://myhs.schoolloop.com/api/hpgroups?name=Group+One&unique_id=mygroup1&description=This+is+my+first+group%2E
Retrieving a Group
A group name and description can be returned via the HTTP method GET
.
Example: A GET
on the URI
https://myhs.schoolloop.com/api/hpgroups/mygroup1
returns the name and description of the group with ID “mygroup1” as tab-separated text:
“Group One This is my first group.”
.
Modifying a Group
A group can be updated via the HTTP PUT
method to the group URI with a new name or description.
Example: A PUT
to the URI
https://myhs.schoolloop.com/api/hpgroups/mygroup1?name=New+group+name
changes the existing name for the group with unique ID “mygroup1” to “New group name.”
Deleting a Group
A group can be deleted via an HTTP DELETE
method to the group URI.
Example: A DELETE
to the URI
https://myhs.schoolloop.com/api/hpgroups/mygroup1
deletes the group with unique ID “mygroup1.”
Service Response
All successful web-service GET
, POST
, PUT
, and DELETE
calls return HTTP status SC_OK (200)
and a one-line text response: SUCCESS
. An error code and detailed message are returned if a request fails to execute for any reason.
Related Article
High Priority Student Resources: This article provides the information needed to list, add, or delete students in High Priority Student Resources using the OpenLoop API.