Page tree
Skip to end of metadata
Go to start of metadata

API Essentials

API Key Generation





Firewall Rules

Flex Cloud VM Control

Getting Started with Superb Flex Cloud

IP Addresses


Network Interfaces


SSH Keys


Test Route

Troubleshooting API Issues

Viewing Activity Logs

Virtual Server Operating Systems

Virtual Servers

VS Disks

POST /virtual_machines/:virtual_machine_id/recipe_joins 

Assigns a recipe to a virtual server


Request Parameters

recipe_join - an array of recipe join details:

  • recipe_id - ID of a recipe you want to assign
  • event_type - type of the event you want to assign the recipe to:

    • vm_provisioning - run the recipe during VS provisioning
    • vm_network_rebuild - run the recipe when rebuilding a network
    • vm_disk_add - run the recipe when adding a disk
    • vm_nic_add - run the recipe when adding a network interface
    • vm_disk_resize - run the recipe when resizing a VS disk
    • vm_resize - run the recipe when resizing a VS

Response Parameters

Returns recipe join details

JSON Request example

 curl -i -X POST -H "Accept: application/json" -H "Content-type:application/json" -d '{"recipe_join":{"recipe_id":"6", "event_type":"vm_provisioning"}}' -u user:userpass <api_url>/virtual_machines/:virtual_machine_id/recipe_joins.json

JSON Response

    "recipe_join": {
        "created_at": "2015-08-31T18:32:02+00:00",
        "event_type": "vm_provisioning",
        "id": 1,
        "recipe_id": 8,
        "target_join_id": 511,
        "target_join_type": "VirtualMachine",
        "updated_at": "2015-08-31T18:32:02+00:00"

XML Request example

 curl -i -X POST -H "Accept: application/xml" -H "Content-type:application/xml" -d '<recipe_join><recipe_id>6</recipe_id><event_type>vm_provisioning</event_type></recipe_join>' -u user:userpass <api_url>/virtual_machines/:virtual_machine_id/recipe_joins.xml
  • No labels