We’ve created a script using your example which creates a channel and adds it to a list of projects using a foreach loop. How would I go about delete the channel if I wanted to rollback the change. Creating a diff script I can use a get call what parameters would I need for the delete. I’ve tried changing the method to delete but to no avail
Thanks for reaching out to Octopus Support and for the question!
It looks as though you’re on the right track but if you add a channel to each project individually and wish to roll this back, you will need to individually delete the channel from each project.
Inside the foreach loop, each project name should be used to find the project ID of the project and then that can be used to delete the channel from the project directly.
The URL to delete a channel from within the project is $octopusUrl/api/projects/projects-id/channels/channels-id