Skip to main content
PATCH

Authorizations

Authorization
string
header
required

Your account API token, sent as Authorization: Bearer <api_token>. Owners and admins can read the token from the LocalOps console.

Path Parameters

envId
string<uuid>
required

The unique identifier of the environment

serviceId
string<uuid>
required

The unique identifier of the service

Body

application/json
name
string

Letters, spaces and hyphens

Required string length: 3 - 50
replica_count
integer
Required range: x >= 0
cpu_count_min
number
cpu_count_max
number
memory_mb_min
integer
memory_mb_max
integer
port
integer
Required range: 1 <= x <= 65535
cron_schedule
string
Required string length: 1 - 100
auto_deploy
boolean

Rejected for services whose type is job

source
enum<string>

Changing the source makes the matching source fields required in the same request

Available options:
github,
gitlab,
docker_image,
helm_chart
git_repo_branch
string

Required if source: github is sent

Maximum string length: 100
run_command
string
Maximum string length: 100
dockerfile_path
string

Trimmed server side

Maximum string length: 100
build_context
string

Docker build context directory, relative to the repository root. Git sources only. Surrounding whitespace is trimmed and a blank value is treated as unset.

Maximum string length: 100
ops_json_path
string

Trimmed server side

Maximum string length: 100
ops_json
string

Docker image source only

enable_previews
boolean
enable_code_review
boolean
docker_registry
string

Required if source: docker_image is sent

Maximum string length: 100
docker_image
string

Required if source: docker_image is sent

Maximum string length: 100
helm_chart_repo
string

Required if source: helm_chart is sent

Maximum string length: 100
helm_chart_name
string

Required if source: helm_chart is sent

Maximum string length: 100
helm_values_yml
string

Full replacement of values.yaml

prov_node_group_id
string<uuid>
is_protected
boolean

Set to false before deleting a protected service

Response

Service updated

message
string
data
object