Skip to main content

Admin API

Admin API (0.8.1)

service_method

Get service method

Get the method of a service

path Parameters
service
required
string

Fully qualified service name.

method
required
string

Method name.

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "input_type": "string",
  • "output_type": "string",
  • "key_field_number": 0
}

List service methods

List all the methods of the given service.

path Parameters
service
required
string

Fully qualified service name.

Responses

Response samples

Content type
application/json
{
  • "methods": [
    ]
}

service

Get service

Get a registered service.

path Parameters
service
required
string

Fully qualified service name.

Responses

Response samples

Content type
application/json
{
  • "name": "string",
  • "methods": [
    ],
  • "instance_type": "Keyed",
  • "deployment_id": "string",
  • "revision": 0,
  • "public": true
}

Modify a service

Modify a registered service.

path Parameters
service
required
string

Fully qualified service name.

Request Body schema: application/json
required
public
required
boolean (Public)

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

Responses

Request samples

Content type
application/json
{
  • "public": true
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "methods": [
    ],
  • "instance_type": "Keyed",
  • "deployment_id": "string",
  • "revision": 0,
  • "public": true
}

List services

List all registered services.

Responses

Response samples

Content type
application/json
{
  • "services": [
    ]
}

Modify a service state

Modify service state

path Parameters
service
required
string

Fully qualified service name.

Request Body schema: application/json
required
version
string or null (Version)

If set, the latest version of the state is compared with this value and the operation will fail when the versions differ.

service_key
required
string (Service key)

To what service key to apply this change

required
object (New State)

The new state to replace the previous state with

Responses

Request samples

Content type
application/json
{
  • "version": "string",
  • "service_key": "string",
  • "new_state": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "restate_code": "string"
}

List service descriptors

List file descriptors for the service.

path Parameters
service
required
string

Fully qualified service name.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "restate_code": "string"
}

health

Health check

Check REST API Health.

Responses

openapi

OpenAPI specification

Responses

Response samples

Content type
application/json
{
  • "property1": "string",
  • "property2": "string"
}

subscription

Get subscription

Get subscription

path Parameters
subscription
required
string

Subscription identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "source": "string",
  • "sink": "string",
  • "options": {
    }
}

Delete subscription

Delete subscription.

path Parameters
subscription
required
string

Subscription identifier

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "restate_code": "string"
}

List subscriptions

List all subscriptions.

query Parameters
sink
string

Filter by the exact specified sink.

source
string

Filter by the exact specified source.

Responses

Response samples

Content type
application/json
{
  • "subscriptions": [
    ]
}

Create subscription

Create subscription.

Request Body schema: application/json
required
source
required
string (Identifier)

Source

Source uri. Accepted forms:

  • kafka://<cluster_name>/<topic_name>, e.g. service://my-cluster/my-topic
sink
required
string (Sink)

Sink uri. Accepted forms:

  • service://<service_name>/<method_name>, e.g. service://com.example.MySvc/MyMethod
object or null (Options)

Additional options to apply to the subscription.

Responses

Request samples

Content type
application/json
{
  • "source": "string",
  • "sink": "string",
  • "options": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "source": "string",
  • "sink": "string",
  • "options": {
    }
}

deployment

Get deployment descriptors

Get deployment Protobuf descriptor pool, serialized as protobuf type google.protobuf.FileDescriptorSet

path Parameters
deployment
required
string

Deployment identifier

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "restate_code": "string"
}

Get deployment

Get deployment metadata

path Parameters
deployment
required
string

Deployment identifier

Responses

Response samples

Content type
application/json
{
  • "arn": "string",
  • "assume_role_arn": "string",
  • "additional_headers": {
    },
  • "created_at": "string",
  • "id": "string",
  • "services": [
    ]
}

Delete deployment

Delete deployment. Currently it's supported to remove a deployment only using the force flag

path Parameters
deployment
required
string

Deployment identifier

query Parameters
force
boolean

If true, the deployment will be forcefully deleted. This might break in-flight invocations, use with caution.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "restate_code": "string"
}

List deployments

List all registered deployments.

Responses

Response samples

Content type
application/json
{
  • "deployments": [
    ]
}

Create deployment

Create deployment. Restate will invoke the endpoint to gather additional information required for registration, such as the services exposed by the deployment and their Protobuf descriptor. If the deployment is already registered, this method will fail unless force is set to true.

Request Body schema: application/json
required
Any of
uri
required
string (Uri)

Uri to use to discover/invoke the http deployment.

object or null (Additional headers)

Additional headers added to the discover/invoke requests to the deployment.

force
boolean (Force)
Default: true

If true, it will override, if existing, any deployment using the same uri. Beware that this can lead in-flight invocations to an unrecoverable error state.

By default, this is true but it might change in future to false.

See the versioning documentation for more information.

dry_run
boolean (Dry-run mode)
Default: false

If true, discovery will run but the deployment will not be registered. This is useful to see the impact of a new deployment before registering it.

Responses

Request samples

Content type
application/json
{
  • "arn": "string",
  • "assume_role_arn": "string",
  • "additional_headers": {
    },
  • "force": true,
  • "dry_run": false
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "services": [
    ]
}

invocation

Terminate an invocation

Terminate the given invocation. By default, an invocation is terminated by gracefully cancelling it. This ensures service state consistency. Alternatively, an invocation can be killed which does not guarantee consistency for service instance state, in-flight invocation to other services, etc.

path Parameters
invocation_id
required
string

Invocation identifier.

query Parameters
mode
string (TerminationMode)
Enum: "Cancel" "Kill"

If cancel, it will gracefully terminate the invocation. If kill, it will terminate the invocation with a hard stop.

Responses

Response samples

Content type
application/json
{
  • "message": "string",
  • "restate_code": "string"
}