The option to embed API functionality within transformations requires no programming expertise and does not need to be hosted on a computer,
since the programs will exist within your xAssets database, and xAssets Engineers will write the scripts for you.
These scripts can still be triggered from an external program.
When using restful calls, all methods automatically route through to one of three interfaces:
One restful call is needed to get an authorization token, and this
is then used in subsequent restful calls to get data and run queries from the database. API get commands are
listed below.
Using restful calls, you explicitly call the web services interface as follows:
This section links to methods which are most commonly used.
Most tasks can be achieved within transformations, which can run on a schedule, a trigger, or be manually launched from any menu item. This includes
notifications, emailing reports, imports, exports, data manipulation and integration to other local and cloud applications.
Get operations are called using the API Interface Function named "CommandProcessor".
AssetAuditXMLGenerate a table of Asset History information for an asset or a list of assets
xAssets stores each instance of an asset record every time it is saved, so a full audit trail exists for the asset in a history table
Use this function to query the asset history. You can query for a specific field or for all fields, and over all time or over a specific time frame
Any number of Asset table fields can be added to the data
AssetCheckOutXMLGenerate the checkout records needed for checking out an asset or a list of assets
AssetDependencyXMLGenerate the records needed to display inter-asset dependencies.
Note that asset-dependency is also a supported type of query, so this API method is mainly of use to the system for editing AssetDependency records directly.
AssetDepreciationProfileXMLGenerate records for the depreciation profile of an asset. This data determines how the asset will be depreciated in each accounting book.
AssetServiceHistoryDepXMLGenerate XML for table AssetServiceHistoryDep
AssetServiceHistoryXMLGenerate XML for table AssetServiceHistory
AssetXMLThis function performs multiple actions
- Run a query and return the data as an XML table
- Create the XML template required for a new asset record
- Return the XML for a single asset or a group of assets, for use in editing or bulk update
Any query can be run, this function is the primary way to execute a query in an API call, and queries are not restricted to being based on the asset table, but can query any set of tables in the data model
All XML is represented in the standardized structure documentelement - records - fields
GetFieldLookupAllGet the default display type and lookup name for the field specified
GetLastAssetIDGet the Asset ID of the Asset that this user account last inspected or edited
GetParametersGet a list of parameters expected in order to run a query or a transformation
GetQueryVariantIndexGet the index of a query variant. Note that passing through "Base Query" will always return zero since by convention the base query of each query in the database is the 0th query variant
GetTimeZoneReturns the time zone for the currently logged on user.
This can be set in useroptions, or if not set, it will default to the time zone of the user's browser
LogonGUIDget the current logged in user's logon guid
LookupAssetHierarchyBuild an XML tree structure of the asset hierarchy determined by parent-child relationships
LookupAttributesLookup returns multiple attributes separated by a caret character, or otherwise the character specified in the third argument
This function should not be used for retrieving queryvariant data
LookupDescriptionReturns the value of a description field for a given ID in any lookup table
LookupIDReturns the value of an ID field for a given description or name in any lookup table
LookupQueryCSVExecute a query and return its data as a CSV string. In general this is used for queries that return a single field.
The values of the first field on each record are concatenated into a CSV string
LookupQueryXMLExecute a query and return its data as a XML string.
The values of each field on each record are concatenated into a XML string, each XML node under the document represents a record, and each XML node under each record represents a field
MainMenuCategoryXMLGenerate XML for table MainMenuCategory
MainMenuGroupXMLGenerate XML for table MainMenuGroup
MainMenuXMLGenerate XML for table MainMenu
TransactionTypePostRuleXMLGenerate XML for table TransactionTypePostRule
SaveSpecial operations are specialized save methods called using the Restful API Interface Function named "SaveSpecial".
SaveSpecial and Save operations are only available through the restful API from version 7.3.43 or later.
In order to save XML, which was retrieved from a table or API method, and then modified, use the WebSaveXML function.
SpecialAccountingProcessRun a period end depreciation calculation, create journals and close a financial accounting period
SpecialAssetCloneClone an Asset. This makes a "deep" copy of an asset record, such that all child information (specification data, devices, software, transactions, service plans, maintenance) is copied.
SpecialAssetMergeMerge a list of assets into a single asset. A single asset is selected as the merge target, and the remaining assets in the list are merged onto it
SpecialAssetPOAddAdd a list of asset records as line items to an existing purchase order
SpecialAssetUpdateUpdate any single-ID-keyed table in the data model, including the Asset table, with full support for coded business rules in the API layer
SpecialBulkUpdateBulk update a list of assets with a single piece of Asset XML.
This will update only fields with a value specified in the XML, if a field is blank in the XML or absent, it will not be updated in each Asset record.
SpecialDeleteRecordsDelete a list of records from a xAssets table, with full respect for coded API business rules
SpecialFixAssetDependenciesFor each asset which has dependencies in the system, this will self heal such that moves with parent fields are copied to each child asset
SpecialLogoffUserForcibly log one or more users off, thus freeing connections when the concurrent user licensing model is deployed
SpecialReportCreateRun any report into a PDF file, and return the path of the PDF file to the caller
SpecialResetUserReset a users permissions. This will execute all sql grant commands needed for the user to have operational access to the sql server database.
Although rarely needed, there are situations where the users grants are lost by sql server, this restores the users account where a permission denied error message was raised.
SpecialTaskPOAddAdd a list of task records as service cost items to an existing purchase order
The example programs provided include the most commonly used interface methods.