Skip to content

Set an alias

PUT
/v1/aliases/{name}
curl -X PUT -H "X-Api-Key: $KEY" -F "templateId=$ID" \
http://localhost:9027/v1/aliases/letter

Points an alias at a template. A new alias starts at version 1; pointing an existing one elsewhere adds a version, and the earlier ones stay. Every replica sees the change at once.

name
required
string

The alias, such as invoice

What PUT /v1/aliases/{name} takes, as JSON or a multipart form.

object
templateId
required

The template the alias names from now on: an id, or another alias.

string

Example

01966f3e-7c1a-7d3c-9a44-1d2f5a6b7c8d

A new version of an alias

Media typeapplication/json

An alias and the template it names now.

object
name
required
string
setAt
required

RFC 3339: when it was pointed at this template.

string
templateId
required
string
version
required

1 for the first template it named, counted since it was last deleted. Render an earlier one as name@version.

integer

Example

{
"name": "invoice"
}

A new alias

Media typeapplication/json

An alias and the template it names now.

object
name
required
string
setAt
required

RFC 3339: when it was pointed at this template.

string
templateId
required
string
version
required

1 for the first template it named, counted since it was last deleted. Render an earlier one as name@version.

integer

Example

{
"name": "invoice"
}

Not a usable name, or no template named

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}

Too many aliases, or versions of this one

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}

This caller has no such template

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}

RUSTICDOC_STORE is not set

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}

The store cannot be reached

Media typeapplication/json

The JSON body of every error response.

object
error
required

A stable, machine-readable kind.

string
message
required

What went wrong, for a person.

string

Example

{
"error": "invalid_request",
"message": "unknown step 'teleport'"
}