Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display
alltrue
styleh3
pageSuperb Cloud API

GET /transactions

Returns a list of transactions without log output

Sections:

Table of Contents
maxLevel4
minLevel2
includeResponse.*|JSON.*|XML.*|Explanation.*

Response Parameters

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 hypervisor)

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 hypervisor

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

JSON Request example

Code Block
languagebash
themeRDark
 curl -i -X GET <api_url>/transactions.json -u user:password -H 'Accept: application/json' -H 'Content-type: application/json'

JSON Response

Code Block
themeRDark
 [
    {
        "transaction": {
            "action": "update_firewall",
            "actor": null,
            "allowed_cancel": true,
            "associated_object_id": 511,
            "associated_object_type": "VirtualMachine",
            "created_at": "2015-08-28T19:05:45+00:00",
            "dependent_transaction_id": null,
            "id": 27614,
            "identifier": "c3yif8x6uufo2r",
            "params": {
                "initiator_id": 337
            },
            "parent_id": 513,
            "parent_type": "NetworkInterface",
            "pid": 15889,
            "priority": 10,
            "start_after": "2015-08-28T19:05:45+00:00",
            "started_at": "2015-08-28T19:05:48+00:00",
            "status": "complete",
            "updated_at": "2015-08-28T19:05:48+00:00",
            "user_id": 337
        }
    }
]

XML Request example

Code Block
languagebash
themeRDark
 curl -i -X GET <api_url>/transactions.xml -u user:password -H 'Accept: application/xml' -H 'Content-type: application/xml'

XML Response example

Code Block
languagexml
themeRDark
 <?xml version="1.0" encoding="UTF-8"?>
<transactions type="array">
  <transaction>
    <action>stop_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-19T17:33:58+03:00</created_at>
    <dependent_transaction_id nil="true"/>
    <id type="integer">101666</id>
    <identifier>o6fl3xq65pk699</identifier>
    <params>
      <shutdown_type type="symbol">soft</shutdown_type>
    </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-19T17:33:58+03:00</start_after>
    <started_at type="datetime">2015-03-19T17:33:59+03:00</started_at>
    <status>complete</status>
    <updated_at type="datetime">2015-03-19T17:34:10+03:00</updated_at>
    <user_id type="integer">45</user_id>
  </transaction>
  ...
  <transaction>
    <action>destroy_user</action>
    <actor nil="true"/>
    <allowed_cancel type="boolean">true</allowed_cancel>
    <associated_object_id nil="true"/>
    <associated_object_type nil="true"/>
    <created_at type="datetime">2015-03-19T15:12:19+03:00</created_at>
    <dependent_transaction_id nil="true"/>
    <id type="integer">101607</id>
    <identifier>kae7h1vxt2sp89</identifier>
    <params>
      <with_destroy type="boolean">false</with_destroy>
    </params>
    <parent_id type="integer">75</parent_id>
    <parent_type>User</parent_type>
    <pid type="integer">9671</pid>
    <priority type="integer">10</priority>
    <start_after type="datetime">2015-03-19T15:12:19+03:00</start_after>
    <started_at type="datetime">2015-03-19T15:12:20+03:00</started_at>
    <status>complete</status>
    <updated_at type="datetime">2015-03-19T15:16:33+03:00</updated_at>
    <user_id nil="true"/>
  </transaction>
</transactions>