Hiya,
I’m trying to create a channel via the rest api, but its failing as it doesn’t understand the actions associated with the rule.
Unhandled error on request: https://deploy.servername.co.uk/api/channels by ApiUser : Error converting value "Deploy Files" to type 'Octopus.Client.Model.ReferenceCollection'. Path 'Rules[0].Actions', line 11, position 49.
Newtonsoft.Json.JsonSerializationException: Error converting value "Deploy Files" to type 'Octopus.Client.Model.ReferenceCollection'. Path 'Rules[0].Actions', line 11, position 49. ---> System.ArgumentException: Could not cast or convert from System.String to Octopus.Client.Model.ReferenceCollection.
The documentation on the rules section is a little sparse.
I’m passing through the rules the same way that I’m retrieving them from the API which is:
"Rules": [
{
"Id": "[new guid here]",
"Actions": [
"Deploy Files"
],
"VersionRange": "[1611.0,1611.99]",
"Tag": ""
}
]
I’m guessing the actions section on POST needs to be some form of action id instead from the deployment steps but I’m struggling to find out exactly what format this should be in?
Thanks,
Ste