ServerMania logo

Get List of Transactions with Log Output

To view the list of transactions with log output, use the following request:

GET /transactions.xml?detailed
GET /transactions.json?detailed

XML Request Example

curl -i -X GET http://test/transactions.xml?detailed -u user:password -H 'Accept: application/xml' -H 'Content-type: application/xml'

JSON Request Example

curl -i -X GET http://test/transactions.json?detailed -u user:password -H 'Accept: application/json' -H 'Content-type: application/json'

XML Output Example:

<transactions type="array">
  <transaction>
    <action>destroy_virtual_machine</action>
    <actor nil="true"/>
    <allowed_cancel type="boolean">true</allowed_cancel>
    <associated_object_id type="integer">7390</associated_object_id>
    <associated_object_type>VirtualMachine</associated_object_type>
    <created_at type="datetime">2015-03-19T18:04:44+03:00</created_at>
    <dependent_transaction_id nil="true"/>
    <id type="integer">101673</id>
    <identifier>o6fl3xq65pk699</identifier>
    <log_output># Logfile created on 2015-03-19 11:04:47 -0400 by logger.rb/41954
Remote Server: 192.168.7.41
Running: Storage API Call: PUT 192.168.7.41:8080/lvm/Datastore/qm20jnver40vmz/VDisk/pmh0g4dm6o2ypt "{\"state\":3}"
{"result"=&gt;"SUCCESS"}
Remote Server: 192.168.7.41
...
Running: rm -f /test/config/o6fl3xq65pk699*

Running: rm -f /test/firewall-rules/odamguc5ndbp44*

Running: rm -f /test/firewall-rules/ip6-odamguc5ndbp44*

</log_output>
    <params>
      <remote_ip>194.44.160.178</remote_ip>
      <destroy_msg>Destroy from Web interface</destroy_msg>
      <skip_notification type="boolean">true</skip_notification>
    </params>
    <parent_id type="integer">7390</parent_id>
    <parent_type>VirtualMachine</parent_type>
    <pid type="integer">9671</pid>
    <priority type="integer">10</priority>
    <start_after type="datetime">2015-03-19T18:04:44+03:00</start_after>
    <started_at type="datetime">2015-03-19T18:04:47+03:00</started_at>
    <status>complete</status>
    <updated_at type="datetime">2015-03-19T18:05:00+03:00</updated_at>
    <user_id type="integer">45</user_id>
  </transaction>
  ...
  <transaction>
    ...
  </transaction>
</transactions>

Where:

pid — external process ID

created_at — the time when the record of transaction was made in the database, in the [YYYY][MM][DD]T[hh][mm][ss]Z format

start_after — the time after which the transaction may start, in the [YYYY][MM][DD]T[hh][mm][ss]Z format

finished_at — reserved detail

updated_at — the date in the [YYYY][MM][DD]T[hh][mm][ss]Z format

actor — reserved detail

priority — priority of the transaction (reserved detail)

parent_type — the type of the transaction target (virtual server, disk or compute resource)

action — the type of transaction performed

id —transaction ID

user_id —ID of the user who performed the transaction

dependent_transaction_id —ID of the transaction that the current transaction depends on. For independent transactions this remains empty.

allowed_cancel —true if cancellation is allowed. Otherwise false.

parent_id — ID of the target VS, disk or compute resource

started_at —time when the transaction was started, in the [YYYY][MM][DD]T[hh][mm][ss]Z format

params —parameters of the transaction

log_output —an array with log output details

status —status of the transaction (complete, failed, pending, etc)

identifier —identifier of the virtual server