Skip to content

How to Configure an Alias

Maggie Sullivan edited this page Jun 27, 2023 · 1 revision

Alfalfa Sites are generally controlled by using their id which is randomly generated upon their creation. However, in some cases it is important to be able to point external services to a specific site which may change over time. This can be accomplished through the use of aliases.

An Alias is a plaintext string which can be pointed to a Site's id.

Alias Use Example in alfalfa-client

Setting up an alias:

# Upload a model to alfalfa
site_id = client.submit(model_path)
# Set alias "target" to point to site_id
client.set_alias("target", site_id)

Getting site_id from an alias:

# Get site_id from alias "target"
site_id = client.get_alias("target")

Model Configuration

Openstudio

Tutorials

Guides

Reference

Modelica

Guides

Alfalfa Interaction

Tutorials

Guides

Reference

Explanation

Alfalfa Development

Guides

General

Reference

Explanation

Clone this wiki locally