Pass Virtual Image to /api/instances

Similar to how the UI allows the selection of any virtual image, we would like to allow the user to select a virtual image versus creating templates for every image. Is this possible? I could not locate the parameter in the API documents.

Using the CLI of instances add --curl --scrub, it gives the sample output of:

  -H "Authorization: Bearer ************" \
  -H "Content-Type: application/json" \
  -d '{
  "zoneId": 1,
  "instance": {
    "name": "testvm",
    "cloud": "vCenter",
    "site": {
      "id": 7
    },
    "type": "vmware",
    "instanceType": {
      "code": "vmware"
    },
    "layout": {
      "id": 1369,
      "code": "vmware-1.0-single"
    },
    "plan": {
      "id": 892,
      "code": "vm-1024",
      "name": "1 CPU, 1GB Memory"
    }
  },
  "config": {
    "resourcePoolId": "pool-3806",
    "template": 16628,
    "vmwareFolderId": "group-v136",
    "nestedVirtualization": "off",
    "createUser": true
  },
  "volumes": [
    {
      "id": -1,
      "rootVolume": true,
      "name": "root",
      "size": 10,
      "sizeId": null,
      "storageType": 1,
      "datastoreId": "auto"
    }
  ],
  "networkInterfaces": [
    {
      "network": {
        "id": "network-29629"
      },
      "networkInterfaceTypeId": 10,
      "ipMode": "dhcp"
    }
  ],
  "layoutSize": 1
}'

Specifically the Config: Template: ID value

@cbunge - Any idea if the same functionality exists in the TF provider? I looked and it doesn’t appear to have a template reference.