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:
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
GetAPITokenBuild a token that can be embedded in links or emails
When used, the token is routed to a.aspx or xpanel.aspx, it will authenticate the user and perform a specific action as specified in Arguments
GetAPITokenForRoleGenerate a role token that can be embedded in links or emails
When used, the token is routed to a.aspx or xpanel.aspx, it will authenticate the user and perform a specific action as specified in Arguments
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
GetLogonNonceGet the logon nonce which is required to make subsequent requests to the server
The nonce can only be retrieved once - subsequent calls will return an empty string (after the nonce time has been retrieved)
GetLogonNonceTimeGet the logon nonce date which is required by some clients to verify that the nonce was retrieved at the right request time
The nonce date can only be retrieved once, subsequent calls will return a constant zero date
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
GetUserGroupGet the usergroup for a given user. If the userID is not provided, the user group of the current user is returned
LogonGUIDGet the current logged in user's logon guid
LookupAssetHierarchyBuild an XML tree structure of the asset hierarchy determined by parent-child relationships
LookupAttributeDictionaryLookup returns multiple attributes as named value pairs in a dictionary
This function should not be used for retrieving queryvariant data
LookupAttributesLookup returns multiple attributes as named value pairs in a caret separated string
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
ReadAPITokenRead an API token file and return its contents as JSON
Only available to the asp.net web project
SaveFileSaves a file to the pcafiles or userfiles folder depending on its extension.
SaveSpecialSpecial case saves that require XML plus an instruction on
what to do with or how to save the xml
SaveXMLSave standard form XML back to the database. The XML tag signifies the table name (can be tagged for compression).
Only one table can be saved in a single call
One or more records can be saved in a single call
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.
SpecialAccountingPeriodCreateNewCreate a new accounting period set and financial year based on the XML supplied
This is used by the accountingperiodsetnew.aspx page to create a new accounting period set
and financial year, and then create the accounting periods for that financial year.
The XML is in the form of an AccountingPeriodSetNew XML document
SpecialAccountingProcessRun a period end depreciation calculation, create journals and close a financial accounting period
SpecialAccountingProcessBatchRun a special accounting process batch job to change the status of an accounting period set
This method is used to change the status of an accounting period set, either to move it forward or backward in the process.
The XML passed in contains the parameters for the operation, including the accounting period set ID, from and to statuses, and the direction of the operation.
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
SpecialAssetReceiveReceive assets into service.
This function processes the XML to receive assets and update their status accordingly.
SpecialAssetSaveSpecArraySave an array of specification values against an asset.
This is used for specification types 12 (text array), 13 (lookup array) and 15 (custodian array).
For Type 12, the value is a text string.
For Type 13, the value is a comma-separated list of SpecificationLookupIDs.
For Type 15, the value is a comma-separated list of CustodianIDs.
SpecialAssetServicePlanDeleteDelete service plans from the AssetServicePlan table.
This function processes an XML string containing service plan data and deletes the corresponding records.
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
SpecialAssetViewCloneClone an asset view.
This function creates a new AssetView based on an existing one, allowing for modifications such as renaming,
adding fields, changing groups, and sorting.
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.
SpecialBulkUpdateRemoveADPSRemove a list of Asset Depreciation Profiles from the database.
This is used to remove Asset Depreciation Profiles from a list of Assets.
It will remove the AssetDepreciationProfile records for the specified Asset IDs.
SpecialCostCentreSaveSave the CostCentre hierarchy.
This function processes an XML string representing a CostCentre hierarchy and saves it to the database.
It generates XML output for the saved CostCentres.
SpecialDeleteExpiredAPIKeysDelete expired API keys from the database.
This function removes API keys that have expired based on their expiration date.
SpecialDeleteRecordsDelete a list of records from a xAssets table, with full respect for coded API business rules
SpecialDepartmentSaveSave the Department hierarchy.
This function processes an XML string representing a Department hierarchy and saves it to the database.
It generates XML output for the saved Departments.
SpecialDepartmentSave2Save the Department hierarchy.
This function processes an XML string representing a Department hierarchy and saves it to the database.
It generates XML output for the saved Departments.
SpecialDeployCategoryBookDeploy the attributes of an existing category book record to all assets in that category and book.
Leaving out the CategoryID will apply to all Categories.
Leaving out the BookID will apply to all Books.
Leaving out both will update all assets in the system.
SpecialDeployServicePlanDeploy a service plan to assets based on the provided XML.
This function processes the XML to create service plans for assets, categories, or locations.
SpecialDepreciationDeployDeploy a special depreciation formula onto assets.
This function applies a depreciation profile to assets based on the provided XML configuration.
It can handle categories, books, and asset IDs, and applies the specified recovery period and depreciation type.
SpecialDisposeUnLicensedSpecial function to dispose of over-licensed assets.
This function checks for over-licensed assets and returns a list of them for disposal.
SpecialDocumentAttachAttach documents to a special table.
This function processes a list of Asset IDs and Document IDs, and attaches the documents to the specified table.
It generates XML output for the attached documents.
SpecialDocumentUsageDeleteDelete document object usage
This function processes a list of Asset IDs and deletes the associated document object usage records.
SpecialExchangeRateSaveSave special exchange rates.
This function saves exchange rates from an XML string, generating new IDs for each rate and setting temporary end dates.
It also updates existing rates if they match the start date and currency code.
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
SpecialGenerateWorkOrdersLaunchGenerate work orders based on the provided XML parameters.
This function processes the XML to generate work orders for assets, categories, or locations.
SpecialGetDocumentFromBlobGet a document from the BLOB storage.
This function retrieves a document from the BLOB storage based on the DocumentObjectID provided in the arguments.
It saves the document to a temporary location and returns the path to that document.
SpecialIncidentDeleteDelete incidents from the AssetServiceHistory table.
This function processes an XML string containing incident data and deletes the corresponding records.
It generates XML output for the deleted incidents.
SpecialIndexationSaveSave special indexation values for categories and financial years.
This function processes an XML string containing indexation data and saves it to the database.
It generates XML output for the saved indexation values.
SpecialInsuranceRemoveAssetRemove an asset from an insurance policy.
This function checks if the asset is attached to the specified insurance policy and removes it if found.
If the asset is not attached, it throws an exception.
SpecialLocationSaveSave the location hierarchy.
This function processes an XML string representing a location hierarchy and saves it to the database.
It generates XML output for the saved locations.
SpecialLocationSave2Save the location hierarchy.
This function processes an XML string representing a location hierarchy and saves it to the database.
It generates XML output for the saved locations.
SpecialLogoffUserForcibly log one or more users off, thus freeing connections when the concurrent user licensing model is deployed
SpecialMainMenuCategoryCopyCopy or move main menu categories to a new main menu group.
This function processes a list of main menu category IDs and copies or moves them to a specified main menu group.
It generates XML output for the copied or moved main menu categories and their items.
SpecialMainMenuCopyCopy or move main menu items to a new category.
This function processes a list of main menu IDs and copies or moves them to a specified main menu category.
It generates XML output for the copied or moved main menu items.
SpecialMainMenuGroupIDSet the main menu group for a user.
This function processes an XML string and sets the main menu group for the user.
SpecialPositionDepreciationSpecialPositionDepreciation is used to set the current accounting period for a given accounting period set
based on a specific date. This is typically used to position the depreciation calculation to a specific date
within the accounting period set. This should not be used on production instances as it will reset calculations and may invalidate accounts integrity.
SpecialRefreshCollectionServersRefresh the CollectionServer table based on the collection servers that are running.
This function updates the CollectionServer table to ensure it reflects the current state of collection servers.
SpecialRefreshCredentialPacksRefresh the CredentialPacks table based on the files in the system area.
This function checks for updates to credential packs and updates the database accordingly.
SpecialRemoveADPSRemove a list of Asset Depreciation Profile Sections from the database.
This is used to remove sections from a list of Asset Depreciation Profiles.
SpecialReportCreateRun any report into a PDF file, and return the path of the PDF file to the caller
SpecialReportSaveSave an existing report's XML to a file.
This function saves the provided XML string to a file named after the report name in the reports directory.
If the file does not have a ".xml" extension, it appends it.
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.
SpecialSaveCollectionServerSave a collection server's details.
This function saves or updates the details of a collection server in the database.
If the collection server does not exist, it creates a new entry; otherwise, it updates the existing one.
SpecialSaveLastSearchSave the last search XML for a subject.
This function updates the SavedSelect table with the provided search XML.
SpecialSetHomeCurrencySet the home currency for the asset system.
This function updates various asset-related tables to set the home currency code.
SpecialSpecificationCategoryCopyCopy a specification category from one category to another.
This function copies the specification categories from one source category to a target category.
It deletes existing categories in the target before copying the new ones.
SpecialSpecificationCategoryMakeSameMake a specification field have the same categories as another specification field.
This function copies the categories from one specification field to another.
It deletes existing categories in the target specification before copying the new ones.
SpecialSpecificationLookupListCopyCopy a specification lookup list from one specification to another.
This function copies the lookup list from one specification to another, optionally replacing the existing list.
It updates the SpecificationLookup table with the new entries.
SpecialTaskPOAddAdd a list of task records as service cost items to an existing purchase order
SpecialTransactionDeleteDelete special transactions created by the assetxml module.
This function deletes asset transactions with a subject ID of 2, which are typically created by the assetxml module.
SpecialUserGroupCloneClone a user group and its permissions.
This function creates a new user group by cloning an existing one, including its permissions.
SpecialUserGroupPermissionsGrant or deny access to a list of main menu items for a specific user group.
This function allows an administrator to set permissions for a user group on specified main menu items.
SpecialVerificationCommitSimpleCommit verification results.
This function processes a verification commit, updating asset records based on the provided XML and arguments.
SpecialVerificationHandHeldProcess special verification for handheld devices.
This function processes a verification for handheld devices, running a database transformation and handling exceptions.
SpecialVerificationRestartRestart a verification by deleting the existing verification records.
This function deletes the existing verification records for a given VerificationID and resets the status to "NEW".
SpecialVerificationResultsProcess special verification results from a scanner.
This function processes the verification results from a scanner, updating asset records and handling exceptions.
SpecialWorkCentreSaveSave the WorkCentre hierarchy.
This function processes an XML string representing a WorkCentre hierarchy and saves it to the database.
It generates XML output for the saved WorkCentres.
SpecialWorkCentreSave2Save the WorkCentre hierarchy.
This function processes an XML string representing a WorkCentre hierarchy and saves it to the database.
It generates XML output for the saved WorkCentres.
SpecialXCSRecompileRecompile the customer XCS script.
This function triggers a recompilation of the customer script by saving the XCS code.
The example programs provided include the most commonly used interface methods.