Resource for Creating and Managing High Priority Groups

This OpenLoop API web service  is for creating, listing, updating, and deleting high priority groups. High priority groups 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.

Operations

The High Priority Groups resource provides operations to create, read, update and delete high priority groups. The operations are summarized below:

Operation HTTP Method Description Example URI
List groups 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 description of a specific group vsfdv
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\]

IMPORTANT: The HTTP authorization headers must be set with a valid, privileged School Loop user name, and your web-service password. For example “jsmith:mywebpass”. Note also that all parameters must be properly URL encoded. All successful web-service POST, PUT, and DELETE calls return HTTP status SC_OK on successful completion. An error code, and detailed message is returned if a call fails to execute for any reason.

Listing Existing Groups

The existing api-created high priority groups can be listed with an HTTP GET to the following URI:

https://myhs.schoolloop.com/api/hpgroups

The existing api-created groups are list as rows of tab-separated group names and unique IDs, for example:

“Group One mygroup1

Group Two mygroup2

…”

Note that a valid username and password must be set in the HTTP Authorization header.

Creating a Group

The create operation is executed with a simple http POST command. The URI format to create a new HP group is

https://myhs.schoolloop.com/api/hpgroups/\[unique_group_id\]?name=newName&description=new+description

For example, the following call creates a group named “Group One” with unique ID “mygroup1” and 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

Note that a valid username and password must be set in the HTTP Authorization header.

Retrieving a Group

Group name and description can be return via an HTTP GET method. For 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.”

Note that a valid username and password must be set in the HTTP Authorization header.

Modifying a Group

A group can be updated via an HTTP PUT method to the group URI with a new name and/or description. For example, a PUT to the URI:

https://myhs.schoolloop.com/api/hpgroups/mygroup1?name=New+group+name

will change 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. For example, a DELETE to the URI:

https://myhs.schoolloop.com/api/hpgroups/mygroup1

will delete the group with unique ID “mygroup1”. Note that a valid username and password must be set in the HTTP Authorization header.

Managing Group Members

High priority group students can be managed via this resource.
Service Response

Successful hpgroups web-service create, update, and delete operations return the HTTP status code SC_OK (200) and a one-line text response: “SUCCESS”.  If an operation fails, a error status code and detailed message describing the failure is returned.