Hello Tobias, The update pipeline config API ( https://api.gocd.org/current/#edit-pipeline-config) is a PUT call not a PATCH. Hence, you need to send the complete pipeline config object with the modified timer object for the API to work.
Thanks Kritika On Wednesday, March 18, 2020 at 4:11:24 PM UTC+5:30 [email protected] wrote: > Hi. > > I want to edit the timer with GoCD API on a pipeline that has already been > created. This is what the structure of the timer looks like according to > GoCD API. > > [image: timer.PNG] > > > I follow this structure for my API call and try to edit the pipelines > timer according to the call below. > > > curl -k "https://localhost:8154/go/api/admin/pipelines/pipeline_name" -H > "Accept: application/vnd.go.cd.v10+json" -H "Content-Type: > application/json" -H "If-Match: "ca0f7e7a6f033093dbefadaa08f8f4f2"" -X PUT > -d "{"group": "pipeline_group_name", "name": "pipeline_name", "timer": > {"spec": "0 0 22 ? * MON-FRI", "only_on_changes": true}}" > > > When I execute this I get the error below. It seems like it does not > accept the structure that is on the "spec" object. How can I fix this? > > > > [image: error.png] > > > Thanks! > > > /Tobias > > > > > > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/a3618707-cc3c-4e8a-ba70-21094b6ef357%40googlegroups.com.
