Skip to main content
PATCH
/
services
/
{service}
Modify service configuration
curl --request PATCH \
  --url https://api.example.com/services/{service} \
  --header 'Content-Type: application/json' \
  --data '
{
  "abort_timeout": "<string>",
  "idempotency_retention": "<string>",
  "inactivity_timeout": "<string>",
  "journal_retention": "<string>",
  "public": true,
  "workflow_completion_retention": "<string>"
}
'
{
  "deployment_id": "<string>",
  "handlers": [
    {
      "input_description": "<string>",
      "name": "<string>",
      "output_description": "<string>",
      "abort_timeout": "<string>",
      "documentation": "<string>",
      "enable_lazy_state": true,
      "idempotency_retention": "<string>",
      "inactivity_timeout": "<string>",
      "info": [
        {
          "message": "<string>",
          "code": "<string>"
        }
      ],
      "input_json_schema": "<unknown>",
      "journal_retention": "<string>",
      "metadata": {},
      "output_json_schema": "<unknown>",
      "public": true,
      "retry_policy": {
        "exponentiation_factor": 123,
        "initial_interval": "<string>",
        "max_attempts": 2,
        "max_interval": "<string>",
        "on_max_attempts": "<unknown>"
      },
      "ty": "<unknown>"
    }
  ],
  "name": "<string>",
  "revision": 1,
  "ty": "Service",
  "abort_timeout": "<string>",
  "documentation": "<string>",
  "enable_lazy_state": true,
  "idempotency_retention": "<string>",
  "inactivity_timeout": "<string>",
  "info": [
    {
      "message": "<string>",
      "code": "<string>"
    }
  ],
  "journal_retention": "<string>",
  "metadata": {},
  "public": true,
  "retry_policy": {
    "exponentiation_factor": 123,
    "initial_interval": "<string>",
    "max_attempts": 2,
    "max_interval": "<string>",
    "on_max_attempts": "Pause"
  },
  "workflow_completion_retention": "<string>"
}

Path Parameters

service
string
required

Fully qualified service name.

Body

application/json
abort_timeout
string | null

Abort timeout

This timer guards against stalled service/handler invocations that are supposed to terminate. The abort timeout is started after the 'inactivity timeout' has expired and the service/handler invocation has been asked to gracefully terminate. Once the timer expires, it will abort the service/handler invocation.

This timer potentially interrupts user code. If the user code needs longer to gracefully terminate, then this value needs to be set accordingly.

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.

This overrides the default abort timeout set in invoker options.

idempotency_retention
string | null

Idempotency retention

Modify the retention of idempotent requests for this service.

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.

inactivity_timeout
string | null

Inactivity timeout

This timer guards against stalled service/handler invocations. Once it expires, Restate triggers a graceful termination by asking the service invocation to suspend (which preserves intermediate progress).

The 'abort timeout' is used to abort the invocation, in case it doesn't react to the request to suspend.

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.

This overrides the default inactivity timeout set in invoker options.

journal_retention
string | null

Journal retention

Modify the journal retention for this service. When set, this applies to all requests to all handlers of this service.

In case the invocation has an idempotency key, the idempotency_retention caps the maximum journal_retention time. In case the invocation targets a workflow handler, the workflow_completion_retention caps the maximum journal_retention time.

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.

public
boolean | null

Public

If true, the service can be invoked through the ingress. If false, the service can be invoked only from another Restate service.

workflow_completion_retention
string | null

Workflow completion retention

Modify the retention of the workflow completion. This can be modified only for workflow services!

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.

Response

Service configuration updated successfully

Metadata of a registered service.

deployment_id
string
required

Deployment Id

Deployment exposing the latest revision of the service.

handlers
object[]
required

Handlers

Handlers for this service.

name
string
required

Name

Fully qualified name of the service

revision
integer<int32>
required

Revision

Latest revision of the service.

Required range: x >= 0
ty
enum<string>
required

Type

Service type

Available options:
Service,
VirtualObject,
Workflow
abort_timeout
string

Abort timeout

This timer guards against stalled service/handler invocations that are supposed to terminate. The abort timeout is started after the 'inactivity timeout' has expired and the service/handler invocation has been asked to gracefully terminate. Once the timer expires, it will abort the service/handler invocation.

This timer potentially interrupts user code. If the user code needs longer to gracefully terminate, then this value needs to be set accordingly.

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.

If unset, this returns the default abort timeout configured in invoker options.

documentation
string | null

Documentation

Documentation of the service, as propagated by the SDKs.

enable_lazy_state
boolean

Enable lazy state

If true, lazy state will be enabled for all invocations to this service. This is relevant only for Workflows and Virtual Objects.

idempotency_retention
string

Idempotency retention

The retention duration of idempotent requests for this service.

If not configured, this returns the default idempotency retention.

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.

inactivity_timeout
string

Inactivity timeout

This timer guards against stalled service/handler invocations. Once it expires, Restate triggers a graceful termination by asking the service invocation to suspend (which preserves intermediate progress).

The 'abort timeout' is used to abort the invocation, in case it doesn't react to the request to suspend.

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.

If unset, this returns the default inactivity timeout configured in invoker options.

info
object[]

Info

List of configuration/deprecation information related to this service.

journal_retention
string | null

Journal retention

The journal retention. When set, this applies to all requests to all handlers of this service.

In case the invocation has an idempotency key, the idempotency_retention caps the maximum journal_retention time. In case the invocation targets a workflow handler, the workflow_completion_retention caps the maximum journal_retention time.

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.

metadata
object

Metadata

Additional service metadata, as propagated by the SDKs.

public
boolean

Public

If true, the service can be invoked through the ingress. If false, the service can be invoked only from another Restate service.

retry_policy
object

Retry policy

Retry policy applied to invocations of this service.

If unset, it returns the default values configured in the Restate configuration.

workflow_completion_retention
string | null

Workflow completion retention

The retention duration of workflows. Only available on workflow services.

Can be configured using the jiff::fmt::friendly format or ISO8601, for example 5 hours.