title: spinnaker REST API patch pipeline stage
body: <p>I'm trying to patch a specific stage of a pipeline in spinnaker via its REST API: </p>
  
  <pre><code>curl -X PATCH \
      http://localhost:8082/pipelines/45042993-ff77-4cc5-b8f5-cb28b1902173/stages/8 \
      -d @/tmp/dtool_spinnaker_pipelinev_stage.json \
      -H "Content-Type: application/json" \
      --silent \
      --show-error
  </code></pre>
  
  <p>This gets me a 404 error page not found. POST'ing the full pipeline works: </p>
  
  <pre><code>curl -X POST \
      http://localhost:8082/pipelines/45042993-ff77-4cc5-b8f5-cb28b1902173 \
      -d @/tmp/dtool_spinnaker_pipelinev.json \
      -H "Content-Type: application/json" \
      --silent \
      --show-error
  </code></pre>
  
  <p>Any idea what I'm doing wrong? The <a href="https://www.spinnaker.io/reference/api/docs.html#api-Pipelinecontroller-updateStageUsingPATCH" rel="nofollow noreferrer">update stage docs</a> is not clear about the stage ID but based on the pipeline JSON, it has to be its <code>refId</code>. </p>