Not enough information in API documentation

What value to put in update_mask parameter when using koyeb api?
There’s nothing in the documentation about what value it expects apart from a string is expected.
I’m using this:

requests.request(“PUT”,url=“https://app.koyeb.com/v1/services/<service_id>”,headers={“authorization”:"Bearer < Token > "},params={“update_mask”:“update”,“dry_run”:True})

And it returns

{ “status”: 400, “code”: “invalid_argument”, “message”: “Validation error”,
“fields”: [
{
“field”: “service.definition”,
“description”: “value is required”
}
]
}

I’ve no idea how to make it work and docs are no help at all. Please reply on how to fix it and please update docs.

Hello!

First, it seems that that API endpoint is outdated. update_mask is not used anymore. We will remove this reference. Thanks for the report!

Now, if you want to update a service via the API, you need to provide a JSON string with the new definition in the request body. For example:

{
  "definition": {
    "name": "myservicename",
    "docker": {
      "image": "registry/imagename",
      "args": []
    },
    "env": [],
    "ports": [
      {
        "port": 80,
        "protocol": "http"
      }
    ],
    "routes": [
      {
        "port": 80,
        "path": "/"
      }
    ],
    "scalings": [
      {
        "min": 1,
        "max": 1
      }
    ],
    "instance_types": [
      {
        "type": "micro"
      }
    ],
    "regions": [
      "was"
    ]
  }
}