AutomationHandler
The AutomationHandler object
The AutomationHandler object looks like this in JSON:
{
"object": "automation_handler",
"id": 1,
"automation_id": 61,
"owner_type": null,
"owner_id": null,
"name": "Notify me when my grades change",
"description": "Whenever a grade in a course changes for a student, notify them.",
"abbrv": "notify_me_when_my_grades_change",
"user_managed_subscriptions": true,
"status": "active",
"overrides_handler_id": null,
"cloned_from_id": null,
"added_at": null,
"added_by_id": null,
"sandbox": true
}
| Attribute | Required | Data Type |
|---|---|---|
| id | Yes | int |
| automation_id | No | int |
| owner_type | No | text (100) |
| owner_id | No | int |
| name | No | text (100) |
| description | No | text (1000) |
| abbrv | No | text (100) |
| user_managed_subscriptions | Yes | bool |
| status | Yes | enum (active, paused, deleted) |
| overrides_handler_id | No | int |
| cloned_from_id | No | int |
| added_at | No | datetime |
| added_by_id | No | int |
| sandbox | No | bool |
index
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/automationhandlers" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/automationhandlers',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/automationhandlers',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/automationhandlers"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/automationhandlers');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "list",
"count": 4,
"results": 4,
"results_per_page": null,
"pages": 1,
"page": 1,
"offset": 0,
"has_more": false,
"data": [
{
"object": "automation_handler",
"id": 2,
"automation_id": 49,
"owner_type": null,
"owner_id": null,
"name": "Notify me of instructor bulletin board posts",
"description": "Whenever an instructor posts to a bulletin board in one of my courses, let me know.",
"abbrv": "notify_me_of_instructor_bulletin_board_posts",
"user_managed_subscriptions": true,
"status": "active",
"overrides_handler_id": null,
"cloned_from_id": null,
"added_at": null,
"added_by_id": null
}
],
"sandbox": true
}
Retrieves all AutomationHandler objects.
HTTP Request
GET /automationhandlers
Parameters
None
Permissions
One of the following roles is required to call this method:
- Development
show
Example code to call this method:
curl "https://yourschool.populiweb.com/api2/automationhandler/(automationhandler)" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_POPULI_API_KEY" \
-X GET
require 'httparty'
response = HTTParty.get(
'https://yourschool.populiweb.com/api2/automationhandler/(automationhandler)',
headers: {
'Authorization' => 'Bearer YOUR_POPULI_API_KEY'
},
)
puts response.body
import requests
response = requests.get(
'https://yourschool.populiweb.com/api2/automationhandler/(automationhandler)',
headers={
'Authorization': 'Bearer YOUR_POPULI_API_KEY'
},
)
print(response.json())
using Newtonsoft.Json;
using RestSharp;
var client = new RestClient();
var request = new RestRequest(new Uri("https://yourschool.populiweb.com/api2/automationhandler/(automationhandler)"), Method.Get);
request.AddHeader("Authorization", "Bearer YOUR_POPULI_API_KEY");
var response = client.Execute(request);
var response_object = JsonConvert.DeserializeObject(response.Content);
Console.Write(response_object);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://yourschool.populiweb.com/api2/automationhandler/(automationhandler)');
curl_setopt($curl, CURLOPT_HTTPHEADER, ['Authorization: Bearer YOUR_POPULI_API_KEY']);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
$response = curl_exec($curl);
$response_decoded = json_decode($response);
var_dump($response_decoded);
Example response:
{
"object": "automation_handler",
"id": 1,
"automation_id": 61,
"owner_type": null,
"owner_id": null,
"name": "Notify me when my grades change",
"description": "Whenever a grade in a course changes for a student, notify them.",
"abbrv": "notify_me_when_my_grades_change",
"user_managed_subscriptions": true,
"status": "active",
"overrides_handler_id": null,
"cloned_from_id": null,
"added_at": null,
"added_by_id": null,
"sandbox": true
}
Retrieves a specific AutomationHandler object.
HTTP Request
GET /automationhandler/(automationhandler)
Parameters
No additional parameters are needed beyond the ID of the object being requested that appears in the URL.
Permissions
One of the following roles is required to call this method:
- Development