# Rancher Service Update using v2-beta API 1.3.0

**URL:** <https://forums.suse.com/t/rancher-service-update-using-v2-beta-api-1-3-0/5293>\
**Category:** Rancher 1.x\
**Created:** [January 23, 2017, 11:22am UTC](https://forums.suse.com/t/rancher-service-update-using-v2-beta-api-1-3-0/5293 "2017-01-23T11:22:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darius\_M](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@Darius\_M](https://forums.suse.com/u/Darius_M)\
**Post date:** [January 23, 2017, 11:22am UTC](https://forums.suse.com/t/rancher-service-update-using-v2-beta-api-1-3-0/5293/1 "2017-01-23T11:22:13Z")

</div>

Hi There,

started to using Rancher 1.3.0 - I wanted to update an existing Service with a new Docker Image. I am using this snippets:

1. Fetch Projects from API
2. Select “Default”
3. Fetch Stacks
4. Select my Stack to be updated (All Services in one stack should get the update)
5. Select all Services from this stack
6. Update the launchConfig Object with a new imageUuid Version (Using docker:mydockerhost/app:1.1.0-SNAPSHOT)  
From now on it is not working:
7. that fire an PUT Request. In Curl:

```auto
curl -X PUT -H 'Content-Type: application/json' -d '
  {"launchConfig":
    {"type":"launchConfig",
    "command":["java","-Xmx512m","-jar","app.jar",],
    "environment":{},
    "imageUuid":"mydocker/app:1.1.0-SNAPSHOT",
    "instanceTriggeredStop":"stop",
    "kind":"container",
    "labels":{"io.rancher.container.pull_image":"always"},
    "logConfig":{"type":"logConfig"},
    "networkMode":"managed",
    "privileged":false,
    "publishAllPorts":false,
    "readOnly":false,
    "startOnCreate":true,
    "stdinOpen":true,
    "system":false,
    "tty":true,
    "version":"0",
    "vcpu":1}}' myrancher:8080/v2-beta/projects/1a5/services/1s12?action=upgrade"

```

In the response, I get back the old version number “1.0.0-SNAPSHOT” - so the update failed. No error in the audit-log. I tried:

```auto
curl -X POST -H 'Content-Type: application/json' myrancher:8080/v2-beta/projects/1a5/services/1s12?action=finishupgrade`

```

But get an Error Response:

```auto
"{\"id\":\"123-123",\"type\":\"error\",\"links\":{},\"actions\":{},\"status\":422,\"code\":\"ActionNotAvailable\",\"message\":null,\"detail\":null,\"fieldName\":\"action\",\"baseType\":\"error\"}"`

```

The Error Message is not quiet helpful…  
As I could not find an example using the new API, I finally decided to try out the forums. What am I doing wrong ?
