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 Groups
POST /api/v1/schedules/[SCHEDULE ID]/add_groups/

Removing
POST /api/v1/schedules/[SCHEDULE ID]/remove_groups/
or
DELETE /api/v1/schedules/[SCHEDULE ID]/remove_groups/

Required fields:

groupsA 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]}'