For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.
Transactions (GET)
Retrieves information of all transactions.
Roles
Users in the following roles are authorized to perform this operation:
- mfpadmin
- mfpdeployer
- mfpmonitor
- mfpoperator
Method
GET
Path
/management-apis/2.0/runtimes/runtime-name/transactions
Example
https://www.example.com/mfpadmin/management-apis/2.0/runtimes/myruntime/transactions?bookmark=ABC&file=false&locale=de_DE&mode=errors&offset=0&orderBy=created&pageSize=100
Path Parameters
- runtime-name
- The name of the runtime. This is the context root of the runtime web application, without the leading slash.
Query Parameters
Query parameters are optional.
- bookmark
- The bookmark for the page if only a part of the list (a page) should be returned. If a bookmark is specified, the offset parameter is ignored.
- file
- If this parameter is set to true, the transactions are delivered as a compressed file (.zip). In this case, paging and mode parameters are ignored.
- locale
- The locale used for error messages.
- mode
- If this parameter is set to errors, only erroneous transactions are listed. Ootherwise, all transactions are listed.
- offset
- The offset from the beginning of the list if only a part of the list (a page) should be returned.
- orderBy
- The sort mode. By default, the elements are sorted in increasing order. If the sort mode starts with - (minus sign), the elements are sorted in decreasing order. Possible sort modes are: created, updated, type, status, user, server. The default sort mode is: created.
- pageSize
- The number of elements if only a part of the list (a page) should be returned. The default value is 100.
Produces
application/json, application/xml, text/xml, application/zip
Response
Details about the transactions.
JSON Example
{ "items" : [ { "appServerId" : "Tomcat", "description" : { }, "errors" : [ { "details" : "An internal error occured.", }, ... ], "id" : 1, "project" : { "name" : "myproject", }, "status" : "FAILURE", "timeCreated" : "2014-04-13T00:18:36.979Z", "timeUpdated" : "2014-04-14T00:18:36.979Z", "type" : "DELETE_ADAPTER", "userName" : "demouser", }, ... ], "nextPageBookmark" : "DEF", "pageNumber" : 2, "pageSize" : 100, "prevPageBookmark" : "ABC", "productVersion" : "8.0", "startIndex" : 0, "totalListSize" : 33, }
XML Example
<?xml version="1.0" encoding="UTF-8"?> <transactions nextPageBookmark="DEF" pageNumber="2" pageSize="100" prevPageBookmark="ABC" productVersion="8.0" startIndex="0" totalListSize="33"> <items> <item appServerId="Tomcat" id="1" status="FAILURE" timeCreated="2014-04-13T00:18:36.979Z" timeUpdated="2014-04-14T00:18:36.979Z" type="DELETE_ADAPTER" userName="demouser"> <description/> <errors> <error details="An internal error occured."/> ... </errors> <project name="myproject"/> </item> ... </items> </transactions>
Response Properties
The response has the following properties:
- items
- The array of transactions
- nextPageBookmark
- The bookmark of the next page if only one page of transactions is returned.
- pageNumber
- The page index if only one page of transactions is returned.
- pageSize
- The page size if only one page of transactions is returned.
- prevPageBookmark
- The bookmark of the previous page if only one page of transactions is returned.
- productVersion
- The exact product version.
- startIndex
- The start index in the total list if only one page of transactions is returned.
- totalListSize
- The total number of transactions.
The transaction has the following properties:
- appServerId
- The id of the web application server.
- description
- The details of the transaction, depending on the transaction type.
- errors
- The errors occured during the transacton.
- id
- The id of the transaction.
- project
- The current project.
- status
- The state of the transaction: PENDING, PREPARING, COMMITTING, REJECTING, SUCCESS, FAILURE, CANCELED. Synchronous transactions can have the state SUCCESS and FAILURE. Asynchronous transactions can also have the other states.
- timeCreated
- The date in ISO 8601 format when the adapter was created.
- timeUpdated
- The date in ISO 8601 format when the adapter was updated.
- type
- The type of the transaction.
- userName
- The user that initiated the transaction.
The error has the following properties:
- details
- The main error message.
The project has the following properties:
- name
- The name of the project, which is the context root of the runtime.
Errors
403The user is not authorized to call this service.404
The corresponding runtime is not found.500
An internal error occurred.
Parent topic: REST API for the MobileFirst Server administration service