Child pages
  • Add Publishing Rule
Skip to end of metadata
Go to start of metadata
POST /virtual_machines/:vm_id/publications.xml
POST /virtual_machines/:vm_id/publications.json

XML Request example

curl -i -X POST -u user:userpass -d '<publication><port>8081</port><protocol>TCP</protocol><use_customer_network_address>1</use_customer_network_address></publication>' http://onapp.test/virtual_machines/ozfdksfaf7esrx/publications.xml -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request example

curl -i -X POST -u user:userpass -d '{"publication":{"port":"8080", "protocol":"TCP", "use_customer_network_address":"1"}}' http://onapp.test/virtual_machines/ozfdksfaf7esrx/publications.json -H 'Accept: application/json' -H 'Content-type: application/json'

Where you have to specify the following parameters:

port - the port for which this rule is active

protocol - type of the protocol.

use_customer_network_address - set 1 to use customer network address, otherwise set 0


XML Response example

<?xml version="1.0" encoding="UTF-8"?>
<publication>
  <created_at type="datetime">2012-09-14T13:17:41+03:00</created_at>
  <id type="integer">5</id>
  <is_built type="boolean">false</is_built>
  <outside_ip_address_id nil="true"></outside_ip_address_id>
  <port type="integer">8081</port>
  <protocol>TCP</protocol>
  <rule_number type="integer">55</rule_number>
  <updated_at type="datetime">2012-09-14T13:17:41+03:00</updated_at>
  <virtual_machine_id type="integer">66</virtual_machine_id>
</publication>


#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels