BMC Track-It! Web Web Services API Guide Version 11.3
Legal Notices Copyright 1999, 2009 BMC Software, Inc. Copyright 1989-2014 Numara Software, Inc. BMC, BMC Software, and the BMC Software logo are the exclusive properties of BMC Software, Inc., are registered with the U.S. Patent and Trademark Office, and may be registered or pending registration in other countries. All other BMC trademarks, service marks, and logos may be registered or pending registration in the U.S. or in other countries. All other trademarks or registered trademarks are the property of their respective owners. Track-It! is the property of Numara Software, Inc. is registered with the U.S. Patent and Trademark Office, and may be registered or pending registration in other countries. All other Numara Software trademarks, service marks, and logos may be registered or pending registration in the U.S. or in other countries. All other trademarks or registered trademarks are the property of their respective owners. The information included in this documentation is the confidential information of BMC Software, Inc., its affiliates, or licensors. Your use of this information is subject to the terms and conditions of the applicable End User License agreement for the product and to the proprietary and restricted rights notices included in the product documentation. Numara Software, Inc. 2101 CityWest Blvd, Houston TX 77042-2827, USA 713 918 8800 Customer Support: 800 537 1813 (United States and Canada) or contact your local support center. Numara Software and BMC Software Confidential. i
Table of Contents Web Services API... 1 Web Services API Overview... 1 Help Desk: Work Orders... 1 Inventory: Assets... 1 Authenticate and Generate Access Token... 1 Web Services API Data Transfer Object Definitions... 2 Return-token Definitions... 2 Work Order DTO fields that can be set through the Create/Update API... 2 Work Order DTO fields that are returned by the Get Work Order API... 3 Note Object Definitions... 5 Inventory / Asset DTO API Fields... 5 Web Services API Error Codes... 7 Help Desk / Work Orders... 7 Inventory/Assets... 8 CORS (Cross Origin Resource Sharing) Support for Web APIs Overview... 9 APIs for Help Desk: Work Orders... 10 Get Work Order via Web API... 10 Update a Work Order via Web API... 10 Create a Work Order via Web API... 11 Change the Status of a Work Order via Web API... 11 Close a Work Order (Quick Close) via Web API... 12 Add a Note to a Work Order via Web API... 12 APIs for Inventory: Assets... 13 Audit Assets via Web API... 13 Create an Asset via Web API... 14 Get Assets by Asset number via Web API... 14 Get Assets by Asset ID via Web API... 15 Get Assets by Asset Name via Web API... 15 Get Assets by filters via Web API... 16 Update an Asset by Asset ID via Web API... 17 Update an Asset by Asset Number via Web API... 18 Numara Software and BMC Software Confidential. ii
Web Services API Web Services API Overview The Web Services API feature enables software developers to integrate Track-It! and other applications or custom utilities in your organization. The API can be used to perform various actions for Work Orders and assets such as creating Work Orders and searching for Work Orders created through other interfaces, and getting an asset by asset name or number. An XML JSON RESTful Web Service interface to BMC Track-It! is available for all platforms for integration with other applications. It supports.net 4.0. Functions are available for creating Issues, updating Issues and querying the database for Work Orders. Note: For Web Services API, a new virtual directory is automatically created by the Track-It! installer. For details, see the following section in the Track-It! 11.3 installation guide: Step 12: Install Track-It! Web (Optional) and Web Services API. The Track-It! Web API log is available in the following directory: C:\windows\temp. The Track-It! Web Service API supports the following actions. Click each link for API call details and examples: Login Authenticate the user and generate the access token Help Desk: Work Orders WorkOrder/Get Get a Work Order WorkOrder/Update Update a Work order WorkOrder/Create Create a Work Order WorkOrder/ChangeStatus Change a Work Order s Status WorkOrder/Close Close a Work Order (Quick Close) WorkOrder/AddNote Add a Note to a Work Order Inventory: Assets Asset/Audit Audit Assets via Web API Asset/Create Create an Asset Asset/Get Get Assets by Asset Number Asset/GetByID Get Assets by Asset ID Asset/GetByName Get Assets by Asset Name Asset/GetByFilters Get Assets by Filters Asset/Update Update an Asset by Asset ID Asset/Update Update an Asset by Asset Number Limitations: Event Policies and related notifications, as well as Skill Routing Policies are not applied when creating Work Orders via Web API. Windows authentication login is not supported. The Technician user name and password is the same as the Technician Client. Work Order fields will not be automatically populated, for example, an asset associated with a requestor or a callback number. Validation will not be applied for s in integer fields, for example, Hours and Charges in the billing information for a Work Order. Validation for character lengths for text fields will not be applied, for example, the Subject field in a Work Order. See also: Web Services API Data Transfer Object Definitions and Web Services API Error Codes Authenticate and Generate Access Token API: Login Numara Software and BMC Software Confidential. 1
Type of call: GET <none> Request body: <none> 1. Username: Specify a Track-It! Technician's login ID. 2. Pwd: Specify the Track-It! Technician's password in plain text. Request returns : o JSON object containing the encrypted token in apikey. For details refer to Return-token definitions. o This token is required to be passed as a Request header in all subsequent API calls. URL: http(s)://<machine_name>/trackitwebapi/api/login?username=ben&pwd= Note: This is a mandatory first call that authenticates the user and gets the access token. All of the calls described in the following topics are to pass the token returned by this call in the Request header. The token validity can vary between 1 minute and 8 hours and is controlled by the TrackItAPIKeyValidity configuration in the Track-It! Web web.config file. Default validity is 60 minutes. All of the following API calls expect the apikey to be sent as a Request Header. Web Services API Data Transfer Object Definitions Return-token Definitions Name Success Apikey Value true / false Work Order DTO fields that can be set through the Create/Update API Name Id AssetName AssignedTechnician Category Location Department Hours Charge Priority RequestorName StatusName SubType Summary Type UdfText1 UdfText2 UdfText3 Value Numeric Asset name - string Technician Name - string Numeric Numeric Numeric Requestor Name - string Status - string Numara Software and BMC Software Confidential. 2
UdfText4 UdfText5 UdfText6 UdfDate1 UdfDate2 UdfDate3 UdfDate4 UdfNumeric UdfInt UdfLookup1 UdfLookup2 UdfLookup3 UdfLookup4 UdfLookup5 UdfLookup6 UdfLookup7 UdfLookup8 ParentIncidentId NotificationBccAddress NotificationCcAddress RequestorPhoneNumber Numeric Numeric Numeric Email address string Email address string Work Order DTO fields that are returned by the Get Work Order API Name Id AssetName AssignedTechnician TechnicianEmailAddress TechnicianSmsEmailAddress Category ResponseDate RespondedDate RespondedBy AssignedDate RequestorEnteredDate EnteredCompletionDate ExpectedCompletionDate HasSkillRoutingExecuted Location Department Hours Charge IsClosed Priority Value Numeric Asset name - string Technician Name - string Email address Email address true / false Numeric Numeric true / false Numeric Numara Software and BMC Software Confidential. 3
RequestorName StatusName SubType Summary Type UdfText1 UdfText2 UdfText3 UdfText4 UdfText5 UdfText6 UdfDate1 UdfDate2 UdfDate3 UdfDate4 UdfNumeric UdfInt UdfLookup1 UdfLookup2 UdfLookup3 UdfLookup4 UdfLookup5 UdfLookup6 UdfLookup7 UdfLookup8 AttachmentCount AssignmentCount IsAssignment IsIncident IsIncidentTemplate IsAssignmentTemplate ParentIncidentId WasLocked IsReadOnly IsClockStopped Notes NotificationBccAddress NotificationCcAddress RequestorPhoneNumber Requestor Name - string Status - string Numeric Numeric Numeric Numeric true / false true / false true / false true / false Numeric true / false true / false true / false List of <Note Object>. For details, see Note Object Definitions, below. Email address string Email address string Numara Software and BMC Software Confidential. 4
Note Object Definitions Name Value CreatedBy No CreatedDate No IsPrivate true / false FullText WorkOrderNoteTypeId No IsTextMessage true / false No RecipientType No WorkEfforts Numeric No IsNoteTruncated true / false No MessageType No Inventory / Asset DTO API Fields Can be set through AddNote API?(/No) NOTE: In a Create/Update asset call, the sequence where multiple fields are specified in the Request Body will decide the s in the final asset record created/updated. Can be set through Name Value Create/Update Asset Web API?(/No) Additional Information ID Numeric No Identifier Name The Asset Number is automatically generated and can be viewed from the grid by adding Asset Number. The maximum number of characters for this field is 40. If the ID and Name show the same s on the Inventory Grid the GetByName API call may not return that asset if the Assets Detail > Hardware > Name is blank and the ID is in Name column. This is the ID field on the Asset form. If present, the Asset Name on the Inventory Home grid is obtained from the Hardware tab on the Asset form. This will only Numara Software and BMC Software Confidential. 5
be updated with an Update call if the Asset Type is either a non-audited Computer or a non- Computer. It is not allowed to change an Asset Name with an Update API call if the Asset Type is computer and already audited. TypeName UserName Location Department DepartmentNumber Numeric UdfText1 UdfText2 UdfText3 UdfText4 UdfText5 UdfText6 ModemNumber Note - This cannot be done for an Update call. If the user record has Location ad department specified, the department, department number, location s will be populated in the created/updated asset Department and Department Number are linked fields so it is possible to run Create/Update calls with only one of these fields. The Location field may be changed depending on the order of the inputs in an Update call. See the information given in the Department field. Numara Software and BMC Software Confidential. 6
ModemExtension Network Description CompanyAssetUniqueId CompanyAssetUniqueIdScanDate Date & Time IsComputer IsRetired No No true \ false No true \ false No State Numeric No A return of 0 means the Asset is Active, but a return of 1 means to Asset is Retired. Web Services API Error Codes Error Code Error Scenario when this error is returned Web.Lifecycle.005 Login failed for user '<UserName>' If the login name and/or password provided for generating the token is invalid. Web.Lifecycle.003 Web.Lifecycle.004 You are not authorized to consume this API without a valid Track-It! Web Services API token. Please contact your administrator for further details. Your session is no longer valid. Please obtain a new Track-It! Web Services API token again by sending a login request. When Web API calls are made without a valid TrackIAPIKey When the TrackItAPIKey is no longer valid. The token has to be regenerated in this case. Web.Lifecycle.006 Origin or Method is not allowed. When a CORS call is invoked and the Origin from where the call is generated is not specified in the list of allowed origins for CORS in web.config. Or, the requested Method (e.g. GET/POST) is not in the allowed method list in web.config. Help Desk / Work Orders Business.HelpDesk.028 WorkOrder could not be locked. Locked by <USERNAME>. Business.HelpDesk.046 Work Order <WorkOrderId> could not be found. When trying to update a work order through the AddNote/Update/ChangeStatus/Close API calls, if the work order is locked When trying to update a work order through the AddNote/Update/ChangeStatus/Close API calls, if the wrong work order ID is provided Web.HelpDesk.008 Error changing Work Order status. When there is an error changing the status through the ChangeStatus API, Numara Software and BMC Software Confidential. 7
Web.HelpDesk.062 Web.HelpDesk.064 Web.HelpDesk.065 Web.HelpDesk.066 Web.HelpDesk.067 Web.HelpDesk.068 Work Order could not be created. Please provide a for Summary. User lacks permission to create Work Order User lacks permission to modify Work Order User lacks permission to view the Work Order Value provided for field <FieldName> is in incorrect format. Work Order could not be created or updated The operation failed. It might be due to any one of the following reasons. Please check the request and try again. when the status name provided in the request body is invalid When trying to create a Work Order with no provided for Summary When the user trying to create a Work Order through the API does not have rights to create a Work Order When the user trying to update a Work Order through the Close/ChangeStatus/Update/AddNote APIs does not have rights to modify a Work Order When the user trying to retrieve a Work Order through Get API does not have rights to view a Work Order When a call is made to the Update/Create/AddNote APIs, this error will be retuned if the data for a field is not in the correct format. For example, if an alphanumeric string if provided for a integer field like ParentIncidentId When either no data is provided or the data is wrongly formatted in the Create/AddNote/Update/ChangeStatus Web API calls Web.HelpDesk.069 Inventory/Assets 1. Field name(s) provided for the current operation is not valid 2. Content-type specified is not 'text/json' or 'application/json' 3. Request body is either not present or is invalid Note could not be added to the Work Order. Please provide a for FullText When trying to add a note to a work Order, if no data is provided for the FullText field. FullText is mandatory when adding a note through web service API Web.Inventory.058 Web.Inventory.060 Web.Inventory.061 Web.Inventory.062 Insufficient permission to create an Asset. Insufficient permission to view an Asset. The operation failed because the Asset ID was not provided. The operation failed because the Asset ID provided matches multiple records. When the user trying to update an Asset through Update API does not have rights to update an Asset When the user trying to view an Asset through Get API does not have rights to view an Asset When the user trying to view an Asset through Get API does not provide any Asset ID in the request When the user trying to update Asset through Update API by providing Asset ID and that Asset ID has multiple matching records in the system Web.Inventory.063 No matching records found for the When there are no matching records Numara Software and BMC Software Confidential. 8
Web.Inventory.064 Web.Inventory.065 Web.Inventory.066 Web.Inventory.067 Web.Inventory.068 Web.Inventory.069 Web.Inventory.070 Web.Inventory.071 Web.Inventory.072 <AssetID> provided. This action cannot be performed because the Asset is retired. Asset could not be locked. Locked by <USERNAME>. found for different API calls (e.g. Get, Update, Audit etc.) by supplying an Asset ID When the user trying to update an Asset by Asset ID through Update API but the Asset is retired in the system When the user trying to update an Asset by Asset ID through Update API but the Asset is locked by some user in the system The operation failed. This might be When either no data is provided or the due to any one of the following data is wrongly formatted in the reasons. Please check the request Audit/GetByFilters Web API calls and try again. 1. The field name(s) provided for the current operation is not valid. 2. The content type specified is not ""text/json"" or ""application/json"". 3. The request body is either not present or is invalid. No matching records found for When there are no matching records provided filters. found for GetByFilters API call Following non-computer type Assets: [ <Asset IDs> ] are not queued for Audit. Asset could not be created. Provide a for the Type and ID. Value provided for field <FIELDNAME> is incorrectly formatted. The Asset could not be created or updated. When the user trying to invoke audit for non-computer type assets When the user trying to create an asset without supplying mandatory field s in Create Web API call When the user trying to create/update an asset with improperly formatted field data through Create/Update Web API call Asset could not be created. The When the user trying to create an asset provided for AssetType: with improperly formatted Asset Type <AssetType> is not matching any through Create Web API call Asset Type or matches multiple Asset Types." + "To resolve this, you can provide the Asset Type in the following format: Parent_Type > Sub_Type > Sub_Type The number of assets for auditing When the user trying to audit more than exceeded the limit of 500 per API call. 500 Asset IDs in a single Audit Web API call CORS (Cross Origin Resource Sharing) Support for Web APIs Overview CORS (Cross Origin Resource Sharing) support is added for Track-It! Web API calls if any browser based application (which is not hosted on the same server as Track-It! web server) is trying to invoke Track-It! Web API from within XMLHttpRequest/AJAX request. The following keys are added in Web.config for supporting CORS in Track-It!: 1. AllowOriginsForCORS Numara Software and BMC Software Confidential. 9
Comma separated string to represent allowed origins for allowing CORS (examples http://myapplication.com or http://mysite.com) 2. AllowMethodsForCORS Comma separated string to represent methods allowed for CORS (examples GET or POST) If you want to test CORS Support, see this Knowledge Base article: http://support.numarasoftware.com/support/articles.asp?id=7420&mode=detail APIs for Help Desk: Work Orders Get Work Order via Web API API: workorder/get Type of call: GET TrackItAPIKey: apikey received through the Login API call. Request body: <none> o WO#: Specify Work Order ID Request returns : Work Order object in JSON format. For details refer to Work_Order_DTO_fields_that_are_returned_by_the_Get_Work_Order_API. URL: http(s)://<machine_name>/trackitwebapi/api/workorder/get/<wo#> Important: If the WO# is passed as 0, then the API will return an empty JSON object representing the entire WO object and all available fields. This JSON object can then be used for consecutive call as appropriate. http(s)://<machine_name>/trackitwebapi/api/workorder/get/341 This will return the work order object with the list of fields and their corresponding s for work order 341. TrackItAPIKey "ExPqpLF79Zi+vHZJIXZOGBSQVPKXlFVOfmQzMyfS7SGYJolrDAf3/LZR1qm9X+2OVY60OlEuUYOYafl c" {"success":"true","data":{"assignedtechnician":"larry Daniels","Id":"3411",","IsClosed":"False","Priority":"3- Medium","StatusName":"Open,"Summary":"Microsoft Office Outlook Test Message",.}} Update a Work Order via Web API Note: The Hours and Charge fields will not get updated through an Update call in Web Service API if the work order timer is enabled. API: workorder/update Type of call: POST o TrackItAPIKey: apikey received through the Login API call. o Request body: Name pairs of fields and field. o WO#: Specify Work Order ID Request returns : Work Order object in JSON format. For details refer to Work Order DTO fields that can be set through the Create/Update API. URL: http(s)://<machine_name>/trackitwebapi/api/workorder/update/<wo#> http(s)://<machine_name>/trackitwebapi/api/workorder/update/4850 Numara Software and BMC Software Confidential. 10
TrackItAPIKey Request-body: { "StatusName":"Open","Summary":"Work Order created by Web API ","UdfDate2":"9/18/2013 6:20:03 PM", "AssignedTechnician":"Larry Daniels", "ParentIncidentId":19000, } {"success":"true","data":{"message":"work Order 4850 updated successfully","data":{ ID : 4850, "Status":"Open","Summary":"Issues With Exchange Server","UdfDate2":"9/18/2013 6:20:03 PM", "AssignedTechnician":"Larry Daniels", "ParentIncidentId":350, }}} Create a Work Order via Web API Note: The Hours and Charge fields will not get updated through an Update call in Web Service API if the work order timer is enabled. API: workorder/create Type of call: POST o TrackItAPIKey: apikey received through the Login API call. o Request body: Name pairs of fields and respective s. <none> Request returns : Work Oder object in JSON format. For details refer to Work Order DTO fields that can be set through the Create/Update API. URL: http(s)://<machine_name>/trackitwebapi/api/workorder/create Important: A for the Summary field is mandatory when trying to create a Work Order through the Web Service API. http(s)://<machine_name>/trackitwebapi/api/workorder/create TrackItAPIKey : Request-body: { "StatusName":"Open","Summary":"Work Order created by Web API ","UdfDate2":"9/18/2013 6:20:03 PM", "AssignedTechnician":"Larry Daniels", "ParentIncidentId":19000, } {"success":"true","data":{"message":"successfully created new Work Order with Id 19888","","data":{ ID : 19888, "Status":"Open","Summary":"Issues With Exchange Server","UdfDate2":"9/18/2013 6:20:03 PM", "AssignedTechnician":"Larry Daniels", "ParentIncidentId":19000, }}} Change the Status of a Work Order via Web API API: workorder/changestatus Type of call: POST o TrackItAPIKey: apikey received through the Login API call o Request body: Name of the status in double quotes o WO#: Specify Work Order ID Numara Software and BMC Software Confidential. 11
Request returns : Work Order object in JSON format. For details refer to Work Order DTO fields that can be set through the Create/Update API. URL: http(s)://<machine_name>/trackitwebapi/api/workorder/changestatus/<wo#> http(s)://<machine_name>/trackitwebapi/api/workorder/changestatus/345 TrackItAPIKey : Request-body: "Escalated" {"success":"true","data":{"message":"work Order 345 updated successfully","data":{ ID : 345, "Status":"Escalated","Summary":"Issues With Exchange Server","UdfDate2":"9/18/2013 6:20:03 PM", "AssignedTechnician":"Larry Daniels", "ParentIncidentId":350, }}} Close a Work Order (Quick Close) via Web API API: workorder/close Type of call: POST o TrackItAPIKey: apikey received through the Login API call o Request body: resolution note text (optional) o WO#: Specify Work Order ID Request returns : Work Order object in JSON format. For details refer to Work Order DTO fields that can be set through the Create/Update API. URL: http(s)://<machine_name>/trackitwebapi/api/workorder/close/<wo#> http(s)://<machine_name>/trackitwebapi/api/workorder/close/65988 TrackItAPIKey : Request-body: Closing the Work Order resolved by applying the latest patch {"success":"true","data":{"message":"work Order 65988 updated successfully","data":{ ID : 65988, "Status":"Closed","Summary":"Issues With Exchange Server","UdfDate2":"9/18/2013 6:20:03 PM", "AssignedTechnician":"Larry Daniels", "ParentIncidentId":350, }}} Add a Note to a Work Order via Web API API: workorder/addnote Type of call: POST o TrackItAPIKey: apikey received through the Login API call o Request body: Name pairs of fields and field s from notes object. Numara Software and BMC Software Confidential. 12
o Note: Only two fields are recognized: IsPrivate and Fulltext. NoteType is defaulted to Technician Note and Activity Code is set to blank. o WO#: Specify Work Order ID Request returns : Work Order object in JSON format along with request status code. For details refer to Work Order DTO fields that can be set through the Create/Update API. URL: http(s)://<machine_name>/trackitwebapi/api/workorder/addnote/<wo#> Important: A for the FullText field is mandatory when trying to add a note to a Work Order through Web Service API. http(s)://<machine_name>/trackitwebapi/api/workorder/addnote/455 TrackItAPIKey : Request-body: { IsPrivate : true, FullText : This seems to be an issue with the installer, investigation is on. } {"success":"true","data":{"message":"work Order 455 updated successfully","data":{ ID : 455, "Status":"Open","Summary":"Issues With Exchange Server","UdfDate2":"9/18/2013 6:20:03 PM", "AssignedTechnician":"Larry Daniels", "ParentIncidentId":350, }}} APIs for Inventory: Assets Audit Assets via Web API API: asset/audit Type of call: POST TrackItAPIKey: apikey received through the Login API call Request body: Comma separated list of Asset IDs None Request returns : A success message is returned if an Asset is queued for Auditing, and a failure message is returned in case of failure. Note: If the requested list includes non-computer/retired asset types, then a message with list of Assets which are not queued for auditing is returned. URL: http(s)://<machine_name>/trackitwebapi/api/asset/audit http(s)://<machine_name>/trackitwebapi/api/asset/audit TrackItAPIKey: Request-body: 101, 102, 103 Numara Software and BMC Software Confidential. 13
{"success":"true","data":{"message":"assets successfully queued for Auditing."}} Create an Asset via Web API API: asset/create Type of call: POST o TrackItAPIKey: apikey received through the Login API call o Request body: { "Identifier":, "Name":, "TypeName":, "UserName":, "Location":, "Department":, "DepartmentNumber":, "UdfText1":, "UdfText2":, "UdfText3":, "UdfText4":, "UdfText5":, "UdfText6":, "ModemNumber":, "ModemExtension":, "Network":, "Description": } o None Request returns : A success message is returned with all the fields of an Asset record including any fields that were ignored because of incorrect s. A failure message is returned in case of failure. URL: http(s)://<machine_name>/trackitwebapi/api/asset/create http(s)://<machine_name>/trackitwebapi/api/asset/create TrackItAPIKey: Request-body: {"Description": "Company Laptop 01","Username":"Ashlee Owens", "Department": "Information Technology ", "Location": "Tampa", UdfText1 : Category_1 } {"success":"true","data":{"message":"asset cpthook101 created successfully.","ignoredfields":"none", "reasonforignoringfieldvalues":"some fields were ignored due to any one of the following reasons:\r\n1. These fields contained invalid data OR \r\n2. The asset was audited and these fields cannot be updated on an audited asset.\r\n\r\nto know the list of ignored fields, please refer to the \"ignoredfields\" in the response data.", "data{"id":"101","identifier":"cpthook101","name":"cpthook","typename":"computer","location":"tampa"," Department":"Information Technology","DepartmentNumber":"500","UdfText1":"Category_1","UdfText2":"","UdfText3":"","UdfText4": "","UdfText5":"","UdfText6":"","ModemNumber":"","ModemExtension":"","Network":"","Description":"CptHo ok was first discovered via an IP Scan. It was then transferred to Inventory. Next, the Product Number and Serial Number were scanned from the side of the unit. This was synchronized into the Barcode assets window. Lastly, Match to Inventory was selected and the cpthook from the IP scan was selected. After Apply was clicked, the barcode info was added to the cpthook record in Inventory. ","CompanyAssetUniqueId":"DS123S#ABA","CompanyAssetUniqueIdScanDate":"7/10/2006 10:38:09 AM","IsComputer":"True","State":"0","IsRetired":"False","UserName":"Gloria Wright"}}} Get Assets by Asset number via Web API API: asset/get/<assetnumber> Type of call: GET TrackItAPIKey: apikey received through the Login API call Request body: None None Numara Software and BMC Software Confidential. 14
Request returns : A success message with asset information found by the asset number is returned, and a failure message is returned in case of failure. Note: If the Asset Number provided is zero, a dummy asset is returned to use as reference to get keys to be used in Create and Update Web API calls. URL: http(s)://<machine_name>/trackitwebapi/api/asset/get/<assetnumber> http(s)://<machine_name>/trackitwebapi/api/asset/get/0 TrackItAPIKey: Request-body: {"success":"true","data":{"id":"0","identifier":"","name":"","typename":"","location":"","department":"","dep artmentnumber":"","udftext1":"","udftext2":"","udftext3":"","udftext4":"","udftext5":"","udftext6":"","mo demnumber":"","modemextension":"","network":"","description":"","companyassetuniqueid":"","compan yassetuniqueidscandate":"","iscomputer":"false","state":"0","isretired":"false","username":""}} Get Assets by Asset ID via Web API API: asset/getbyid/<assetid> Type of call: GET TrackItAPIKey: apikey received through the Login API call Request body: None None Request returns : A success message with list of assets found by the asset id is returned, and a failure message is returned in case of failure. URL: http(s)://<machine_name>/trackitwebapi/api/asset/getbyid/<assetid> http(s)://<machine_name>/trackitwebapi/api/asset/getbyid/101 TrackItAPIKey: Request-body: {"success":"true","data":{"assets":{"asset1":{"id":"101","identifier":"101","name":"cpthook","typename":"c omputer","location":"tampa","department":"information Technology","DepartmentNumber":"500","UdfText1":"","UdfText2":"","UdfText3":"","UdfText4":"","UdfText5 ":"","UdfText6":"","ModemNumber":"","ModemExtension":"","Network":"","Description":"CptHook was first discovered via an IP Scan. It was then transfered to Inventory. Next, the Product Number and Serial Number were scanned from the side of the unit. This was synchronized into the Barcode assets window. Lastly, Match to Inventory was selected and the cpthook from the IP scan was selected. After Apply was clicked, the barcode info was added to the cpthook record in Inventory. ","CompanyAssetUniqueId":"DS123S#ABA","CompanyAssetUniqueIdScanDate":"7/10/2006 10:38:09 AM","IsComputer":"True","State":"0","IsRetired":"False","UserName":"Gloria Wright"}}}} Get Assets by Asset Name via Web API API: asset/getbyname/<assetname> Numara Software and BMC Software Confidential. 15
Type of call: GET TrackItAPIKey: apikey received through the Login API call Request body: None None Request returns : A success message with list of assets found by the asset name is returned, and a failure message is returned in case of failure. URL: http(s)://<machine_name>/trackitwebapi/api/asset/getbyname/<assetname> http(s)://<machine_name>/trackitwebapi/api/asset/getbyname/101 TrackItAPIKey: Request-body: {"success":"true","data":{"assets":{"asset1":{"id":"101","identifier":"101","name":"cpthook","typename":"c omputer","location":"tampa","department":"information Technology","DepartmentNumber":"500","UdfText1":"","UdfText2":"","UdfText3":"","UdfText4":"","UdfText5 ":"","UdfText6":"","ModemNumber":"","ModemExtension":"","Network":"","Description":"CptHook was first discovered via an IP Scan. It was then transfered to Inventory. Next, the Product Number and Serial Number were scanned from the side of the unit. This was synchronized into the Barcode assets window. Lastly, Match to Inventory was selected and the cpthook from the IP scan was selected. After Apply was clicked, the barcode info was added to the cpthook record in Inventory. ","CompanyAssetUniqueId":"DS123S#ABA","CompanyAssetUniqueIdScanDate":"7/10/2006 10:38:09 AM","IsComputer":"True","State":"0","IsRetired":"False","UserName":"Gloria Wright"}}}} Get Assets by filters via Web API API: asset/getbyfilters Type of call: POST o TrackItAPIKey: apikey received through the Login API call o Request body: {"ModemNumber":"","ModemExtension":"","Name":"","Identifier":"","Id":"","CompanyAsset UniqueId":"","UdfText1":"", "UdfText2":"", UdfText3":"","UdfText4":"", "UdfText5":"","UdfText6":""} None Request returns : A success message with list of assets found by the provided filters is returned, and a failure message is returned in case of failure. Note: In order to obtain more accurate results, you can provide more filters with appropriate s. URL: http(s)://<machine_name>/trackitwebapi/api/asset/getbyfilters http(s)://<machine_name>/trackitwebapi/api/asset/getbyfilters TrackItAPIKey: Numara Software and BMC Software Confidential. 16
Request-body: {"Name":"cpthook"} {"success":"true","data":{"assets":{"asset1":{"id":"101","identifier":"101","name":"cpthook","typename":"c omputer","location":"tampa","department":"information Technology","DepartmentNumber":"500","UdfText1":"","UdfText2":"","UdfText3":"","UdfText4":"","UdfText5 ":"","UdfText6":"","ModemNumber":"","ModemExtension":"","Network":"","Description":"CptHook was first discovered via an IP Scan. It was then transfered to Inventory. Next, the Product Number and Serial Number were scanned from the side of the unit. This was synchronized into the Barcode assets window. Lastly, Match to Inventory was selected and the cpthook from the IP scan was selected. After Apply was clicked, the barcode info was added to the cpthook record in Inventory. ","CompanyAssetUniqueId":"DS123S#ABA","CompanyAssetUniqueIdScanDate":"7/10/2006 10:38:09 AM","IsComputer":"True","State":"0","IsRetired":"False","UserName":"Gloria Wright"}}}} Update an Asset by Asset ID via Web API API: asset/update Type of call: POST TrackItAPIKey: apikey received through the Login API call Request body: { "Identifier":, "Name":, "TypeName":, "UserName":, "Location":, "Department":, "DepartmentNumber":, "UdfText1":, "UdfText2":, "UdfText3":, "UdfText4":, "UdfText5":, "UdfText6":, "ModemNumber":, "ModemExtension":, "Network":, "Description": } Asset Identifier Request returns : A success message is returned with all the fields of an Asset record including any fields that were ignored because of incorrect s. A failure message is returned in case of failure. URL: http(s)://<machine_name>/trackitwebapi/api/asset/update?assetidentifier=<assetid> Note: If an Asset ID matches multiple records, the update call will quit and return: {"success":"false","data":{"code":"web.inventory.062","message":"the operation failed because the Asset ID provided matches multiple records."}} http(s)://<machine_name>/trackitwebapi/api/asset/update?assetidentifier=cpthook101 TrackItAPIKey: Request-body: {"Description": "Company Laptop 01","Username":"Ashlee Owens", "Department": "Information Technology ", "Location": "Tampa", UdfText1 : Category_1 } {"success":"true","data":{"message":"asset cpthook101 updated successfully.","ignoredfields":"none", "reasonforignoringfieldvalues":"some fields were ignored due to any one of the following reasons:\r\n1. These fields contained invalid data OR \r\n2. The asset was audited and these fields cannot be updated on an audited asset.\r\n\r\nto know the list of ignored fields, please refer to the \"ignoredfields\" in the response data.", "data{"id":"101","identifier":"cpthook101","name":"cpthook","typename":"computer","location":"tampa"," Department":"Information Technology","DepartmentNumber":"500","UdfText1":"Category_1","UdfText2":"","UdfText3":"","UdfText4": "","UdfText5":"","UdfText6":"","ModemNumber":"","ModemExtension":"","Network":"","Description":"CptHo ok was first discovered via an IP Scan. It was then transferred to Inventory. Next, the Product Number and Serial Number were scanned from the side of the unit. This was synchronized into the Barcode assets window. Lastly, Match to Inventory was selected and the cpthook from the IP scan was Numara Software and BMC Software Confidential. 17
selected. After Apply was clicked, the barcode info was added to the cpthook record in Inventory. ","CompanyAssetUniqueId":"DS123S#ABA","CompanyAssetUniqueIdScanDate":"7/10/2006 10:38:09 AM","IsComputer":"True","State":"0","IsRetired":"False","UserName":"Gloria Wright"}}} Update an Asset by Asset Number via Web API API: asset/update Type of call: POST TrackItAPIKey: apikey received through the Login API call Request body: { "Identifier":, "Name":, "TypeName":, "UserName":, "Location":, "Department":, "DepartmentNumber":, "UdfText1":, "UdfText2":, "UdfText3":, "UdfText4":, "UdfText5":, "UdfText6":, "ModemNumber":, "ModemExtension":, "Network":, "Description": } Asset Number Request returns : A success message is returned with all the fields of an Asset record including any fields that were ignored because of incorrect s. A failure message is returned in case of failure. URL: http(s)://<machine_name>/trackitwebapi/api/asset/update/<assetnumber> http(s)://<machine_name>/trackitwebapi/api/asset/update/101 TrackItAPIKey: Request-body: {"Description": "Company Laptop 01","Username":"Ashlee Owens", "Department": "Information Technology ", "Location": "Tampa", UdfText1 : Category_1 } {"success":"true","data":{"message":"asset cpthook101 updated successfully.","ignoredfields":"none", "reasonforignoringfieldvalues":"some fields were ignored due to any one of the following reasons:\r\n1. These fields contained invalid data OR \r\n2. The asset was audited and these fields cannot be updated on an audited asset.\r\n\r\nto know the list of ignored fields, please refer to the \"ignoredfields\" in the response data.", "data{"id":"101","identifier":"cpthook101","name":"cpthook","typename":"computer","location":"tampa"," Department":"Information Technology","DepartmentNumber":"500","UdfText1":"Category_1","UdfText2":"","UdfText3":"","UdfText4": "","UdfText5":"","UdfText6":"","ModemNumber":"","ModemExtension":"","Network":"","Description":"CptHo ok was first discovered via an IP Scan. It was then transferred to Inventory. Next, the Product Number and Serial Number were scanned from the side of the unit. This was synchronized into the Barcode assets window. Lastly, Match to Inventory was selected and the cpthook from the IP scan was selected. After Apply was clicked, the barcode info was added to the cpthook record in Inventory. ","CompanyAssetUniqueId":"DS123S#ABA","CompanyAssetUniqueIdScanDate":"7/10/2006 10:38:09 AM","IsComputer":"True","State":"0","IsRetired":"False","UserName":"Gloria Wright"}}} Numara Software and BMC Software Confidential. 18