Skip to main content
POST
Create a router for a Neki branch

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organization
string
required

Organization name slug from list_organizations. Example: acme.

database
string
required

Database name slug from list_databases. Example: app-db.

branch
string
required

Branch name from list_branches. Example: main.

Body

application/json
name
string
required

The name of the router group. Letters, digits, dashes, and underscores; 1-64 characters; cannot start or end with a dash or underscore. new, primary, and replica are reserved. Clients connect through the group by appending it to the username, e.g. user|my-router.

router_size
string

The router size SKU, e.g. NKR_1. Defaults to the service's default size.

replicas_per_cell
integer

The number of router instances per availability zone. Defaults to the service's default count.

Response

Returns the created router

id
string
required

The ID of the router

name
string
required

The name of the router

default
boolean
required

Whether this is the default router

sku
object
required
router_size
string
required

The router size SKU name

replicas_per_cell
integer
required

The count of replicas in each cell

autoscaling
boolean
required

Whether the router scales horizontally within each cell

max_replicas_per_cell
integer | null
required

The maximum count of replicas in each cell when autoscaling

target_cpu_utilization
integer | null
required

The target average CPU utilization percentage when autoscaling, one of 40, 50, 60 or 70

state
enum<string>
required

The current state of the router

Available options:
pending,
applying,
ready
created_at
string
required

When the router was created

updated_at
string
required

When the router was last updated