PATCH
/
services
/
{service}
{
  "name": "<string>",
  "ty": "Service",
  "handlers": [
    {
      "name": "<string>",
      "ty": "Exclusive",
      "documentation": "<string>",
      "metadata": {},
      "idempotency_retention": "<string>",
      "journal_retention": "<string>",
      "inactivity_timeout": "<string>",
      "abort_timeout": "<string>",
      "enable_lazy_state": true,
      "public": true,
      "input_description": "<string>",
      "output_description": "<string>",
      "input_json_schema": "<any>",
      "output_json_schema": "<any>",
      "retry_policy": {
        "initial_interval": "<string>",
        "exponentiation_factor": 123,
        "max_attempts": 2,
        "max_interval": "<string>",
        "on_max_attempts": "Pause"
      }
    }
  ],
  "documentation": "<string>",
  "metadata": {},
  "deployment_id": "<string>",
  "revision": 1,
  "public": true,
  "idempotency_retention": "1d",
  "workflow_completion_retention": "<string>",
  "journal_retention": "<string>",
  "inactivity_timeout": "1m",
  "abort_timeout": "1m",
  "enable_lazy_state": false,
  "retry_policy": {
    "initial_interval": "100ms",
    "exponentiation_factor": 2,
    "max_attempts": null,
    "max_interval": null,
    "on_max_attempts": "Pause"
  }
}

Path Parameters

service
string
required

Fully qualified service name.

Body

application/json
public
boolean | null

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

idempotency_retention
string | null

Modify the retention of idempotent requests for this service.

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

workflow_completion_retention
string | null

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.

journal_retention
string | null

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.

inactivity_timeout
string | null

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.

abort_timeout
string | null

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.

Response

name
string
required

Fully qualified name of the service

ty
enum<string>
required

Service type

Available options:
Service,
VirtualObject,
Workflow
handlers
Handlers · object[]
required

Handlers for this service.

deployment_id
string
required

Deployment exposing the latest revision of the service.

revision
integer
required

Latest revision of the service.

Required range: x >= 0
documentation
string | null

Documentation of the service, as propagated by the SDKs.

metadata
object

Additional service metadata, as propagated by the SDKs.

public
boolean
default:true

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

idempotency_retention
string
default:1d

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.

workflow_completion_retention
string | null

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.

journal_retention
string | null

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.

inactivity_timeout
string
default:1m

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.

abort_timeout
string
default:1m

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.

enable_lazy_state
boolean
default:false

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

retry_policy
object

Retry policy applied to invocations of this service.

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