Download OpenAPI specification:
phenix API
| kind | string Default: "all" Enum: "all" "topology" "scenario" "experiment" "image" "user" "role" limit configs to specified kind (defaults to all) |
{- "configs": [
- {
- "apiVersion": "string",
- "kind": "string",
- "metadata": {
- "name": "string",
- "annotations": {
- "property1": "string",
- "property2": "string"
}
}, - "spec": { }
}
]
}phenix config creation parameters
| apiVersion required | string |
| kind required | string |
required | object |
required | object |
{- "apiVersion": "string",
- "kind": "string",
- "metadata": {
- "name": "string",
- "annotations": {
- "property1": "string",
- "property2": "string"
}
}, - "spec": { }
}{- "message": "string",
- "cause": "string",
- "metadata": {
- "validation": "string",
- "validation-raw": "string",
- "property1": "string",
- "property2": "string"
}
}| kind required | string kind of phenix config to get |
| name required | string name of phenix config to get |
| Accept | string Default: application/json Enum: "application/json" "application/x-yaml" content format for response |
{- "apiVersion": "string",
- "kind": "string",
- "metadata": {
- "name": "string",
- "annotations": {
- "property1": "string",
- "property2": "string"
}
}, - "spec": { }
}Can also be used to rename a config by changing the name in the metadata portion of the config header and using the old name in the request path.
| kind required | string kind of phenix config to get |
| name required | string name of phenix config to get |
phenix config update parameters
| apiVersion required | string |
| kind required | string |
required | object |
required | object |
{- "apiVersion": "string",
- "kind": "string",
- "metadata": {
- "name": "string",
- "annotations": {
- "property1": "string",
- "property2": "string"
}
}, - "spec": { }
}{- "message": "string",
- "cause": "string",
- "metadata": {
- "validation": "string",
- "validation-raw": "string",
- "property1": "string",
- "property2": "string"
}
}| version required | string Enum: "v0" "v1" "v2" version of phenix config schema to get |
| Accept | string Default: application/json Enum: "application/json" "application/x-yaml" content format for response |
{ }the Workflow schema exists only in version v0
| kind required | string Enum: "topology" "scenario" "experiment" "image" "user" "role" "workflow" kind of phenix config schema to get |
| version required | string Enum: "v0" "v1" "v2" version of phenix config schema to get |
| Accept | string Default: application/json Enum: "application/json" "application/x-yaml" content format for response |
{ }| screenshot | string whether or not to include VM screenshots (value is size to grab) |
{- "experiments": [
- {
- "id": 0,
- "name": "string",
- "topology": "string",
- "apps": [
- "string"
], - "start_time": "2019-08-24T14:15:22Z",
- "running": true,
- "vm_count": 0,
- "vlan_min": 0,
- "vlan_max": 0,
- "vlan_count": 0,
- "vlans": [
- {
- "vlan": 0,
- "alias": "string"
}
], - "vms": {
- "vms": [
- {
- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}
]
}
}
]
}phenix experiment creation parameters
| name | string |
| topology | string |
| apps | Array of strings |
| vlan_min | integer |
| vlan_max | integer |
{- "name": "string",
- "topology": "string",
- "apps": [
- "string"
], - "vlan_min": 0,
- "vlan_max": 0
}{- "id": 0,
- "name": "string",
- "topology": "string",
- "apps": [
- "string"
], - "start_time": "2019-08-24T14:15:22Z",
- "running": true,
- "vm_count": 0,
- "vlan_min": 0,
- "vlan_max": 0,
- "vlan_count": 0,
- "vlans": [
- {
- "vlan": 0,
- "alias": "string"
}
], - "vms": {
- "vms": [
- {
- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}
]
}
}| name required | string name of phenix experiment to get |
| screenshot | string whether or not to include VM screenshots (value is size to grab) |
{- "id": 0,
- "name": "string",
- "topology": "string",
- "apps": [
- "string"
], - "start_time": "2019-08-24T14:15:22Z",
- "running": true,
- "vm_count": 0,
- "vlan_min": 0,
- "vlan_max": 0,
- "vlan_count": 0,
- "vlans": [
- {
- "vlan": 0,
- "alias": "string"
}
], - "vms": {
- "vms": [
- {
- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}
]
}
}| name required | string name of phenix experiment to start |
{- "id": 0,
- "name": "string",
- "topology": "string",
- "apps": [
- "string"
], - "start_time": "2019-08-24T14:15:22Z",
- "running": true,
- "vm_count": 0,
- "vlan_min": 0,
- "vlan_max": 0,
- "vlan_count": 0,
- "vlans": [
- {
- "vlan": 0,
- "alias": "string"
}
], - "vms": {
- "vms": [
- {
- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}
]
}
}| name required | string name of phenix experiment to stop |
{- "id": 0,
- "name": "string",
- "topology": "string",
- "apps": [
- "string"
], - "start_time": "2019-08-24T14:15:22Z",
- "running": true,
- "vm_count": 0,
- "vlan_min": 0,
- "vlan_max": 0,
- "vlan_count": 0,
- "vlans": [
- {
- "vlan": 0,
- "alias": "string"
}
], - "vms": {
- "vms": [
- {
- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}
]
}
}| name required | name name of phenix experiment to update schedule for |
scheduling algorithm to use
| algorithm | string |
{- "algorithm": "string"
}{- "schedule": [
- {
- "vm": "string",
- "host": "string",
- "auto_assigned": true
}
]
}| exp_name required | string name of phenix experiment to get VMs for |
| screenshot | string whether or not to include VM screenshots (value is size to grab) |
{- "vms": [
- {
- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}
]
}| exp_name required | string name of phenix experiment to get VM from |
| vm_name required | string name of phenix experiment VM to get |
| screenshot | string whether or not to include VM screenshots (value is size to grab) |
{- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}| exp_name required | string name of phenix experiment to modify |
| vm_name required | string name of phenix virtual machine to modify |
phenix virtual machine patch parameters
| host | string |
| cpus | integer |
| ram | integer |
| disk | string |
| dnb | boolean |
object |
{- "host": "string",
- "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "interface": {
- "index": 0,
- "vlan": 0
}
}{- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}| exp_name required | string name of phenix experiment |
| vm_name required | string name of phenix VM to start |
{- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}| exp_name required | string name of phenix experiment |
| vm_name required | string name of phenix VM to stop |
{- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}| exp_name required | string name of phenix experiment |
| vm_name required | string name of phenix VM to redeploy |
{- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}| exp_name required | string name of phenix experiment |
| vm_name required | string name of phenix virtual machine to get screenshot from |
| size | string size of screenshot to grab |
| base64 | boolean whether or not to base64 encode the screenshot image |
| exp_name required | string name of phenix experiment |
| vm_name required | string name of phenix VM to start capture on |
phenix VM packet capture parameters
| interface | integer |
| filename | string |
{- "interface": 0,
- "filename": "string"
}| exp_name required | string name of phenix experiment |
| vm_name required | string name of phenix VM to snapshot |
phenix VM snapshot parameters
| filename | string |
{- "filename": "string"
}| screenshot | string whether or not to include VM screenshots (value is size to grab) |
{- "vms": [
- {
- "id": 0,
- "name": "string",
- "experiment": "string",
- "host": "string",
- "ipv4": [
- "string"
], - "cpus": 0,
- "ram": 0,
- "disk": "string",
- "dnb": true,
- "networks": [
- "string"
], - "taps": [
- "string"
], - "captures": [
- {
- "vm": "string",
- "interface": 0,
- "filepath": "string"
}
], - "running": null,
- "uptime": 0.1,
- "screenshot": "string"
}
]
}Creates the topology config and stores the diagram on it. Does not create an experiment. Refused while an experiment built from a topology of the same name is running.
Builder topology and diagram
| name | string topology name; ignored by PUT /builder/topologies/{name} |
required | object generated topology spec |
| builderXML required | string mxGraph document for the diagram |
object VLAN alias to ID, used by the experiment endpoints only | |
| scenario | string scenario name, used by the experiment endpoints only |
{- "name": "string",
- "topology": {
- "nodes": [
- { }
]
}, - "builderXML": "string",
- "vlans": {
- "property1": 0,
- "property2": 0
}, - "scenario": "string"
}Writes only the spec and the diagram, leaving the rest of the stored config's metadata intact. Does not create or update an experiment.
| name required | string topology name, which takes precedence over the payload |
Builder topology and diagram
| name | string topology name; ignored by PUT /builder/topologies/{name} |
required | object generated topology spec |
| builderXML required | string mxGraph document for the diagram |
object VLAN alias to ID, used by the experiment endpoints only | |
| scenario | string scenario name, used by the experiment endpoints only |
{- "name": "string",
- "topology": {
- "nodes": [
- { }
]
}, - "builderXML": "string",
- "vlans": {
- "property1": 0,
- "property2": 0
}, - "scenario": "string"
}Builder topology, diagram, VLAN aliases, and scenario
| name | string topology name; ignored by PUT /builder/topologies/{name} |
required | object generated topology spec |
| builderXML required | string mxGraph document for the diagram |
object VLAN alias to ID, used by the experiment endpoints only | |
| scenario | string scenario name, used by the experiment endpoints only |
{- "name": "string",
- "topology": {
- "nodes": [
- { }
]
}, - "builderXML": "string",
- "vlans": {
- "property1": 0,
- "property2": 0
}, - "scenario": "string"
}Builder topology, diagram, VLAN aliases, and scenario
| name | string topology name; ignored by PUT /builder/topologies/{name} |
required | object generated topology spec |
| builderXML required | string mxGraph document for the diagram |
object VLAN alias to ID, used by the experiment endpoints only | |
| scenario | string scenario name, used by the experiment endpoints only |
{- "name": "string",
- "topology": {
- "nodes": [
- { }
]
}, - "builderXML": "string",
- "vlans": {
- "property1": 0,
- "property2": 0
}, - "scenario": "string"
}user details
| username | string |
| password | string |
| first_name | string |
| last_name | string |
| role_name | string |
| resource_names | Array of strings |
{- "username": "string",
- "password": "string",
- "first_name": "string",
- "last_name": "string",
- "role_name": "string",
- "resource_names": [
- "string"
]
}{- "username": "string",
- "first_name": "string",
- "last_name": "string",
- "role": {
- "name": "string",
- "resources": [
- "string"
], - "resource_names": [
- "string"
], - "verbs": [
- "string"
]
}
}{- "username": "string",
- "first_name": "string",
- "last_name": "string",
- "role": {
- "name": "string",
- "resources": [
- "string"
], - "resource_names": [
- "string"
], - "verbs": [
- "string"
]
}
}| username required | string username of user to modify |
user paramaters
| first_name | string |
| last_name | string |
| role_name | string |
| resource_names | Array of strings |
{- "first_name": "string",
- "last_name": "string",
- "role_name": "string",
- "resource_names": [
- "string"
]
}{- "username": "string",
- "first_name": "string",
- "last_name": "string",
- "role": {
- "name": "string",
- "resources": [
- "string"
], - "resource_names": [
- "string"
], - "verbs": [
- "string"
]
}
}user details
| username | string |
| password | string |
| first_name | string |
| last_name | string |
{- "username": "string",
- "password": "string",
- "first_name": "string",
- "last_name": "string"
}{- "username": "string",
- "first_name": "string",
- "last_name": "string",
- "role": "string",
- "token": "string"
}login credentials
| user | string |
| pass | string |
{- "user": "string",
- "pass": "string"
}{- "username": "string",
- "first_name": "string",
- "last_name": "string",
- "role": "string",
- "token": "string"
}Creates the config if it does not exist and updates it otherwise. The server sets BRANCH_NAME to the branch before parsing the body, so ${BRANCH_NAME} placeholders expand to the branch name. The Content-Type header must be exactly application/json or application/x-yaml. A Topology is also checked for a node an experiment could not use, such as a hostname used twice or a reserved hostname, before it is stored. With dryRun=true it runs the same checks, returns what it would do, and stores nothing.
| branch required | string workflow branch name |
| dryRun | boolean Default: false Checks the config as a real request would (placeholder expansion, the create or update decision, permissions, schema validation and, for a Topology, the node checks an experiment would fail on) and returns the result without storing the config or running config hooks. For an Experiment config only the schema is checked; the experiment checks run when the config is stored. The parameter's name is matched exactly, so a request that spells it differently is carried out for real. |
phenix config of a storable kind (e.g. Topology or Scenario)
| apiVersion required | string |
| kind required | string |
required | object |
required | object |
{- "apiVersion": "string",
- "kind": "string",
- "metadata": {
- "name": "string",
- "annotations": {
- "property1": "string",
- "property2": "string"
}
}, - "spec": { }
}{- "action": "create",
- "kind": "string",
- "name": "string",
- "dryRun": true,
- "pending": "string"
}Validates the workflow config against the Workflow schema, finds the experiment mapped to the branch (phenix.workflow/branch annotation), plans an action, and checks the default bridge and the topology and scenario the action would use, including a stored topology's nodes, as creating an experiment would. Only then does it create, update, start, or restart the experiment. A failed check leaves a running experiment running. With dryRun=true the plan is returned after the same checks, and nothing is changed; a dry run before a first deploy names the configs the caller will store with pending. The server sets BRANCH_NAME to the branch before parsing the body. The Content-Type header must be exactly application/json or application/x-yaml.
| branch required | string workflow branch name |
| tag | Array of strings key=value tag stored on the experiment, joined with commas into the phenix.workflow/tags annotation; repeat the parameter for more tags |
| dryRun | boolean Default: false Runs every check, a stored topology's node checks included, and returns the plan without creating, updating, starting, or stopping anything. The parameter's name is matched exactly, so a request that spells it differently is treated as a real apply, and refused with 400 when it also carries pending. |
| pending | Array of strings A config the caller will create or update before the real apply, usually the pending value a dry run of POST /workflow/configs/{branch} returned: |
| expect | string Enum: "none" "create" "createAndStart" "update" "updateAndStart" "restart" The action the caller expects, usually the action a previous dry run returned. If the server plans a different action, it returns 409 and changes nothing. It is checked on dry runs as well as real applies. A value that is not an action is a 400 with the message invalid expect value " |
phenix workflow config
| apiVersion required | string (API Version) Value: "phenix.sandia.gov/v0" The config API version; a workflow config is phenix.sandia.gov/v0. |
| kind required | string (Kind) Value: "Workflow" The config kind, which is always Workflow. |
| metadata | object or null (Metadata) Not read by the server; it is accepted so a workflow config has the same four top-level keys as every other phenix config, and so a later version can carry a name or annotations without a breaking change. |
required | object (Workflow Spec) What an apply may do and the experiment settings it sets; an empty spec applies every default. |
{- "apiVersion": "phenix.sandia.gov/v0",
- "kind": "Workflow",
- "metadata": { },
- "spec": {
- "auto": {
- "create": "string",
- "update": true,
- "restart": true
}, - "topology": "string",
- "scenario": "string",
- "vlans": {
- "property1": 0,
- "property2": 0
}, - "schedules": {
- "property1": "string",
- "property2": "string"
}, - "deployMode": "string",
- "useGREMesh": true,
- "vlanRange": {
- "min": 0,
- "max": 0
}, - "defaultBridge": "string"
}
}{- "action": "none",
- "experiment": "string",
- "reason": "string",
- "dryRun": true
}Server-side settings that clients read: every phenix CLI command fetches them over the unix socket when it starts, to inherit the server's bridge-mode, deploy-mode and use-gre-mesh, and the web UI's Experiments page reads them too. workflow-dry-run is true when POST /workflow/configs/{branch} and POST /workflow/apply/{branch} both support dryRun, and apply supports pending and expect. An older server ignores dryRun on /workflow/configs/{branch} and stores the config, so phenix workflow apply refuses servers without it.
{- "bridge-mode": "string",
- "deploy-mode": "string",
- "use-gre-mesh": true,
- "base-dir.injects": "string",
- "workflow-dry-run": true
}