Adding/Removing Groups from a Schedule
These endpoints allow you to manage group memberships for schedules. You can add multiple groups to a schedule or remove groups from a schedule using a single API call. Simply provide a list of group IDs in the request body to modify the schedule's group assignments. Both adding and removing operations support batch processing of multiple groups simultaneously.
Adding GroupsPOST /api/v1/schedules/[SCHEDULE ID]/add_groups/
RemovingPOST /api/v1/schedules/[SCHEDULE ID]/remove_groups/
orDELETE /api/v1/schedules/[SCHEDULE ID]/remove_groups/
Required fields:
groups | A list of Group IDs (e.g [22,24]). |
Adding Groups to a Schedule example
curl 'https://acmeinc.datareportive.com/api/v1/schedules/1/add_groups/' \
-X POST \
-H 'Authorization: Token [ TOKEN ]' \
-H 'Content-Type: application/json' \
-d '{"groups":[1,2]}'
Remove Groups to a Schedule example
curl 'https://acmeinc.datareportive.com/api/v1/schedules/1/remove_groups/' \
-X POST \
-H 'Authorization: Token [ TOKEN ]' \
-H 'Content-Type: application/json' \
-d '{"groups":[1,2]}'