Restate service_handler API

Service handlers metadata

OpenAPI Specification

restate-service-handler-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Admin cluster_health service_handler API
  description: This API exposes the admin operations of a Restate cluster, such as registering new service deployments, interacting with running invocations, register Kafka subscriptions, retrieve service metadata. For an overview, check out the [Operate documentation](https://docs.restate.dev/operate/). If you're looking for how to call your services, check out the [Ingress HTTP API](https://docs.restate.dev/invoke/http) instead.
  version: 1.4.0
tags:
- name: service_handler
  description: Service handlers metadata
paths:
  /services/{service}/handlers:
    get:
      tags:
      - service_handler
      summary: List Service Handlers
      description: List all the handlers of the given service.
      operationId: list_service_handlers
      parameters:
      - name: service
        in: path
        description: Fully qualified service name.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListServiceHandlersResponse'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '503':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
  /services/{service}/handlers/{handler}:
    get:
      tags:
      - service_handler
      summary: Get Service Handler
      description: Get the handler of a service
      operationId: get_service_handler
      parameters:
      - name: service
        in: path
        description: Fully qualified service name.
        required: true
        schema:
          type: string
      - name: handler
        in: path
        description: Handler name.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HandlerMetadata'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
        '503':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDescriptionResponse'
components:
  schemas:
    HandlerMetadata:
      type: object
      required:
      - input_description
      - name
      - output_description
      properties:
        name:
          type: string
        ty:
          allOf:
          - $ref: '#/components/schemas/HandlerMetadataType'
          nullable: true
        documentation:
          title: Documentation
          description: Documentation of the handler, as propagated by the SDKs.
          type: string
          nullable: true
        metadata:
          title: Metadata
          description: Additional handler metadata, as propagated by the SDKs.
          type: object
          additionalProperties:
            type: string
        idempotency_retention:
          title: Idempotency retention
          description: The retention duration of idempotent requests for this service.
          type: string
          nullable: true
        workflow_completion_retention:
          title: Workflow completion retention
          description: The retention duration of workflows. Only available on workflow services.
          type: string
          nullable: true
        journal_retention:
          title: Journal retention
          description: 'The journal retention. When set, this applies to all requests to this handler.


            In case the request has an idempotency key, the `idempotency_retention` caps the maximum `journal_retention` time. In case this handler is a workflow handler, the `workflow_completion_retention` caps the maximum `journal_retention` time.'
          type: string
          nullable: true
        inactivity_timeout:
          title: Inactivity timeout
          description: '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 [`humantime`](https://docs.rs/humantime/latest/humantime/fn.parse_duration.html) format.


            This overrides the default inactivity timeout set in invoker options.'
          type: string
          nullable: true
        abort_timeout:
          title: Abort timeout
          description: '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 [`humantime`](https://docs.rs/humantime/latest/humantime/fn.parse_duration.html) format.


            This overrides the default abort timeout set in invoker options.'
          type: string
          nullable: true
        enable_lazy_state:
          title: Enable lazy state
          description: If true, lazy state will be enabled for all invocations to this service. This is relevant only for Workflows and Virtual Objects.
          type: boolean
          nullable: true
        public:
          title: Public
          description: If true, this handler can be invoked through the ingress. If false, this handler can be invoked only from another Restate service.
          default: true
          type: boolean
        input_description:
          title: Human readable input description
          description: If empty, no schema was provided by the user at discovery time.
          type: string
        output_description:
          title: Human readable output description
          description: If empty, no schema was provided by the user at discovery time.
          type: string
        input_json_schema:
          title: Input JSON Schema
          description: JSON Schema of the handler input
          nullable: true
        output_json_schema:
          title: Output JSON Schema
          description: JSON Schema of the handler output
          nullable: true
    ErrorDescriptionResponse:
      title: Error description response
      description: Error details of the response
      type: object
      required:
      - message
      properties:
        message:
          type: string
        restate_code:
          title: Restate code
          description: Restate error code describing this error
          type: string
          nullable: true
    ListServiceHandlersResponse:
      type: object
      required:
      - handlers
      properties:
        handlers:
          type: array
          items:
            $ref: '#/components/schemas/HandlerMetadata'
    HandlerMetadataType:
      type: string
      enum:
      - Exclusive
      - Shared
      - Workflow
externalDocs:
  url: https://docs.restate.dev/operate/