Issuetrak API 1.2 A Guide to the Issuetrak API, Version 1.2
For technical assistance, please contact Issuetrak s Support Team either via e-mail at support@issuetrak.com or via the Issuetrak Support Site at http://support.issuetrak.com. The Issuetrak Support Team is also available by phone at 757-213-1351 Monday through Friday, 7:00 AM to 8:00 PM (ET/GMT-5). 2014-2015 Issuetrak, Inc. All rights reserved. Issuetrak and the Issuetrak logo are registered trademarks of Issuetrak, Inc. All other trademarks contained herein may be property of their respective owners. All statements and recommendations contained in this document are believed accurate at the time of publication. This implies no warranty of any kind, explicit or implicit. Product usage terms, conditions, and limited warranty are set forth in the Issuetrak License Agreement presented and confirmed via click-through upon initial access of the product. Version 1 for Issuetrak API Version 1.2 Page 2 of 183
TABLE OF CONTENTS Overview... 7 System Requirements... 7 General Requirements... 7 Web Server Requirements... 7 SSL Configuration... 8 Database Server Requirements... 9 API Installation... 10 Preparation... 10 Web Server Installation... 10 Database Upgrade... 13 API Key Generation... 14 Step 1: Launch the Key Generation Tool... 14 STEP 2: Select the Path to the API web.config File... 15 STEP 3: Generate a New API Key... 16 STEP 4: Retrieve the Generated API Key Value... 17 STEP 5: Edit the web.config File to Add the API Key Value... 18 API Authorization Overview... 19 Introduction... 19 Overview of Authorization Header Steps... 19 Step 0: Identify the Current API Key... 20 Step 1: Generate a Unique Request ID... 20 Step 2: Generate a Request Timestamp... 20 Step 3: Generate a SHA512 HMAC Hash for the Request... 21 API Operation Conventions... 24 Data Transfer Objects... 24 Date Serialization... 24 Data Serialization... 24 ExtensionData and Metadata Objects... 24 Version 1 for Issuetrak API Version 1.2 Page 3 of 183
API Operations for APIMetadata... 25 Retrieve API Metadata... 26 API Operations for Attachments... 27 Retrieve an Attachment by Attachment ID... 29 Retrieve a Collection of Attachments by Issue Number... 31 Retrieve a Collection of Attachments by Issue Number with Attachments Compressed... 33 Create an Attachment for an Issue... 36 API Operations for Causes... 37 Retrieve a Cause by Cause ID... 38 Retrieve All Causes... 39 API Operations for Classes... 41 Retrieve a Class by Class ID... 42 Retrieve all Classes... 43 API Operations for Departments... 45 Retrieve a Department by Department ID... 46 Retrieve All Departments... 47 API Operations for Issues... 49 Retrieve an Issue by Issue Number... 50 Retrieve a Collection of Issues for a List of Issue Numbers... 54 Create an Issue... 62 Update an Issue... 66 Search Issues... 70 API Operations for IssueSubTypes... 76 Retrieve an IssueSubType by IssueSubType ID... 77 Retrieve all IssueSubTypes... 79 API Operations for IssueSubTypes2... 81 Retrieve an IssueSubType2 by IssueSubType2 ID... 82 Retrieve All IssueSubTypes2... 83 API Operations for IssueSubTypes3... 85 Retrieve an IssueSubType3 by IssueSubType3 ID... 86 Retrieve All IssueSubTypes3... 87 Version 1 for Issuetrak API Version 1.2 Page 4 of 183
API Operations for IssueSubTypes4... 89 Retrieve an IssueSubType4 by IssueSubType4 ID... 90 Retrieve All IssueSubTypes4... 91 API Operations for IssueTypes... 93 Retrieve an IssueType by IssueType ID... 94 Retrieve all IssueTypes... 95 API Operations for Locations... 97 Retrieve a Location by Location ID... 98 Retrieve all Locations... 99 API Operations for MenuItems... 101 Retrieve a MenuItem by MenuItem ID... 102 Retrieve all MenuItems... 104 API Operations for Notes... 106 Retrieve a Note by Note ID... 107 Retrieve a Collection of Notes by Issue Number... 109 Create a Note for an Issue... 111 API Operations for Organizations... 112 Retrieve an Organization by Organization ID... 113 Retrieve all Organizations... 114 API Operations for Priorities... 116 Retrieve a Priority by Priority ID... 117 Retrieve All Priorities... 119 API Operations for Projects... 121 Retrieve a Project by Project ID... 122 Retrieve all Projects... 124 API Operations for ServiceLevelAgreements... 127 Retrieve a ServiceLevelAgreement by ServiceLevelAgreement ID... 128 Retrieve all ServiceLevelAgreements... 130 API Operations for ServiceLevelSeverities... 132 Retrieve a ServiceLevelSeverity by ServiceLevelSeverity ID... 133 Retrieve all ServiceLevelSeverities... 135 Version 1 for Issuetrak API Version 1.2 Page 5 of 183
API Operations for ServiceLevels... 137 Retrieve a ServiceLevel by ServiceLevel ID... 138 Retrieve all ServiceLevels... 140 API Operations for ServiceLevelTerms... 142 Retrieve a ServiceLevelTerm by ServiceLevelTerm ID... 143 Retrieve all ServiceLevelTerms... 145 API Operations for Substatuses... 147 Retrieve a Substatus by Substatus ID... 148 Retrieve All Substatuses... 149 API Operations for TimeZones... 151 Retrieve a TimeZone by TimeZone ID... 152 Retrieve all TimeZones... 155 API Operations for User-defined Field Types... 158 Retrieve a UserDefinedFieldType by UserDefinedFieldType ID... 159 Retrieve all UserDefinedFieldTypes... 161 API Operations for Users... 163 Retrieve a User by User ID... 164 Retrieve all Users... 167 Create a User... 170 Update a User... 173 Update a User Password... 176 Inactivate a User... 177 API Samples Overview... 178 Introduction... 178.NET Sample... 178 PHP Sample... 178 Appendix 1: Encrypting ConnectionStrings... 182 Appendix 2: Troubleshooting Swagger... 183 Problem 1: Swagger Dashboard Doesn t Load in Microsoft Internet Explorer... 183 Version 1 for Issuetrak API Version 1.2 Page 6 of 183
Overview The Issuetrak API Version 1.2 documentation is divided into several sections. System Requirements o The System Requirements section discusses the hardware, software, and configuration requirements necessary to integrate the Issuetrak API v 1.2 with an existing Issuetrak 9.9 installation. API Installation o The API Installation section presents the steps necessary to upgrade an existing Issuetrak 9.9 web application and database installation to support the Issuetrak API. API Operations o The API Operations section provides details on the various API operations across the Issuetrak Attachments, Issues, and Notes entities. API Authorization Overview o The API Authorization Overview section discusses the HMAC authorization process for authorizing an API request. API Samples Overview o The API Samples Overview section discusses the API samples that are available to demonstrate how to interact with the API. System Requirements GENERAL REQUIREMENTS The Issuetrak API v 1.2 requires the Issuetrak 9.9 application to be installed as the base application platform. In addition, the Microsoft.NET Framework 4.5.1 update must be installed on the application server. The Issuetrak 9.9 core product may be installed on either separate web and database servers or on a single server functioning as both web and database server. For a full listing of System Requirements for the Issuetrak 9.9 product, please see the Issuetrak System Requirements document at the Issuetrak website. WEB SERVER REQUIREMENTS CPU Requirements: o Minimum Dual-core 1.8 GHz CPU RAM Requirements: o Minimum 4 GB available RAM Hard Disk Requirements: Version 1 for Issuetrak API Version 1.2 Page 7 of 183
o Minimum 4 GB available hard disk space Issuetrak API Version 1.2 Operating System Requirements: o Microsoft Windows Server 2008 or later (32-bit or 64-bit in either Standard, Enterprise, or Datacenter Edition) Web Server Requirements: o Microsoft Internet Information Services (IIS) version 7.0, 7.5, 8.0 or 8.5 Microsoft.NET Framework Requirements: o Microsoft.NET Framework 4.5.1 (or greater) It is strongly recommended that all available service packs and security patches be applied to both the web server s core operating system and the.net Framework. The latest service packs and cumulative updates for Microsoft Windows Server products can be reviewed at the Microsoft TechNet Windows Server web page. The API project must be configured to execute within a distinct application pool from the Issuetrak 9.9 web application. Ensure that the.net Framework branch selected for the application pool is a version 4 variant, and ensure that the Managed pipeline mode is set to Integrated (see SCREENSHOT 1). SCREENSHOT 1: APPLICATION POOL SETTINGS IN IIS SSL CONFIGURATION IMPORTANT: It is strongly recommended that the hosting web server be configured with only HTTPS (Secure Hypertext Transport Protocol) bindings. This step requires the configuration of a Secure Socket Layer (SSL) certificate. Implementing this recommendation will require the installation of an SSL certificate on the hosting web server. There are two typical scenarios for installing an SSL certificate within IIS. The first scenario involves creating a self-hosted certificate, a certificate type that is submitted to a Certificate Authority Version 1 for Issuetrak API Version 1.2 Page 8 of 183
(CA) that is a server under the control of the hosting organization. The second scenario involves requesting a third-party certificate, a certificate issued by an external CA. Examples of certificate vendors that issue third-party certificates include (but are not limited to): VeriSign (https://www.verisign.com) GeoTrust (https://www.geotrust.com) Thawte (https://www.thawte.com) The following Microsoft knowledgebase articles provide step-by-step instructions for requesting a certificate, installing the certificate within IIS, and setting the HTTPS binding for a site so that only SSL connections are permitted. How to Set Up SSL on IIS 7 : Provides steps for configuring SSL for for IIS 7.0 and above. Configuring SSL in IIS Manager : Provides a video on enabling SSL security with self-signed certificates for IIS 7.0 and above. IIS 8 - Certificate Management and Deployment : Provides a video overview of certificate management within IIS 8 In addition, the application pool identity that is assigned to the Issuetrak API application pool must have read and write permissions on the folder used to store Issuetrak attachments. The following Microsoft IIS article provides detailed information on not only configuring IIS Application Pool Identities but also configuring the security for resources such as files and folders. Application Pool Identities DATABASE SERVER REQUIREMENTS CPU Requirements: o Minimum Dual-core 1.8 GHz CPU RAM Requirements: o Minimum 4 GB available RAM Hard Disk Requirements: o Minimum 4 GB available hard disk space Operating System Requirements: o Microsoft Windows Server 2008 or later (32-bit or 64-bit in either Standard, Enterprise, or Datacenter Edition) Database Server Requirements: o Microsoft SQL Server 2008 R2 or later (32-bit or 64-bit in either Standard, Enterprise, or Business Intelligence Edition) Microsoft.NET Framework Requirements: o Microsoft.NET Framework 4.5.1 (or greater) It is strongly recommended that all available service packs and security patches be applied to both the database server s core operating system and the database server software itself. In addition, the database compatibility level must be set to a minimum level of 100 (Microsoft SQL Server 2008 R2). Version 1 for Issuetrak API Version 1.2 Page 9 of 183
The latest service packs and cumulative updates for Microsoft SQL Server can be reviewed at the Microsoft TechNet Update Center for Microsoft SQL Server. API Installation PREPARATION Create a folder on the web server named API Installation Files and copy the contents of the compressed file containing the API installation files to the newly created folder. This will result in a folder (referred to in the following instructions as the API Installation Files folder ) containing the following folders structure: Issuetrak-API-v1.2-Deployment o Issuetrak-API-v1.2-.NET-Client o Issuetrak-API-v1.2-.NET-Client-Example o Issuetrak-API-v1.2-API o Issuetrak-API-v1.2-Database-Deployment-Scripts o Issuetrak-API-v1.2- o Issuetrak-API-v1.2-KeyTool WEB SERVER INSTALLATION Refer to the Web Server System Requirements section for details about preparing the IIS server for hosting the Issuetrak API. Before installing the API, the Issuetrak application must be installed on the hosting web server. The steps to integrate the Issuetrak API with the existing Issuetrak web application assume that a subfolder named api will be created within the Issuetrak 9.9 deployment folder structure. 1) Create a directory in the Issuetrak 9.9 application file structure with the name api. 2) In the API Installation Files folder there is a folder named Issuetrak-API-v1.2-API. Copy the contents of this folder to the api folder created above. This will result in the api folder containing the following content: App_Data (folder) App_Readme (folder) bin (folder) Properties (folder) Swagger-Resources (folder) Global.asax (file) packages.config (file) Web.config (file) 3) Ensure that the Logs subfolder has been created under the App_Data folder. If the Logs subfolder does not exist, create is beneath the App_Data folder. Version 1 for Issuetrak API Version 1.2 Page 10 of 183
4) Within the api folder locate the Web.config file and open it in a text editor such as Notepad. 5) Search the Web.config file for the following text: connectionstrings. 6) Locate the database connection definition named Issuetrak-Database. Within the connection string entry, locate the following placeholder values and replace the placeholder values with the connection information relevant to the installation. Please note that the placeholder values are changed within the existing quotation marks so that the actual values entered will also be contained within quotation marks. a. ENTER_ISSUETRAK_DATABASE_SERVER_NAME_HERE Change this value to the name of the server that hosts the Issuetrak database. b. ENTER_ISSUETRAK_DATABASE_NAME_HERE Change this value to the name of the Issuetrak database. c. ENTER_ISSUETRAK_DATABASE_USER_ID_HERE Change this value to the ID of the database user used to connect to the Issuetrak database. d. ENTER_ISSUETRAK_DATABASE_USER_PASSWORD_HERE Change this value to the password of the database user used to connect to the Issuetrak database (see c. above). 7) Search the Web.config file for the following text: AttachmentsRootFilePath. 8) Change the file path for the AttachmentsRootFilePath to match the path to the Issuetrak attachments file storage. Ensure that the path has a trailing backslash ( \ ) character. 9) Search the Web.config file for the following text: UserPhotoImagesRootFilePath. 10) Change the file path for the UserPhotoImagesRootFilePath to match the path to the Issuetrak user photo image file storage. In most cases, this file path will be the same file path as specified for the AttachmentsRootFilePath setting. Ensure that the path has a trailing backslash ( \ ) character. 11) Search the Web.config file for the following text: Bypass. 12) Change the default value of the APIAuthorizationBypassReferrers setting to match the URL of the api website. The URL must end with /api/swagger/ui/index (e.g. <value>http://www.mysite.com/api/swagger/ui/index</value>). 13) Change the default value of the APIAuthorizationBypassIPAddresses setting to include the IP addresses of any computers that should be allowed to connect to the Swagger UI for the Issuetrak API. If more than one IP address is included in the list they should be separated with a comma only (no spaces) (e.g. <value>1.2.3.4,5.6.7.8</value>). 14) Save the Web.config file. 15) Open Internet Information Services (IIS). 16) In the Connections section on the left-hand side, expand the server where the Issuetrak site is installed. 17) Create a new Application Pool for the Issuetrak API if you have not already done so. a. Right-click on Application Pools and select Add Application Pool. b. Enter a name for the Application Pool, select a version 4 variant of the.net Framework, and select Integrated for the Managed pipeline mode. Version 1 for Issuetrak API Version 1.2 Page 11 of 183
c. Click the [OK] button to save the new Application Pool. 18) Convert the api folder created above to an Application a. In the Connections section on the left-hand side, navigate to and expand the Issuetrak site where the API is installed. b. Right-click on the api folder and select Convert to Application. c. Click the [Select] button and select the Application Pool you created for the Issuetrak API. d. Click the [OK] button to create the Application. 19) Ensure that the App_Data/Logs subfolder for the application has read/write permissions for the user associated with the API s application pool. For IIS 7+ or IIS 8+, the default identity for a new application pool will be ApplicationPoolIdentity. This identity will translate into a user name of IIS APPPOOL\App_Pool_Name, e.g., IIS APPPOOL\Issuetrak.API. Use Windows Explorer to set the permissions for the this AppPool user (local account) to read/write for the App_Data/Logs folder. 20) Ensure that the only Authentication type with a status Enabled for the Issuetrak API application is Anonymous Authentication. The Authentication settings are accessed in IIS Manager by left-clicking on the Issuetrak API application in the Connections treeview in the left pane of IIS Manager and then double left-clicking the Authentication icon. SCREENSHOT 2: "AUTHENTICATION" ICON IN IIS MANAGER SCREENSHOT 3: ANONYMOUS AUTHENTICATION ENABLED FOR ISSUETRAK API APPLICATION IN IIS Version 1 for Issuetrak API Version 1.2 Page 12 of 183
DATABASE UPGRADE IMPORTANT: Before executing the database upgrade script to install the database components for the Issuetrak API, ensure that a full and complete database backup has been made using backup methods appropriate for the particular recovery model for the Issuetrak database to be upgraded. The API Installation Files folder includes a database installation script named Master-Issuetrak-API-1.0- Database-Upgrade-Script.sql located in the SQL Scripts folder. This upgrade script must be executed in the context of a database account that has the DBO user role for the Issuetrak 9.9 database that is to be upgraded. This upgrade script must be executed before the API Key Generation step. Within the script, there is a path variable value that must be set before the script is executed: :SETVAR PathToUpgradeDatabaseScriptsRoot <SET_PATH_TO_SCRIPTS_HERE> Replace the <SET_PATH_TO_SCRIPTS_HERE> placeholder with the full path to the directory containing the API database upgrade scripts (the SQL Scripts folder in the API Installation Files folder). The path should be in double-quotes ("), not single-quotes ('). The path should not end with a trailing backslash (\). (e.g. :SETVAR PathToUpgradeDatabaseScriptsRoot C:\API Installation Files\Issuetrak REST API v1.2\sql Scripts\ ) Please note that the path specified for the PathToUpgradeDatabaseScriptsRoot variable is interpreted relative to the computer on which the SQL Server Management Studio session is executing. The folder to replace the <SET_PATH_TO_SCRIPTS_HERE> placeholder with is the folder containing the following files: Master-Issuetrak-API-1.2-Create-APIUser-User-Upgrade-Script.sql Master-Issuetrak-API-1.2-Create-Full-Text-Catalogs-Upgrade-Script.sql Master-Issuetrak-API-1.2-Create-Full-Text-Indexes-Upgrade-Script.sql Master-Issuetrak-API-1.2-Create-Stored-Procedures-Upgrade-Script.sql Master-Issuetrak-API-1.2-Create-Tables-Upgrade-Script.sql Master-Issuetrak-API-1.2-Create-TableTypes-Upgrade-Script.sql Master-Issuetrak-API-1.2-Create-User-Defined-Functions-Upgrade-Script.sql Master-Issuetrak-API-1.2-Database-Compatibility-Change-Script.sql Master-Issuetrak-API-1.2-Database-Upgrade-Script.sql Master-Issuetrak-API-1.2-Drop-Stored-Procedures-Upgrade-Script.sql Master-Issuetrak-API-1.2-Drop-User-Defined-Functions-Upgrade-Script.sql Execute this database upgrade script using a tool such as Microsoft SQL Server Management Studio. The script must be executed in SQLCMD mode. To use SQLCMD mode in Microsoft SQL Server Management Studio, first open the upgrade script and then open the Query menu and select the SQLCMD Mode option (see the following screenshot from SQL Server Management Studio for an illustration of how to select SQLCMD mode from the Query menu). Version 1 for Issuetrak API Version 1.2 Page 13 of 183
SCREENSHOT 4: SETTING SQLCMD MODE FOR A QUERY FROM THE QUERY MENU IN SQL SERVER MANAGEMENT STUDIO API KEY GENERATION The API key generation step produces a random cryptographically strong API key that is used to generate the request authorization hashes. To generate this API key, the Key Generation Tool is provided. The Key Generation Tool should be executed after all other API installation and configuration steps are completed as the tool will insert the generated key within the Issuetrak database. STEP 1: LAUNCH THE KEY GENERATION TOOL The Key Generation Tool is located in the Key Generation Tool folder in the API Installation Files folder and is named Issuetrak.API.KeyTool.exe (depending on your settings, you may not see the.exe ending on the filename). Double-click the Issuetrak.API.KeyTool.exe executable to start the Key Generation Tool. You will be asked to press a key to begin the process. SCREENSHOT 5: THE KEY GENERATION TOOL Version 1 for Issuetrak API Version 1.2 Page 14 of 183
STEP 2: SELECT THE PATH TO THE API WEB.CONFIG FILE Provide the location of the Web.config file from the api folder in your Issuetrak 9.9 site (not the Web.config file in the API Installation Files folder or in the root of your Issuetrak 9.9 site). A file selection dialog will be displayed for this purpose. Use the dialog to locate the API Web.config file, select the file, and click the [Open] button. SCREENSHOT 6: SELECTING THE WEB.CONFIG FILE Version 1 for Issuetrak API Version 1.2 Page 15 of 183
STEP 3: GENERATE A NEW API KEY If there is no API key detected in the Issuetrak database, this step will complete without the need for user interaction. If an existing API key is detected, a dialog box will be shown requesting confirmation of the key change. Updating to a new API key will block applications using the existing key. If in doubt, click No, and ensure that preparations for updating the key have been made before proceeding. SCREENSHOT 7: GENERATE AN API KEY Version 1 for Issuetrak API Version 1.2 Page 16 of 183
STEP 4: RETRIEVE THE GENERATED API KEY VALUE Once the new API key has been generated it will be displayed and you will be prompted to press [Enter]. Once you press [Enter] the new API key will be copied to your clipboard so you can paste the new API key into a document and save it in a secure location. Anyone who has the key can use the API, so maintaining the security of the key is extremely important. It is highly recommended that you do not transmit the key via e-mail or save it in a publiclyaccessible network location. SCREENSHOT 8: RETRIEVE THE GENERATED API KEY VALUE Version 1 for Issuetrak API Version 1.2 Page 17 of 183
STEP 5: EDIT THE WEB.CONFIG FILE TO ADD THE API KEY VALUE Search the Web.config file for the following text: ENTER_API_KEY_HERE. Change the default value of the ENTER_API_KEY_HERE setting value to the API key value generated in Step 4. Version 1 for Issuetrak API Version 1.2 Page 18 of 183
API Authorization Overview INTRODUCTION The Issuetrak API v 1.2 requires specific, custom authorization headers to be added to each HTTP request targeting an API operation endpoint. The following custom authorization headers must be defined. Table 1: Issuetrak API Authorization Headers Issuetrak API Authorization Header Name X-Issuetrak-API-Request-ID X-Issuetrak-API-Timestamp X-Issuetrak-API-Authorization Issuetrak API Authorization Header Purpose Provides a unique request ID to mitigate the risk of cachereplay attacks. Provides a timestamp to mitigate the risk of replay attacks. Provides an HMAC hash of specific data representing the request. OVERVIEW OF AUTHORIZATION HEADER STEPS Consider the following raw HTTP request made to a local development server running the Issuetrak API Version 1.2 with the Issuetrak API authorization headers highlighted. Listing 2: Sample Issuetrak API HTTP Request with Custom HTTP Authorization Headers Highlighted POST http://local.issuetrakapi.com/api/v1/attachments HTTP/1.1 Accept-Language: en-us Accept: application/json X-Issuetrak-API-Request-ID: c3838d04-46f8-43d6-92fd-62b3d0b59f3e X-Issuetrak-API-Timestamp: 2014-09-10T17:28:08.3227351Z X-Issuetrak-API-Authorization: SkFHCIWKyF2DXEOvrpyJzAHH52/RL3OhJGFsqFau6A7oMx5JUVmm3oC9lJFzLpISsU2Vngk56xayygSsd5WmKw== Content-Type: application/json; charset=utf-8 Host: local.issuetrakapi.com Content-Length: 111 Expect: 100-continue Connection: Keep-Alive "IssueNumber":0,"FileName":null,"CreatedBy":null,"CreatedDate":null,"FileSizeInBytes":null,"FileContent":null Ignoring the JSON data transmitted in the request body (in this example, the data are invalid and will generate an error response from the API) and instead focusing on how the authorization headers were constructed, the headers were created in four steps. Step 0: Identity the Current API Key Step 1: Generate a Unique Request ID Step 2: Generate a Request Timestamp Step 3: Generate a SHA512 HMAC Hash for the Request Version 1 for Issuetrak API Version 1.2 Page 19 of 183
STEP 0: IDENTIFY THE CURRENT API KEY Issuetrak API Version 1.2 The API key is a 32-byte length, base-64 encoded byte array (see Listing 2 for an example) unique to each Issuetrak API deployment. The API key is generated using the Issuetrak.API.KeyTool application and is produced using a cryptographically-strong random number generation algorithm. Once generated, the API Key is stored within the Issuetrak 9.9 database as an application parameter. Listing 2: Sample Issuetrak API Key in Base-64 Encoded Format wv4ja/59puf6xjimf1om+eg+d4rqle8wgrtybnikdrs= WARNING: The API Key should never be transmitted in any API HTTP request. Instead, the API key is only used to generate an HMAC hash for an API request. The API server-using the same API key retrieved from the application parameters-will then compute an HMAC hash for the request to be authorized and will compare the computed hash to the transmitted hash to determine the validity of the authorization headers. In this manner, the API key is never exposed as plaintext in any HTTP request or HTTP response. STEP 1: GENERATE A UNIQUE REQUEST ID The API expects to receive a request ID in the form of a Globally Unique Identifier (GUID) 1. GUIDs are trivial to generate in a variety of programming languages 2. For example, in Microsoft.NET Framework languages, the System.Guid.NewGuid 3 method may be used as in the following C# code fragment: Listing 3: C# Code Fragment to Generate a GUID String requestid = Guid.NewGuid().ToString(); The generated request GUID value is submitted with the HTTP request as the value for the X-Issuetrak-API- Request-ID HTTP header. This same value will be used in Step 3, the generation of the SHA512 HMAC hash for the request. STEP 2: GENERATE A REQUEST TIMESTAMP The API will examine and attempt to parse the request timestamp to a valid datetime value. When specifying the request timestamp text representation, regardless of the API consumer s local time zone, generate the timestamp using Coordinated Universal Time (UTC) 4. This timestamp value should resemble the following example: 2014-09-10T17:57:27.7766148Z Notice that the seconds portion contains seven decimal digits. The API will attempt to parse the request timestamp to a UTC datetime representation and will compare the timestamp to a request time boundary window to determine if the request s timestamp falls within 1 See the GUID Wikipedia article at: http://goo.gl/yfnr53 2 For example, see the com_create_guid PHP function reference at: http://goo.gl/gnmg6r 3 See the Guid.NewGuid MSDN reference at: http://goo.gl/5c3wcp 4 See the Coordinated Universal Time Wikipedia article at: http://goo.gl/qgpqcu Version 1 for Issuetrak API Version 1.2 Page 20 of 183
the acceptable boundary. This time validation steps attempts to reduce the chance that a replay attack 5 is issued against the server. As an example of how to generate an appropriate request timestamp header value, consider the following C# code fragment: Listing 4: C# Code Fragment to Generate an ISO 8601 DateTime Text Value for a UTC DateTime // The "O" or "o" standard format specifier represents a custom date and time format string using a // pattern that preserves time zone information and emits a result string that complies with ISO 8601. String requesttimestamp = DateTime.UtcNow.ToString("O"); The generated request timestamp value is submitted with the HTTP request as the value for the X-Issuetrak-API- Timestamp HTTP header. STEP 3: GENERATE A SHA512 HMAC HASH FOR THE REQUEST To generate an HMAC hash, the message to be hashed will be formed using a combination of data relevant to the particular request. In particular, to generate the message, include the following concatenated message elements delimited by new line characters ( \n ): 1) The uppercase HTTP verb for the request e.g., GET, POST, or PUT. 2) The lowercase unique GUID 6 for the request (see Step 1). 3) The timestamp for the request as submitted in the request timestamp header of Step 2. 4) The lowercase URL-decoded absolute path 7 of the request. Please note that the absolute path does not include the scheme, host name, or query portion of the URL. 5) The URL-encoded request query 8 or a blank string if the query URI element is not present. 6) A text-serialized version of any request content 9 submitted with the request with the serialization format selected based on the request encoding used for the request. Consider the sample HTTP request in Listing 1: The HTTP verb for the sample request is: POST. The lowercase, unique GUID for the sample request is: c3838d04-46f8-43d6-92fd-62b3d0b59f3e. The timestamp for the sample request is: 2014-09-10T17:57:27.7766148Z. 5 See the Replay Attack Wikipedia article at: http://goo.gl/j84rqt 6 The lowercase formatting for the GUID value is an attempt to standardize the many different formatting styles across platforms, e.g., Windows OS Registry format wherein a GUID may have a form similar to the following sample: 22FBF9A9-226B-43A5-8BAC-11AF6DBA5C6B 7 See the Uri.AbsolutePath Property MSDN reference at: http://goo.gl/59zyia In particular, note, The path information does not include the scheme, host name, or query portion of the URI. 8 See the Uri.Query Property MSDN reference at: http://goo.gl/s0hbul 9 This serialized request content should be the same as any request payload submitted in the request body for a POST or PUT request. Version 1 for Issuetrak API Version 1.2 Page 21 of 183
The lowercase, URL-decoded absolute path for the request is: /api/v1/attachments. There is no query for the request URL, so a blank string is substituted:. Since the Accept HTTP header for the request is Accept: application/json, the serialization of the request content is performed using a JSON serializer 10. Concatenating these elements with \n (New Line) characters produces the following text block. Do not include a \n sequence after the JSON representation. Listing 5: Sample Request Text Representation to be Hashed POST c3838d04-46f8-43d6-92fd-62b3d0b59f3e 2014-09-10T17:57:27.7766148Z /api/v1/attachments "IssueNumber":0,"FileName":null,"CreatedBy":null,"CreatedDate":null,"FileSizeInBytes":null,"FileC ontent":null A Hash-based Message Authentication Code (HMAC) 11 should now be generated for this request using the SHA512 12 hash function. When calculating the hash, use a UTF-8 13 text encoding for any string-tobyte array transformations. A sample C# function for generating a SHA-512 HMAC hash is presented in Listing 6. 10 If the Accept header value were text/xml, an XML serializer would need to be applied. 11 See the Hash-based message authentication code Wikipedia article at: http://goo.gl/e21vv 12 See the SHA-2 Wikipedia article at: http://goo.gl/jbnox 13 See the UTF8Encoding Class MSDN article at: http://goo.gl/ftqqd8 Version 1 for Issuetrak API Version 1.2 Page 22 of 183
Listing 6: Sample C# Function for Computing a SHA-512 HMAC Hash Issuetrak API Version 1.2 String ComputeHMACHash(String hashkey, String messagetobehashed) String hashtext = null; Byte[] hashkeybytes = Encoding.UTF8.GetBytes(hashKey); using (HMACSHA512 hmachashgenerator = new HMACSHA512(hashKeyBytes)) Byte[] messagetobehashedbytes = Encoding.UTF8.GetBytes(messageToBeHashed); Byte[] hashedmessagebytes = hmachashgenerator.computehash(messagetobehashedbytes); hashtext = Convert.ToBase64String(hashedMessageBytes); return hashtext; As an example of the output, if the ComputeHMACHash in Listing 6 were called using the sample API key from Listing 2 and the sample request text representation from Listing 5, the resulting base-64 encoded byte array representing the SHA-512 HMAC hash would be: SkFHCIWKyF2DXEOvrpyJzAHH52/RL3OhJGFsqFau6A7oMx5JUVmm3oC9lJFzLpISsU2Vngk56xayygSsd5W mkw== The length of the base-64 encoded representation of the hash byte array is 88 characters. This is the expected value since the SHA-512 hash algorithm will produce a 64 byte array, and, in a base-64 14 encoding, 4 ( n ) characters will be used to represent n bytes with padding added so that the resulting 3 base-64 encoded text has a length that is a multiple of 4. Total Base-64 Encoded Characters for SHA-512 Hash (n = 64) = (4 ( 64 )) = 85.33 Rounded to the nearest multiple of 4 yields 88 characters. This computed hash text is submitted with the HTTP request as the value for the X-Issuetrak-API-Authorization HTTP header. 3 14 See the Base64 Wikipedia article at: http://goo.gl/8mmwk In particular, note the padding rules for Base-64 encoding. Version 1 for Issuetrak API Version 1.2 Page 23 of 183
API Operation Conventions DATA TRANSFER OBJECTS The Issuetrak API v 1.2 uses the concept of Data Transfer Objects (DTOs) to represent the serialized input to API operation endpoints for API methods that use the POST and PUT HTTP verbs and to represent the serialized output from API operations where a response object is expected. DATE SERIALIZATION For serializing dates, the Issuetrak API v 1.2 uses the ISO 8601 standard. For example, the date February 27, 2014, at 11:30:10 AM, is represented in the ISO 8601 standard as: 2014-02-27T11:30:10.0000000. DATA SERIALIZATION The Issuetrak API v 1.2 supports two serialization formats: JSON and XML. The documentation assumes the use of JSON; however, the Issuetrak API v 1.2 Swagger UI demonstrates the alternate serialization response schema for XML if an XML implementation is desired. EXTENSIONDATA AND METADATA OBJECTS For API operation responses that generate DTOs or collections of DTOs, there are two additional properties that will be present within each of the DTO instances, ExtensionData and Metadata. The ExtensionData property represents a collection of key/value pairs and is intended to provide a container for conveying data that is external to an established data contract. One of the primary uses of this property would be to convey data from a future version of a DTO contract (e.g., a future version of a response DTO from a version X implementation of the Issuetrak API) to a previous DTO version. The Metadata property represents a collection of key/value pairs and is intended to provide a container for conveying data that pertinent to the individual API operation. For API operations that produce response DTO instances, the Metadata collection will include at least two properties: APIVersion and QueryDate. The APIVersion property will provide a text representation of the version of the API used to generate the response, e.g., v1. The QueryDate property will provide an ISO 8601 serialized date representing the date time that the API operation was run. Version 1 for Issuetrak API Version 1.2 Page 24 of 183
API OPERATIONS FOR APIMETADATA TABLE 3: APIMETADATA API OPERATIONS SUMMARY Operation Name Retrieve API Metadata Relative API Request Path ~/api/v1/metadata/current HTTP Verb GET Description Retrieves the current API metadata Version 1 for Issuetrak API Version 1.2 Page 25 of 183
RETRIEVE API METADATA (Return to: API Metadata Operations Summary) Description: This API method provides metadata regarding the current API version. The response code on success will be 200 (OK), and the response body will include the current server UTC date and the current API version. Response DTO Schema: Request HTTP Verb: GET UTCDate (ISO 8601 string), Response Status Codes: APIVersion (string) Success: 200 Invalid Data: 400 Response DTO Property Notes: The UTCDate property represents the UTC datetime for the server Sample Request URL: ~/api/v1/metadata/current Sample Response: "UTCDate": "2014-10-30T14:27:31.7090916Z", "APIVersion": "v1" Version 1 for Issuetrak API Version 1.2 Page 26 of 183
API OPERATIONS FOR ATTACHMENTS TABLE 4: ATTACHMENTS API OPERATIONS SUMMARY Operation Name Retrieve an Attachment by Attachment ID Relative API Request Path ~/api/v1/attachments/attachmentid/includeattachmentcontent HTTP Verb GET Description Retrieve a single Attachment from by its AttachmentID with the option of specifying whether or not to retrieve the attachment file content. Retrieve a Collection of Attachments by Issue Number ~/api/v1/attachments/issue/issuenumber/includeattachmentcontent GET Retrieve a collection of Attachments for an associated issuenumber with the option of specifying whether or not to retrieve the attachment file content. Retrieve a Collection of Attachments by IssueNumber with the Contents of the Attachments Compressed as a ZIP Archive ~/api/v1/attachments/compressed/issuenumber/issuenumber GET Retrieve a collection of Attachments for an associated issuenumber with the contents of the attachment compresses as a ZIP Archive. Create ~/api/v1/attachments POST Create a new Version 1 for Issuetrak API Version 1.2 Page 27 of 183
Attachment for Issue Attachment for an Issue. Version 1 for Issuetrak API Version 1.2 Page 28 of 183
RETRIEVE AN ATTACHMENT BY ATTACHMENT ID (Return to: Attachments Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves an Attachment from the Issuetrak data store for a specified Attachment ID. The attachmentid parameter must correspond to an existing Attachment. If there is no such Attachment ID, an error message will be returned with an HTTP response status code of 400. The includeattachmentcontent parameter is an optional parameter that defaults to true. If false, (e.g., /attachments/1/false), the ReadAttachmentDTO FileContent property will be null representing the skipped operation of retrieving the attachment file content. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadAttachmentDTO instance. Response DTO Schema: Request HTTP Verb: GET ReadAttachmentDTO Response Status Codes: ExtensionData (array[customkeyvaluepairdataelement Success: 200 [String,Object]]), Metadata (array[customkeyvaluepairdataelement [String,Object]]), Invalid Attachment ID: 400 (Bad Request, e.g., a negative integer is supplied) AttachmentID (integer), Non-existent Attachment: 404 IssueNumber (integer), FileName (string), CreatedBy (string), Invalid Attachment ID: 422 (Unprocessable Entity, e.g., a nonnumeric value is supplied) CreatedDate (ISO 8601 string), FileSizeInBytes (integer), FileContent (base-64 string) Response DTO Property Notes: The FileSizeInBytes property value should equal the number of bytes present in the FileContent byte array after decoding from base-64. The FileContent property will contain the base-64 encoded contents of the Attachment file. The ExtensionData property will contain an echo of the includeattachmentcontent parameter setting for the request. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/attachments/139978/true Sample Response: "ExtensionData": [ "Key": "includeattachmentcontent", "Value": true "Metadata": [ "Key": "APIVersion", "Value": "v1", Version 1 for Issuetrak API Version 1.2 Page 29 of 183
"Key": "QueryDate", "Value": "2014-10-08T14:52:42.564023Z" "AttachmentID": 139978, "IssueNumber": 1, "FileName": "Test-File-200afea2-73f3-4fbf-8b66-33a2f8e2464e.txt", "CreatedBy": "Admin", "CreatedDate": "2014-10-03T13:50:04.607", "FileSizeInBytes": 100, "FileContent": "VGhpcyBub3RlIHRleHQgd2FzIGNyZWF0ZWQgb24gMTAvMy8yMDE0IDE6NTA6MDQgUE0uICBSYW5kb20gdGV4dC Bmb2xsb3dzOg0KQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==" Version 1 for Issuetrak API Version 1.2 Page 30 of 183
RETRIEVE A COLLECTION OF ATTACHMENTS BY ISSUE NUMBER (Return to: Attachments Operations Summary) Description: This API method retrieves a collection of Attachment from the Issuetrak data store for the specified Issue Number. The issuenumber parameter must correspond to an existing Issue. If there is no such IssueNumber, an error message will be returned with an HTTP response status code of 400. The includeattachmentcontent parameter is an optional parameter that defaults to true. If false, (e.g., /attachments/1/false), the ReadAttachmentDTO FileContent property will be null representing the skipped operation of retrieving the attachment file content. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadAttachmentDTO instances. Response DTO Schema: Request HTTP Verb: GET "IsPageIndexZeroBased": false, Response Status Codes: "PageIndex": 0, Success: 200 "CountForPage": 0, "PageSize": 0, Invalid Issue Number: 400 (Bad Request, e.g., a negative integer is supplied) "TotalCount": 0, Non-existent Issue: 404 "Collection": [ Non-existent Attachment: 404 Invalid Issue Number 422 (Unprocessable ExtensionData[ Entity, e.g., a non-numeric value is supplied) Metadata[ "AttachmentID": 0, "IssueNumber": 0, "FileName": "", "CreatedBy": "", "CreatedDate": "ISO 8601 string", "FileSizeInBytes": 0, "FileContent": "Base64 string" ] Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadAttachmentDTO objects returned. The ExtensionData property will contain an echo of the includeattachmentcontent parameter setting for the request. Sample Request URL: ~/api/v1/attachments/issuenumber/122/true Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, Version 1 for Issuetrak API Version 1.2 Page 31 of 183
"CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Key": "includeattachmentcontent", "Value": true "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-10-08T15:07:03.499441Z" "AttachmentID": 138907, "IssueNumber": 122, "FileName": "AttachmentTestFile.txt", "CreatedBy": "admin", "CreatedDate": "2014-08-06T02:01:19", "FileSizeInBytes": 47, "FileContent": "VGhpcyBpcyBhIHRlc3QgdGV4dCBmaWxlDQpIZXJlJ3MgbW9yZSB0ZXN0IHRleHQ=" ] Version 1 for Issuetrak API Version 1.2 Page 32 of 183
RETRIEVE A COLLECTION OF ATTACHMENTS BY ISSUE NUMBER WITH ATTACHMENTS COMPRESSED (Return to: Attachments Operations Summary) Description: This API method retrieves a collection of Attachment from the Issuetrak data store for the specified Issue Number. The issuenumber parameter must correspond to an existing Issue. If there is no such IssueNumber, an error message will be returned with an HTTP response status code of 400. The content of the retrieved attachments are compressed as a ZIP archive. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized QueryResults instance with a Collection property containing a set of ReadAttachmentDTO instances. For each of the ReadAttachmentDTO instances, the FileContent property will be null and the ExtensionData property will contain a key/value pair with the key name, CompressedEntryName. The value of the CompressedEntryName key will represent the name of the ZIP archive entry corresponding to the byte content for the ReadAttachmentDTO instance s compressed content. A successful response will include a second root object, CompressedAttachmentsContent, representing the Base- 64 encoded representation of the ZIP archive of the attachments for the queried Issue. Response DTO Schema: Request HTTP Verb: GET "ExtensionData": [ Response Status Codes: Success: 200 "Key": "string", Invalid Issue Number: 400 (Bad Request, "Value": e.g., a negative integer is supplied) Non-existent Issue: 404 Non-existent Attachment: 404 "Metadata": [ Invalid Issue Number 422 (Unprocessable "CustomKeyValuePairDataElement" Entity, e.g., a non-numeric value is supplied) "QueryResults": "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "CustomKeyValuePairDataElement" "Metadata": [ "CustomKeyValuePairDataElement" "AttachmentID": 0, "IssueNumber": 0, "FileName": "string", "CreatedBy": "string", "CreatedDate": "string", "FileSizeInBytes": "string", "FileContent": ] Version 1 for Issuetrak API Version 1.2 Page 33 of 183
, "CompressedAttachmentsContent": Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadAttachmentDTO objects returned. The ExtensionData properties for the ReadAttachmentDTO instances included within the QueryResults Collection will contain a key/value pair with the key name, CompressedEntryName, representing the ZIP archive entry name for the attachment. The CompressedEntryName is randomly-generated value for every request to allow attachments with the same base name to be compressed. Sample Request URL: ~/api/v1/attachments/compressed/issuenumber/105557 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-02-27T15:04:57.4014992Z" "QueryResults": "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Key": "CompressedEntryName", "Value": "4p0mlcq1.yjm" "Metadata": [ "AttachmentID": 141019, "IssueNumber": 105557, "FileName": "Test-Attachment-File.txt", "CreatedBy": "Admin", "CreatedDate": "2015-02-24T12:25:17.993", Version 1 for Issuetrak API Version 1.2 Page 34 of 183
"FileSizeInBytes": 5000000, "FileContent": null, "ExtensionData": [ "Key": "CompressedEntryName", "Value": "wsdf4zni.uzj" ] ], "CompressedAttachmentsContent": "UEsDBBQAAAAIAJxQW0YcTJk/CxMAAEBLTAAMAAAANHAwbWxjcTEueWpt7MGBAAAAAIAgtv2lFqkKAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ==" Version 1 for Issuetrak API Version 1.2 Page 35 of 183
CREATE AN ATTACHMENT FOR AN ISSUE (Return to: Attachments Operations Summary) Description: This method creates a new Attachment associated with a specific Issue (identified by IssueNumber) within the Issuetrak data store. The CreateAttachmentDTO object conveys the properties and file content of the new Attachment. Because Attachments are associated with Issues, the IssueNumber property of the DTO must correspond to an existing Issue. If there is no such IssueNumber, an error message will be returned with a 400 HTTP status code. A successful response will include an HTTP status code of 201 (Created), and the response body will represent the 32-bit integer value representing the ID of the newly-created Attachment. Request DTO Schema: Request HTTP Verb: POST CreateAttachmentDTO Response Status Codes: IssueNumber (integer), Success: 201 (Created) FileName (string), Invalid Data: 400 CreatedBy (string), Non-existent Issue: 400 CreatedDate (ISO 8601 string), FileSizeInBytes (integer), FileContent (Base64 string) Request DTO Property Notes: The FileName property value must comply with the character limitations imposed on standard Windows file names. The CreatedBy property value must reference an existing, active User within the Issuetrak application. The FileSizeInBytes property value must match the number of bytes present in FileContent after decoding from base-64. The FileContent property value must contain the base-64-encoded contents of the Attachment file. Sample Request URL: ~/api/v1/attachments/ Sample Request: "IssueNumber": 100, "FileName": "Test-Attachment.txt", "CreatedBy": "Admin", "CreatedDate": "2014-01-01T11:30:10.0000000", "FileSizeInBytes": 26, "FileContent": "VGhpcyBpcyBhIHRlc3QgYXR0YWNobWVudC4=" Sample Response HTTP Status Code: 201 Sample Response Body: 140367 (represents the newly-created Attachment ID) Version 1 for Issuetrak API Version 1.2 Page 36 of 183
API OPERATIONS FOR CAUSES TABLE 5: CAUSES API OPERATIONS SUMMARY Operation Name Retrieve a Cause by Cause ID Relative API Request Path ~/api/v1/causes/causeid HTTP Verb GET Description Retrieve a single Cause by Cause ID. Retrieve all Causes ~/api/v1/causes GET Retrieve a collection of currently defined Causes. Version 1 for Issuetrak API Version 1.2 Page 37 of 183
RETRIEVE A CAUSE BY CAUSE ID (Return to: Causes Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a Cause from the Issuetrak data store for a specified Cause ID. The causeid parameter must correspond to an existing Cause. If there is no such Cause ID, an error message will be returned with an HTTP response status code of 404. When retrieving a Cause using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the CauseName returned via the API method represents the CauseName as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the CauseName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadCauseDTO instance. Response DTO Schema: ReadCauseDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), CauseID": 0, CauseName": "", DisplayOrder": 0 Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid Cause ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Cause: 404 Invalid Cause ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/causes/11 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "CauseID": 11, "CauseName": "Duplicate Ticket", "DisplayOrder": 0 Version 1 for Issuetrak API Version 1.2 Page 38 of 183
RETRIEVE ALL CAUSES (Return to: Causes Operations Summary) Description: This API method retrieves a collection of all currently-defined Causes from the Issuetrak data store. When retrieving a Cause using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the CauseName returned via the API method represents the CauseName as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the CauseName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadCauseDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "CauseID": 0, "CauseName": "", "DisplayOrder": 0 ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Sample Request URL: ~/api/v1/causes/ Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent Cause: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadCauseDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 39 of 183
"CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "CauseID": 0, "CauseName": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 40 of 183
API OPERATIONS FOR CLASSES TABLE 6: CLASSES API OPERATIONS SUMMARY Operation Name Retrieve a Class by Class ID Relative API Request Path ~/api/v1/classes/classid HTTP Verb GET Description Retrieve a single Class by Class ID. Retrieve all Classes ~/api/v1/classes GET Retrieve a collection of currently defined Classes. Version 1 for Issuetrak API Version 1.2 Page 41 of 183
RETRIEVE A CLASS BY CLASS ID (Return to: Classes Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a Class from the Issuetrak data store for a specified Class ID. The classid parameter must correspond to an existing Class. If there is no such Class ID, an error message will be returned with an HTTP response status code of 404. When retrieving a Class using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the Class Name returned via the API method represents the Class Name as stored within the Issuetrak database. Thus, when retrieving a Class created through the Issuetrak web interface where HTML encoding of the ClassName is performed, the API consumer may desire to perform additional clientside decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadClassDTO instance. Response DTO Schema: ReadClassDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), ClassID: 0, ClassName: "", DisplayOrder": 0, IsInactive:false Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid Class ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Class: 404 Invalid Class ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/classes/1 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "ClassID": 11, "ClassName": "General", "DisplayOrder": 1, "IsInactive": false Version 1 for Issuetrak API Version 1.2 Page 42 of 183
RETRIEVE ALL CLASSES (Return to: Classes Operations Summary) Description: This API method retrieves a collection of all currently-defined Classes from the Issuetrak data store. When retrieving a Class using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the ClassName returned via the API method represents the ClassName as stored within the Issuetrak database. Thus, when retrieving a Class created through the Issuetrak web interface where HTML encoding of the ClassName is performed, the API consumer may desire to perform additional clientside decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadClassDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "ClassID": 0, "ClassName": "", "DisplayOrder": 0, "IsInactive": false ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Sample Request URL: ~/api/v1/classes/ Sample Response: "IsPageIndexZeroBased": true, Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent Class: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadClassDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 43 of 183
"PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "ClassID": 1, "ClassName": "General", "DisplayOrder": 1, "IsInactive": false ] Version 1 for Issuetrak API Version 1.2 Page 44 of 183
API OPERATIONS FOR DEPARTMENTS TABLE 7: DEPARTMENTS API OPERATIONS SUMMARY Operation Name Retrieve an Department by Department ID Retrieve all Departments Relative API Request Path ~/api/v1/departments/departmentid ~/api /v1/departments HTTP Verb GET GET Description Retrieve a single Department by Department ID. Retrieve a collection of currently defined Departments. Version 1 for Issuetrak API Version 1.2 Page 45 of 183
RETRIEVE A DEPARTMENT BY DEPARTMENT ID (Return to: Departments Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a Department from the Issuetrak data store for a specified Department ID. The departmentid parameter must correspond to an existing Department. If there is no such Department ID, an error message will be returned with an HTTP response status code of 404. When retrieving an Department using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the DepartmentName returned via the API method represents the DepartmentName as stored within the Issuetrak database. Thus, when retrieving an Department created through the Issuetrak web interface where HTML encoding of the DepartmentName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadDepartmentDTO instance. Response DTO Schema: ReadDepartmentDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), DepartmentID": 0, DepartmentName": "", DisplayOrder": 0 Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid Department ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Department: 404 Invalid Department ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/departments/11 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "DepartmentID": 11, "DepartmentName": "Duplicate Ticket", "DisplayOrder": 0 Version 1 for Issuetrak API Version 1.2 Page 46 of 183
RETRIEVE ALL DEPARTMENTS (Return to: Departments Operations Summary) Description: This API method retrieves a collection of all currently-defined Departments from the Issuetrak data store. When retrieving an Department using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the DepartmentName returned via the API method represents the DepartmentName as stored within the Issuetrak database. Thus, when retrieving an Department created through the Issuetrak web interface where HTML encoding of the DepartmentName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadDepartmentDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "DepartmentID": 0, "DepartmentName": "", "DisplayOrder": 0 ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Sample Request URL: ~/api/v1/departments/ Sample Response: "IsPageIndexZeroBased": true, Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent Department: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadDepartmentDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 47 of 183
"PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "DepartmentID": 0, "DepartmentName": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 48 of 183
API OPERATIONS FOR ISSUES TABLE 8: ISSUES API OPERATIONS SUMMARY Operation Name Retrieve an Issue by Issue Number Retrieve a Collection of Issues by Issue Number List Relative API Request Path ~/api/v1/issues/includenotes/issuenumber ~/api /v1/issues/includenotes/?issuenumbers= HTTP Verb GET GET Create an Issue ~/api/v1/issues POST Update an Issue ~/api/v1/issues PUT Search Issues ~/api/v1/issues/search POST Description Retrieve a single Issue from by Issue Number. Retrieve a collection of issues for a delimited list of issue numbers. Create a new Issue. Update an existing Issue. Search issues for specified search filters, ordering instructions, and paging boundaries. Version 1 for Issuetrak API Version 1.2 Page 49 of 183
RETRIEVE AN ISSUE BY ISSUE NUMBER (Return to: Issues Operations Summary) Description: This API method retrieves an Issue from the Issuetrak data store for a specified Issue Number value. The issuenumber parameter must correspond to an existing Issue. If there is no such Issue Number, an error message will be returned with an HTTP response status code of 400. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadIssueDTO instance. The ReadIssueDTO response instance will contain a collection of ReadNoteDTO instances if the includenotes parameter was specified as true; otherwise, the Notes array will be null. The ReadIssueDTO response instance will contain a collection of ReadIssueUserDefinedFieldDTO representing the user-defined fields defined for the Issue if any user-defined fields are defined. When retrieving an Issue using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the Subject, Description, and NoteText returned via the API method represents the text as stored within the Issuetrak database. Thus, when retrieving an Issue created through the Issuetrak web interface where HTML encoding of the Subject, Description, and NoteText are performed, the API consumer may desire to perform additional client-side decoding. Changes to ReadIssueDTO from Previous API Versions: Beginning in API v 1.2, the following properties were added to describe the Service Level Agreement (SLA) relationship for the Issue. These property values are only relevant for Issuetrak applications where the SLA feature is enabled. SeverityID SLAID (Service Level Agreement ID) ResponseTime SLAComplianceStatus: This is a read-only, calculated property with one of the following values: NotAnSLAIssue, InCompliance, HalfCompliance, OutOfCompliance Response DTO Schema: Request HTTP Verb: GET ReadIssueDTO IssueNumber (integer), IssueSolution (string), Status (string), ClosedBy (string), ClosedDate (ISO 8601 string), SubmittedDate (ISO 8601 string), CauseID (integer), SeverityID (integer), SLAID (integer), ResponseTime (ISO 8601 string), SLAComplianceStatus (string), Notes (array[readnotedto]), UserDefinedFields Response Status Codes: Success: 200 Invalid Issue Number: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Issue: 404 Invalid Issue Number: 422 (Unprocessable Entity, e.g., a nonnumeric value is supplied) Version 1 for Issuetrak API Version 1.2 Page 50 of 183
(array[readissueuserdefinedfielddto]), ExtensionData (array[customkeyvaluepairdataelement]), Metadata (array[customkeyvaluepairdataelement]), Subject (string), Description (string), IsDescriptionRichText (boolean), IssueTypeID (integer), IssueSubTypeID (integer), IssueSubType2ID (integer), IssueSubType3ID (integer), IssueSubType4ID (integer), Priority (string), AssetNumber (integer), LocationID (string), SubmittedBy (string), AssignedTo (string), TargetDate (ISO 8601 string), RequiredByDate (ISO 8601 string), NextActionTo (string), SubStatusID (integer), ProjectID (integer), OrganizationID (integer), ShouldNeverSendEmailForIssue (boolean), ClassID (integer), DepartmentID (integer), SpecialFunction1 (string), SpecialFunction2 (string), SpecialFunction3 (string), SpecialFunction4 (string), SpecialFunction5 (string) ReadNoteDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), NoteID (integer), IssueNumber (integer), CreatedDate (ISO 8601 string), CreatedBy (string), ModifiedBy (string), ModifiedDate (ISO 8601 string), NoteText (string), IsPrivate (boolean), IsRichText (boolean) ReadIssueUserDefinedFieldDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), Version 1 for Issuetrak API Version 1.2 Page 51 of 183
IssueNumber (integer), DisplayName (string), UserDefinedFieldID (integer), Value (string) Response DTO Property Notes: The Notes property represents the collection of ReadNoteDTO instances for the Issue. The UserDefinedFields property represents the collection of ReadIssueUserDefinedFieldDTO instances for the Issue. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. The ExtensionData property is not used in version 1 of the API. Sample Request URL: ~/api/v1/issues/101502/false Sample Response: "IssueNumber": 101502, "IssueSolution": null, "Status": "Open", "ClosedBy": "APIUser", "ClosedDate": "2015-02-12T11:23:42.193", "SubmittedDate": "2014-07-30T13:38:10.12", "CauseID": null, "SeverityID": 3, "SLAID": 1, "ResponseTime": null, "SLAComplianceStatus": "InCompliance", "Notes": [ "UserDefinedFields": [ "ExtensionData": [ "Metadata": [ "IssueNumber": 101502, "DisplayName": "Large Text 1", "UserDefinedFieldID": 4, "Value": "Large Text 1 User-defined Field Property Updated on: 02/12/2015 11:23:42", "ExtensionData": [ "Metadata": [ "IssueNumber": 101502, "DisplayName": "Large Text 2", "UserDefinedFieldID": 5, "Value": "Large Text 2 User-defined Field Property Updated on: 02/12/2015 11:23:42" "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", Version 1 for Issuetrak API Version 1.2 Page 52 of 183
"Key": "QueryDate", "Value": "2015-02-12T18:54:10.1544752Z" "Subject": "This Issue's Subject (DB: IssueDescription) was updated on 02/12/2015 11:23:42.ZAOUPDNCAJRDRYKOLTRNPWIMMFASXCJWOIKYYBZWCSAWUGUITWMAZBYDSCHJCUEYAVPIOMPJTUKX WLSFKSZBPIWMJGGWTPUHNBWYRLTGGC", "Description": "This description was created on 2/12/2015 12:32:30 PM. Random text follows: GTQAPNDPVYYODEJGSOUAABSTFQZDTMUMIQEDEMZUDICNKQXQDAMWPBLFAWVY", "IsDescriptionRichText": false, "IssueTypeID": 5, "IssueSubTypeID": null, "IssueSubType2ID": null, "IssueSubType3ID": null, "IssueSubType4ID": null, "Priority": "High", "AssetNumber": null, "LocationID": "", "SubmittedBy": "Issuetrak", "AssignedTo": "Issuetrak", "TargetDate": null, "RequiredByDate": null, "NextActionTo": null, "SubStatusID": 12, "ProjectID": null, "OrganizationID": 1, "ShouldNeverSendEmailForIssue": null, "ClassID": 1, "DepartmentID": 1, "SpecialFunction1": "", "SpecialFunction2": "", "SpecialFunction3": "", "SpecialFunction4": "", "SpecialFunction5": "" Version 1 for Issuetrak API Version 1.2 Page 53 of 183
RETRIEVE A COLLECTION OF ISSUES FOR A LIST OF ISSUE NUMBERS (Return to: Issues Operations Summary) Description: This method retrieves a collection of Issues from the Issuetrak data store for a list of specified Issue Numbers. The list is passed to the method via a custom querystring parameter of comma-delimited Issue Number values. The Issue Number values must correspond to existing Issues. If there is no such IssueNumber, an error message will be returned with an HTTP response status code of 400. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadIssueDTO instances. Each ReadIssueDTO response instance will contain a collection of ReadNoteDTO instances if the includenotes parameter was specified as true; otherwise, the Notes array will be null. Each ReadIssueDTO response instance will contain a collection of ReadIssueUserDefinedFieldDTO representing the user-defined fields defined for the Issue if any user-defined fields are defined. When retrieving an Issue using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the Subject, Description, and NoteText returned via the API method represents the text as stored within the Issuetrak database. Thus, when retrieving an Issue created through the Issuetrak web interface where HTML encoding of the Subject, Description, and NoteText are performed, the API consumer may desire to perform additional client-side decoding. Changes to ReadIssueDTO from Previous API Versions: Beginning in API v 1.2, the following properties were added to describe the Service Level Agreement (SLA) relationship for the Issue. These property values are only relevant for Issuetrak applications where the SLA feature is enabled. SeverityID SLAID (Service Level Agreement ID) ResponseTime SLAComplianceStatus: This is a read-only, calculated property with one of the following values: NotAnSLAIssue, InCompliance, HalfCompliance, OutOfCompliance Response DTO Schema: IQueryResultsContainer<ReadIssueDTO> IsPageIndexZeroBased (boolean), PageIndex (integer), CountForPage (integer), PageSize (integer), TotalCount (integer), Collection (array[readissuedto]) Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent Issue: 400 Invalid Issue Number List: 422 (Unprocessable Entity, e.g., negative or non-numeric values are supplied) ReadIssueDTO IssueNumber (integer), Version 1 for Issuetrak API Version 1.2 Page 54 of 183
IssueSolution (string), Status (string), ClosedBy (string), ClosedDate (ISO 8601 string), SubmittedDate (ISO 8601 string), CauseID (integer), SeverityID (integer), SLAID (integer), ResponseTime (ISO 8601 string), SLAComplianceStatus (string), Notes (array[readnotedto]), UserDefinedFields (array[readissueuserdefinedfielddto]), ExtensionData (array[customkeyvaluepairdataelement]), Metadata (array[customkeyvaluepairdataelement]), Subject (string), Description (string), IsDescriptionRichText (boolean), IssueTypeID (integer), IssueSubTypeID (integer), IssueSubType2ID (integer), IssueSubType3ID (integer), IssueSubType4ID (integer), Priority (string), AssetNumber (integer), LocationID (string), SubmittedBy (string), AssignedTo (string), TargetDate (ISO 8601 string), RequiredByDate (ISO 8601 string), NextActionTo (string), SubStatusID (integer), ProjectID (integer), OrganizationID (integer), ShouldNeverSendEmailForIssue (boolean), ClassID (integer), DepartmentID (integer), SpecialFunction1 (string), SpecialFunction2 (string), SpecialFunction3 (string), SpecialFunction4 (string), SpecialFunction5 (string) ReadNoteDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), NoteID (integer), IssueNumber (integer), Version 1 for Issuetrak API Version 1.2 Page 55 of 183
CreatedDate (ISO 8601 string), CreatedBy (string), ModifiedBy (string), ModifiedDate (ISO 8601 string), NoteText (string), IsPrivate (boolean), IsRichText (boolean) ReadIssueUserDefinedFieldDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), IssueNumber (integer), DisplayName (string), UserDefinedFieldID (integer), Value (string) Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadIssueDTO instances. The Notes property represents the collection of ReadNoteDTO instances for the Issue. The UserDefinedFields property represents the collection of ReadIssueUserDefinedFieldDTO instances for the Issue. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. The ExtensionData property is not used in version 1 of the API. Sample Request URL: ~/api/v1/issues/true/list/?issuenumbers=104413,104414 Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 2, "PageSize": 2147483647, "TotalCount": 2, "Collection": [ "IssueNumber": 104413, "IssueSolution": null, "Status": "Open", "ClosedBy": null, "ClosedDate": null, "SubmittedDate": "2014-10-07T14:34:48.73", "CauseID": null, Version 1 for Issuetrak API Version 1.2 Page 56 of 183
"SeverityID": null, "SLAID": null, "ResponseTime": null, "SLAComplianceStatus": "NotAnSLAIssue", "Notes": [ "ExtensionData": [ "Metadata": [ "NoteID": 123093, "IssueNumber": 104413, "CreatedDate": "2014-10-07T14:34:46.923", "CreatedBy": "Admin", "ModifiedBy": null, "ModifiedDate": null, "NoteText": "This note was created on 10/7/2014 2:34:47 PM. Random text follows: KUBASVVKXDGSNAJXIKSSEFDPBFRWHNYVEMYTTQDHLNVPGSQMQLGLRYVFRLYNDZCKFKNBCQERGKGRJOIJPFGW", "IsPrivate": false, "IsRichText": false, "ExtensionData": [ "Metadata": [ "NoteID": 123094, "IssueNumber": 104413, "CreatedDate": "2014-10-07T14:34:46.923", "CreatedBy": "Admin", "ModifiedBy": null, "ModifiedDate": null, "NoteText": "This note was created on 10/7/2014 2:34:47 PM. Random text follows: YFKSWUMCBCINMPOXSRGWOZILPSZMXJQELINKCYOOYMBRZEYLVNUDFLRYXZCEUAERMDBDCDVTDSYCXQMLTORJ PMZZRONCVKTXHKFWCVJRSAAMNOBHNRKGJVCADBLNPSYTZBVMLPIYFZROLMMCNGPDZMNLIESAJVBACGNMT", "IsPrivate": false, "IsRichText": false, "ExtensionData": [ "Metadata": [ "NoteID": 123095, "IssueNumber": 104413, "CreatedDate": "2014-10-07T14:34:46.923", "CreatedBy": "Admin", "ModifiedBy": null, "ModifiedDate": null, "NoteText": "This note was created on 10/7/2014 2:34:47 PM. Random text follows: YFKSWUMCBCINMPOXSRGWOZILPSZMXJQELINKCYOOYMBRZEYLVNUDFLRYXZCEUAERMDBDCDVTDSYCXQMLTORJ PMZZRONCVKTXHKFWCVJRSAAMNOBHNRKGJVCADBLNPSYTZBVMLPIYFZROLMMCNGPDZMNLIESAJVBACGNMT", "IsPrivate": false, "IsRichText": false, "ExtensionData": [ Version 1 for Issuetrak API Version 1.2 Page 57 of 183
"Metadata": [ "NoteID": 123096, "IssueNumber": 104413, "CreatedDate": "2014-10-07T14:34:46.923", "CreatedBy": "Admin", "ModifiedBy": null, "ModifiedDate": null, "NoteText": "This note was created on 10/7/2014 2:34:47 PM. Random text follows: LQTKAUDUEBKIKESWCYVAYTNHDFHBNGHOSFCCKGYVKLIUSPHKZQJVTZNSDMHVMCHYUVPECPMVAAQNLSPNYXB", "IsPrivate": false, "IsRichText": false, "ExtensionData": [ "Metadata": [ "NoteID": 123097, "IssueNumber": 104413, "CreatedDate": "2014-10-07T14:34:46.923", "CreatedBy": "Admin", "ModifiedBy": null, "ModifiedDate": null, "NoteText": "This note was created on 10/7/2014 2:34:47 PM. Random text follows: LQTKAUDUEBKIKESWCYVAYTNHDFHBNGHOSFCCKGYVKLIUSPHKZQJVTZNSDMHVMCHYUVPECPMVAAQNLSPNYXB WXLVTSKZYZDIIDKAWACIJDNVSJZGLXTXPAKBIAVMSQOWWRHKARSNVPSTJPCKSDNBFGTHSJRVEPQSPQZBBPFTE", "IsPrivate": false, "IsRichText": false "UserDefinedFields": [ "ExtensionData": [ "Metadata": [ "IssueNumber": 104413, "DisplayName": "Large Text 1", "UserDefinedFieldID": 4, "Value": "Large Text 1 User-defined Field Property Created on: 10/07/2014 02:34:46", "ExtensionData": [ "Metadata": [ "IssueNumber": 104413, "DisplayName": "Large Text 2", "UserDefinedFieldID": 5, "Value": "Large Text 2 User-defined Field Property Created on: 10/07/2014 02:34:46" "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1" Version 1 for Issuetrak API Version 1.2 Page 58 of 183
, "Key": "QueryDate", "Value": "2015-02-12T19:00:36.0140573Z" "Subject": "This subject was created on 10/7/2014 2:34:47 PM. Random text follows: JZIQKVNZRGCCRWBYOWOJKQTXAGCRCVPDQTUKCAITMPIJVVZOHGEBQYETFLQETWWWQZMYBRVNNVXVHKCFGO KWQOMRPBERKEZQSMTWJAMQKQNUBILVIL", "Description": "This description was created on 10/7/2014 2:34:47 PM. Random text follows: JZIQKVNZRGCCRWBYOWOJKQTXAGCRCVPDQTUKCAITMPIJVVZOHGEBQYETFLQETWWWQZMYBRVNNVXVHKCF", "IsDescriptionRichText": false, "IssueTypeID": 0, "IssueSubTypeID": 0, "IssueSubType2ID": null, "IssueSubType3ID": null, "IssueSubType4ID": null, "Priority": "High", "AssetNumber": 0, "LocationID": "", "SubmittedBy": "Admin", "AssignedTo": null, "TargetDate": null, "RequiredByDate": null, "NextActionTo": null, "SubStatusID": 0, "ProjectID": 0, "OrganizationID": 1, "ShouldNeverSendEmailForIssue": false, "ClassID": 1, "DepartmentID": 1, "SpecialFunction1": null, "SpecialFunction2": null, "SpecialFunction3": null, "SpecialFunction4": null, "SpecialFunction5": null, "IssueNumber": 104414, "IssueSolution": null, "Status": "Open", "ClosedBy": null, "ClosedDate": null, "SubmittedDate": "2014-10-07T14:34:49.383", "CauseID": null, "SeverityID": null, "SLAID": null, "ResponseTime": null, "SLAComplianceStatus": "NotAnSLAIssue", "Notes": [ "UserDefinedFields": [ Version 1 for Issuetrak API Version 1.2 Page 59 of 183
"ExtensionData": [ "Metadata": [ "IssueNumber": 104414, "DisplayName": "Large Text 1", "UserDefinedFieldID": 4, "Value": "Large Text 1 User-defined Field Property Created on: 10/07/2014 02:34:49", "ExtensionData": [ "Metadata": [ "IssueNumber": 104414, "DisplayName": "Large Text 2", "UserDefinedFieldID": 5, "Value": "Large Text 2 User-defined Field Property Created on: 10/07/2014 02:34:49" "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-02-12T19:00:36.0140573Z" "Subject": "This subject was created on 10/7/2014 2:34:49 PM. Random text follows: KJGKITXBHEXUAPUMPRHEBETDOOVEUHLPVWJHBNXVLIBVUMSNSQVGXEWGPCVUYSGZSHYDFNKCULSTDYJCVHME MFSQADRZRCXTBBCMNPIFFTMMMCDQTTYRGCNMPICBWLKROZSBVWPGZHYTTFEYAAFYDGNZOQWFMGIUIUYNKB VWE", "Description": "This description was created on 10/7/2014 2:34:49 PM. Random text follows: KJGKITXBHEXUAPUMPRHEBETDOOVEUHLPVWJHBNXVLIBVUMSNSQVGXEWGPCVUYSGZSHYDFNKCULSTDYJCVHM", "IsDescriptionRichText": false, "IssueTypeID": 0, "IssueSubTypeID": 0, "IssueSubType2ID": null, "IssueSubType3ID": null, "IssueSubType4ID": null, "Priority": "High", "AssetNumber": 0, "LocationID": "", "SubmittedBy": "Admin", "AssignedTo": null, "TargetDate": null, "RequiredByDate": null, "NextActionTo": null, "SubStatusID": 0, "ProjectID": 0, "OrganizationID": 1, Version 1 for Issuetrak API Version 1.2 Page 60 of 183
"ShouldNeverSendEmailForIssue": false, "ClassID": 1, "DepartmentID": null, "SpecialFunction1": null, "SpecialFunction2": null, "SpecialFunction3": null, "SpecialFunction4": null, "SpecialFunction5": null ] Version 1 for Issuetrak API Version 1.2 Page 61 of 183
CREATE AN ISSUE (Return to: Issues Operations Summary) Description: This API method creates a new Issue within the Issuetrak data store. The CreateIssueDTO object conveys the properties of the new Issue along with any Note instances or User-defined Field instances to be associated with the new Issue. If invalid data are supplied, an error message will be returned with a 400 HTTP status code. Depending on the activation of Issuetrak application features, the only acceptable value for a property associated with an application feature that is not activated is null. For example, for the Use Issue Classes feature, if the feature is disabled, the ClassID property for the CreateIssueDTO instance must be set to null. For example, if a non-null value is provided for the ClassID property and the Use Issue Classes feature is not activated, an error of the following form will be returned: The specified value for the 'ClassID' property is invalid because the 'Issue Classes' feature is not activated. CreateIssueDTO properties that depend on specific Issuetrak feature activation include: AssetNumber (depends on the Activate Asset Management setting) CauseID (depends on the Causes feature in Optional Fields) ClassID (depends on the Activate Issue Classes feature) DepartmentID (depends on Use Departments and Use Resp Dept features) IssueSubTypeID (depends on the Issue Subtype 1 feature) IssueSubType2ID (depends on the Issue Subtype 2 feature) IssueSubType3ID (depends on the Issue Subtype 3 feature) IssueSubType4ID (depends on the Issue Subtype 4 feature) LocationID (depends on the Use Locations feature) NextActionTo (depends on the Next Action feature in Optional Fields) ProjectID (depends on the Use Projects feature) RequiredByDate (depends on the Required By Date feature in Optional Fields) SeverityID (depends on the Use SLAs feature) SpecialFunction1 (depends on the Use Special Function feature in Optional Fields) SpecialFunction2 (depends on the Use Special Function feature in Optional Fields) SpecialFunction3 (depends on the Use Special Function feature in Optional Fields) SpecialFunction4 (depends on the Use Special Function feature in Optional Fields) SpecialFunction5 (depends on the Use Special Function feature in Optional Fields) SubStatusID (depends on the Issue Substatus feature in Optional Fields) TargetDate (depends on the Target Date feature in Optional Fields) Please note that the value of the ProjectID property (if specified) must represent the Int32 ID value for an existing project. The existing projects may be retrieved using the Get All Projects method of the Projects API controller. Within the Issuetrak UI, the ProjectID property refers to the user-assigned project text identifier, not the Int32 value. The response code on success will be 201 (Created), and the response body will represent the 32-bit integer value representing the ID of the newly-created Issue. Changes to CreateIssueDTO from Previous API Versions: Beginning in API v 1.2, the following properties were added to describe the Service Level Agreement (SLA) Version 1 for Issuetrak API Version 1.2 Page 62 of 183
relationship for the Issue. These property values are only relevant for Issuetrak applications where the SLA feature is enabled. SeverityID When the SLA feature is not enabled for the Issuetrak application, specify a value of null for SeverityID. When the SLA feature is enabled, SeverityID is a required property and must have a non-null, non-zero, existing value. Request DTO Schema: Request HTTP Verb: POST CreateIssueDTO ShouldSuppressEmailForCreateOperation (boolean), Notes (array[createnotewithissuedto]), UserDefinedFields (array[createissueuserdefinedfielddto]), SubmittedDate (ISO 8601 string), EnteredBy (string), SeverityID (integer), Subject (string), Description (string), IsDescriptionRichText (boolean), IssueTypeID (integer), IssueSubTypeID (integer), IssueSubType2ID (integer), IssueSubType3ID (integer), IssueSubType4ID (integer), Priority (string), AssetNumber (integer), LocationID (string), SubmittedBy (string), AssignedTo (string), TargetDate (ISO 8601 string), RequiredByDate (ISO 8601 string), NextActionTo (string), SubStatusID (integer), ProjectID (integer), OrganizationID (integer), ShouldNeverSendEmailForIssue (boolean), ClassID (integer), DepartmentID (integer), SpecialFunction1 (string), SpecialFunction2 (string), SpecialFunction3 (string), SpecialFunction4 (string), SpecialFunction5 (string) Response Status Codes: Success: 201 Invalid Data: 400 CreateNoteWithIssueDTO CreatedDate (ISO 8601 string), Version 1 for Issuetrak API Version 1.2 Page 63 of 183
CreatedBy (string), NoteText (string), IsPrivate (boolean), IsRichText (boolean) CreateIssueUserDefinedFieldDTO UserDefinedFieldID (integer), Value (string) Request DTO Property Notes: The ShouldSuppressEmailForCreateOperation property value determines whether or not e-mail notifications will be sent by Issuetrak during the creation of this Issue. If 'false', e-mail notifications will be sent normally. If 'true', e-mail notifications will not be sent. The CreatedBy property value must reference an existing, active User within the Issuetrak application. Sample Request URL: ~/api/v1/issues/ Sample Request: "ShouldSuppressEmailForCreateOperation": true, "Notes": [ "UserDefinedFields": [ "UserDefinedFieldID": 4, "Value": "Large Text 1 User-defined Field Property Created on: 10/09/2014 04:27:02. Random text follows: FOHTYEGRVNTSEHYRQTTAXDETWXDDITCCRNITGTUGEJC", "UserDefinedFieldID": 5, "Value": "Large Text 2 User-defined Field Property Created on: 10/09/2014 04:27:02. Random text follows: FOHTYEGRVNTSEHYRQTTAXDETWXDDITCCRNITGTUGEJC" "SubmittedDate": "2014-10-09T16:27:02.1445287Z", "EnteredBy": "Admin", "SeverityID": "1", "Subject": "This subject was created on 10/09/2014 04:27:02. Random text follows: SDYBUFPYRPRXGSURGMFWNJZXILVOSWKTKQTCXLKZSK", "Description": "This description was created on 10/09/2014 04:27:02. Random text follows: FOHTYEGRVNTSEHYRQTTAXDETWXDDITCCRNITGTUGEJCSUZRKALDFVFKCKOX", "IsDescriptionRichText": false, "IssueTypeID": 0, "IssueSubTypeID": 0, "IssueSubType2ID": 0, "IssueSubType3ID": 0, "IssueSubType4ID": 0, "Priority": "High", "AssetNumber": 0, "LocationID": "", "SubmittedBy": "Admin", "AssignedTo": "", "TargetDate": null, Version 1 for Issuetrak API Version 1.2 Page 64 of 183
"RequiredByDate": null, "NextActionTo": "", "SubStatusID": 0, "ProjectID": 0, "OrganizationID": 1, "ShouldNeverSendEmailForIssue": true, "ClassID": 1, "DepartmentID": 1 Sample Response HTTP Status Code: 201 Sample Response Body: 104416 Version 1 for Issuetrak API Version 1.2 Page 65 of 183
UPDATE AN ISSUE (Return to: Issues Operations Summary) Description: This API method updates an existing Issue within the Issuetrak data store. The UpdateIssueDTO object conveys the properties of the Issue along with any User-defined Field instances to be associated with the new Issue. If invalid data are supplied, an error message will be returned with a 400 HTTP status code. Depending on the activation of Issuetrak application features, the only acceptable value for a property associated with an application feature that is not activated is null. For example, for the Use Issue Classes feature, if the feature is disabled, the ClassID property for the UpdateIssueDTO instance must be set to null. For example, if a non-null value is provided for the ClassID property and the Use Issue Classes feature is not activated, an error of the following form will be returned: The specified value for the 'ClassID' property is invalid because the 'Issue Classes' feature is not activated. UpdateIssueDTO properties that depend on specific Issuetrak feature activation include: AssetNumber (depends on the Activate Asset Management setting) CauseID (depends on the Causes feature in Optional Fields) ClassID (depends on the Activate Issue Classes feature) DepartmentID (depends on Use Departments and Use Resp Dept features) IssueSubTypeID (depends on the Issue Subtype 1 feature) IssueSubType2ID (depends on the Issue Subtype 2 feature) IssueSubType3ID (depends on the Issue Subtype 3 feature) IssueSubType4ID (depends on the Issue Subtype 4 feature) LocationID (depends on the Use Locations feature) NextActionTo (depends on the Next Action feature in Optional Fields) ProjectID (depends on the Use Projects feature) RequiredByDate (depends on the Required By Date feature in Optional Fields) SeverityID (depends on the Use SLAs feature) SpecialFunction1 (depends on the Use Special Function feature in Optional Fields) SpecialFunction2 (depends on the Use Special Function feature in Optional Fields) SpecialFunction3 (depends on the Use Special Function feature in Optional Fields) SpecialFunction4 (depends on the Use Special Function feature in Optional Fields) SpecialFunction5 (depends on the Use Special Function feature in Optional Fields) SubStatusID (depends on the Issue Substatus feature in Optional Fields) TargetDate (depends on the Target Date feature in Optional Fields) Please note that the value of the ProjectID property (if specified) must represent the Int32 ID value for an existing project. The existing projects may be retrieved using the Get All Projects method of the Projects API controller. Within the Issuetrak UI, the ProjectID property refers to the user-assigned project text identifier, not the Int32 value. The response code on success will be 200 (OK), and the response body will represent the 32-bit integer value representing the Issue Number of the updated Issue. Changes to UpdateIssueDTO from Previous API Versions: Beginning in API v 1.2, the following properties were added to describe the Service Level Agreement (SLA) relationship for the Issue. These property values are only relevant for Issuetrak applications where the SLA feature Version 1 for Issuetrak API Version 1.2 Page 66 of 183
is enabled. SeverityID ResponseTime IsFirstCallResolution Request DTO Schema: UpdateIssueDTO IssueNumber (integer), IssueSolution (string), Status (string), ClosedBy (string), ClosedDate (ISO 8601 string), CauseID (integer), ShouldSuppressEmailForUpdateOperation (boolean), UserDefinedFields (array[updateissueuserdefinedfielddto]), SeverityID (integer), ResponseTime (ISO 8601 string), IsFirstCallResolution (boolean), Subject (string), Description (string), IsDescriptionRichText (boolean), IssueTypeID (integer), IssueSubTypeID (integer), IssueSubType2ID (integer), IssueSubType3ID (integer), IssueSubType4ID (integer), Priority (string), AssetNumber (integer), LocationID (string), SubmittedBy (string), AssignedTo (string), TargetDate (ISO 8601 string), RequiredByDate (ISO 8601 string), NextActionTo (string), SubStatusID (integer), ProjectID (integer), OrganizationID (integer), ShouldNeverSendEmailForIssue (boolean), ClassID (integer), DepartmentID (integer), SpecialFunction1 (string), SpecialFunction2 (string), SpecialFunction3 (string), SpecialFunction4 (string), SpecialFunction5 (string) Request HTTP Verb: POST Response Status Codes: Success: 200 Invalid Data: 400 Version 1 for Issuetrak API Version 1.2 Page 67 of 183
UpdateIssueUserDefinedFieldDTO IssueNumber (integer), UserDefinedFieldID (integer), Value (string) Request DTO Property Notes: The ShouldSuppressEmailForUpdateOperation property value determines whether or not e-mail notifications will be sent by Issuetrak during the update of this Issue. If 'false', e-mail notifications will be sent normally. If 'true', e-mail notifications will not be sent. Sample Request URL: ~/api/v1/issues/ Sample Request: "ID": 79048, "IssueNumber": 79048, "IssueSolution": "", "Status": "Open", "ClosedBy": "", "ClosedDate": null, "CauseID": null, "ShouldSuppressEmailForUpdateOperation": false, "UserDefinedFields": [ "IssueNumber": 79048, "UserDefinedFieldID": 4, "Value": "Large Text 1 User-defined Field Property Updated on: 10/09/2014 04:30:00", "IssueNumber": 79048, "UserDefinedFieldID": 5, "Value": "Large Text 2 User-defined Field Property Updated on: 10/09/2014 04:30:00" "SeverityID": 1, "ResponseTIme": "2014-10-9T10:55:00", "IsFirstCallResolution": false, "Subject": "This Issue's Subject (DB: IssueDescription) was updated on 10/09/2014 04:30:00.UPVBSPTMYCPPPLJPPDFQVMOPUEFFBTETYJIBXKOPQFPJSPULDNAYKZOIAGGNJOKEXWQGCHRF OQAPWFXFK", "Description": "This Issue's Description (first note) was updated on 10/09/2014 04:30:00.UPVBSPTMYCPPPLJPPDFQVMOPUEFFBTETYJIBXKOPQFPJSPULDNAYKZOIAGGNJOKEXWQGCHRF QAPWFXFKUBN", "IsDescriptionRichText": false, "IssueTypeID": null, "IssueSubTypeID": null, "IssueSubType2ID": null, "IssueSubType3ID": null, "IssueSubType4ID": null, "Priority": "High", "AssetNumber": null, Version 1 for Issuetrak API Version 1.2 Page 68 of 183
"LocationID": "", "SubmittedBy": "Admin", "AssignedTo": "", "TargetDate": null, "RequiredByDate": null, "NextActionTo": "", "SubStatusID": 14, "ProjectID": null, "OrganizationID": 1, "ShouldNeverSendEmailForIssue": null, "ClassID": 1, "DepartmentID": 1 Sample Response HTTP Status Code: 200 Sample Response Body: 79048 (represents the Issue Number for the Issue updated) Version 1 for Issuetrak API Version 1.2 Page 69 of 183
SEARCH ISSUES (Return to: Issues Operations Summary) Description: This method retrieves a collection of Issues from the Issuetrak data store for specified query set definitions. The query set definitions can contain one or more query expressions arranged into query sets with each query set related to the other query sets via an "AND" or "OR" logical operator. The following ReadIssueDTO properties may be used as the FieldName property value within the QuerySetExpressions of the searchissuedto JSON representation: IssueNumber (integer) IssueSolution (string) Status (string) ClosedBy (string) ClosedDate (ISO 8601 string) SubmittedDate (ISO 8601 string) CauseID (integer) Subject (string) Description (string) IssueTypeID (integer) IssueSubTypeID (integer) IssueSubType2ID (integer) IssueSubType3ID (integer) IssueSubType4ID (integer) Priority (string) AssetNumber (integer) LocationID (string) SubmittedBy (string) AssignedTo (string) TargetDate (ISO 8601 string) RequiredByDate (ISO 8601 string) NextActionTo (string) SubStatusID (integer) ProjectID (integer) OrganizationID (integer) ClassID (integer) DepartmentID (integer) SpecialFunction1 (string) SpecialFunction2 (string) SpecialFunction3 (string) SpecialFunction4 (string) SpecialFunction5 (string) To search on User Defined Fields, specify the FieldName property of the query expression using the format UDI.ID where ID is the primary key of the UDFields table record for the User Defined Field you want to search on. For example, if you want to search Issues on a User Defined Field with a primary key in the UDFields table of 5 you would use FieldName = UDI.5. Additionally, to change the output resultset ordering, one or more query order definitions may be specified with each query order definition consisting of a property name over which to apply the sorting and the sorting Version 1 for Issuetrak API Version 1.2 Page 70 of 183
direction: ASC or DESC. Paging of the results is specified by including a zero-based page index and the desired page size. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadIssueDTO instances. Each ReadIssueDTO response instance will contain a collection of ReadNoteDTO instances if the CanIncludeNotes property was specified as true; otherwise, the Notes array will be null. Each ReadIssueDTO response instance will contain a collection of ReadIssueUserDefinedFieldDTO representing the user-defined fields defined for the Issue if any user-defined fields are defined. When retrieving an Issue using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the Subject, Description, and NoteText returned via the API method represents the text as stored within the Issuetrak database. Thus, when retrieving an Issue created through the Issuetrak web interface where HTML encoding of the Subject, Description, and NoteText are performed, the API consumer may desire to perform additional client-side decoding. Request HTTP Verb: POST Response Status Codes: Success: 200 Serialization Issue: 400 Version 1 for Issuetrak API Version 1.2 Page 71 of 183
Request DTO Schema: SearchIssueDTO CanIncludeNotes (boolean), QuerySetDefinitions (array[searchquerysetdto]), QueryOrderingDefinitions (array[searchqueryorderingdto]), PageIndex (integer), PageSize (integer) SearchQuerySetDTO QuerySetIndex (integer), QuerySetOperator (string) = ['Undefined' or 'AND' or 'OR' QuerySetExpressions (array[searchqueryexpressiondto]) SearchQueryExpressionDTO QueryExpressionOperator (string) = ['Undefined' or 'AND' or 'OR' QueryExpressionOperation (string) = ['Undefined' or 'Equal' or 'NotEqual' or 'GreaterThan' or 'NotGreaterThan' or 'LessThan' or 'NotLessThan' or 'Between' or 'NotBetween' or 'In' or 'NotIn' or 'Contains' or 'DoesNotContain' or 'IsNull' or 'IsNotNull' or 'Yesterday' or 'Today' or 'Tomorrow' or 'LastWeek' or 'ThisWeek' or 'NextWeek' or 'LastMonth' or 'ThisMonth' or 'NextMonth' or 'LastYear' or 'ThisYear' or 'NextYear' FieldName (string), FieldFilterValue1 (string), FieldFilterValue2 (string) SearchQueryOrderingDTO QueryOrderingDirection (string) = ['ASC' or 'DESC' FieldName (string) Request DTO Property Notes: Sample Request URL: ~/api/v1/issues/search Sample Request (search on Issue Number): "QuerySetDefinitions": [ "QuerySetIndex": 0, "QuerySetOperator": "AND", "QuerySetExpressions": [ "QueryExpressionOperator": "AND", "QueryExpressionOperation": "Equal", "FieldName": "IssueNumber", Version 1 for Issuetrak API Version 1.2 Page 72 of 183
"FieldFilterValue1": "122", "FieldFilterValue2": "" ] "QueryOrderingDefinitions": [ "QueryOrderingDirection": "DESC", "FieldName": "IssueNumber" "PageIndex":0, "PageSize":10, "CanIncludeNotes":false Sample Request (search on User Defined Field): "QuerySetDefinitions": [ "QuerySetIndex": 0, "QuerySetOperator": "AND", "QuerySetExpressions": [ "QueryExpressionOperator": "AND", "QueryExpressionOperation": "Between", "FieldName": "UDI.6", "FieldFilterValue1": "2013-01-01T00:00:00", "FieldFilterValue2": "2013-12-31T00:00:00" ] "QueryOrderingDefinitions": [ "QueryOrderingDirection": "DESC", "FieldName": "IssueNumber" "PageIndex":0, "PageSize":10, "CanIncludeNotes":false Sample Response HTTP Status Code: 200 Sample Response Body: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 10, "TotalCount": 1, Version 1 for Issuetrak API Version 1.2 Page 73 of 183
"Collection": [ "IssueNumber": 122, "IssueSolution": "", "Status": "open", "ClosedBy": "esmith", "ClosedDate": "2011-06-27T12:09:16", "SubmittedDate": "2011-06-23T09:15:00", "CauseID": null, "Notes": [ "UserDefinedFields": [ "ExtensionData": [ "Metadata": [ "IssueNumber": 122, "DisplayName": "Payment Date", "UserDefinedFieldID": 6, "Value": "2014-07-31T11:00:00", "ExtensionData": [ "Metadata": [ "IssueNumber": 122, "DisplayName": "Amount", "UserDefinedFieldID": 7, "Value": 24.99 "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-05T14:02:55.4400115Z" "Subject": "Issue Subject", "Description": "Issue Description", "IsDescriptionRichText": false, "IssueTypeID": 5, "IssueSubTypeID": 0, "IssueSubType2ID": 0, "IssueSubType3ID": 0, "IssueSubType4ID": 0, "Priority": "Medium", "AssetNumber": null, "LocationID": "", "SubmittedBy": "admin", Version 1 for Issuetrak API Version 1.2 Page 74 of 183
"AssignedTo": "", "TargetDate": null, "RequiredByDate": null, "NextActionTo": null, "SubStatusID": 13, "ProjectID": 0, "OrganizationID": 1, "ShouldNeverSendEmailForIssue": null, "ClassID": 0, "DepartmentID": 0, "SpecialFunction1": "", "SpecialFunction2": "", "SpecialFunction3": "", "SpecialFunction4": "", "SpecialFunction5": "" ] Version 1 for Issuetrak API Version 1.2 Page 75 of 183
API OPERATIONS FOR ISSUESUBTYPES TABLE 9: ISSUESUBTYPES API OPERATIONS SUMMARY Operation Name Retrieve an IssueSubType by IssueSubType ID Relative API Request Path ~/api/v1/issuesubtypes/issuesubtypeid HTTP Verb GET Description Retrieve a single IssueSubType by IssueSubType ID. Retrieve all IssueSubTypes ~/api/v1/issuesubtypes GET Retrieve a collection of currently defined IssueSubTypes. Version 1 for Issuetrak API Version 1.2 Page 76 of 183
RETRIEVE AN ISSUESUBTYPE BY ISSUESUBTYPE ID (Return to: IssueSubTypes Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves an IssueSubType from the Issuetrak data store for a specified IssueSubType ID. The issuesubtypeid parameter must correspond to an existing IssueSubType. If there is no such IssueSubType ID, an error message will be returned with an HTTP response status code of 404. When retrieving an IssueSubType using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueSubTypeName returned via the API method represents the IssueSubTypeName as stored within the Issuetrak database. Thus, when retrieving an IssueSubType created through the Issuetrak web interface where HTML encoding of the IssueSubTypeName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadIssueSubTypeDTO instance. Response DTO Schema: ReadIssueSubTypeDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), IssueSubTypeID": 0, IssueSubTypeName": "", DisplayOrder": 0 Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid IssueSubType ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent IssueSubType: 404 Invalid IssueSubType ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/issuesubtypes/11 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "IssueSubTypeID": 11, "IssueSubTypeName": "Duplicate Ticket", "DisplayOrder": 0 Version 1 for Issuetrak API Version 1.2 Page 77 of 183
Version 1 for Issuetrak API Version 1.2 Page 78 of 183
RETRIEVE ALL ISSUESUBTYPES (Return to: IssueSubTypes Operations Summary) Description: This API method retrieves a collection of all currently-defined IssueSubTypes from the Issuetrak data store. When retrieving an IssueSubType using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueSubTypeName returned via the API method represents the IssueSubTypeName as stored within the Issuetrak database. Thus, when retrieving an IssueSubType created through the Issuetrak web interface where HTML encoding of the IssueSubTypeName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadIssueSubTypeDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "IssueSubTypeID": 0, "IssueSubTypeName": "", "DisplayOrder": 0 ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Sample Request URL: ~/api/v1/issuesubtypes/ Sample Response: "IsPageIndexZeroBased": true, Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent IssueSubType: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadIssueSubTypeDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 79 of 183
"PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "IssueSubTypeID": 0, "IssueSubTypeName": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 80 of 183
API OPERATIONS FOR ISSUESUBTYPES2 TABLE 10: ISSUESUBTYPES2 API OPERATIONS SUMMARY Operation Name Retrieve an IssueSubType2 by IssueSubType2 ID Relative API Request Path ~/api/v1/issuesubtypes2/issuesubtype2id HTTP Verb Retrieve all IssueSubTypes2 ~/api/v1/issuesubtypes2 GET GET Description Retrieve a single IssueSubType2 by IssueSubType2 ID. Retrieve a collection of currently defined IssueSubTypes2. Version 1 for Issuetrak API Version 1.2 Page 81 of 183
RETRIEVE AN ISSUESUBTYPE2 BY ISSUESUBTYPE2 ID (Return to: IssueSubTypes2 Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves an IssueSubType2 from the Issuetrak data store for a specified IssueSubType2 ID. The issuesubtype2id parameter must correspond to an existing IssueSubType2. If there is no such IssueSubType2 ID, an error message will be returned with an HTTP response status code of 404. When retrieving an IssueSubType2 using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueSubType2Name returned via the API method represents the IssueSubType2Name as stored within the Issuetrak database. Thus, when retrieving an IssueSubType2 created through the Issuetrak web interface where HTML encoding of the IssueSubType2Name is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadIssueSubType2DTO instance. Response DTO Schema: ReadIssueSubType2DTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), IssueSubType2ID": 0, IssueSubType2Name": "", DisplayOrder": 0 Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid IssueSubType2 ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent IssueSubType2: 404 Invalid IssueSubType2 ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/issuesubtypes2/11 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "IssueSubType2ID": 11, "IssueSubType2Name": "Duplicate Ticket", "DisplayOrder": 0 Version 1 for Issuetrak API Version 1.2 Page 82 of 183
RETRIEVE ALL ISSUESUBTYPES2 (Return to: IssueSubTypes2 Operations Summary) Description: This API method retrieves a collection of all currently-defined IssueSubTypes2 from the Issuetrak data store. When retrieving an IssueSubType2 using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueSubType2Name returned via the API method represents the IssueSubType2Name as stored within the Issuetrak database. Thus, when retrieving an IssueSubType2 created through the Issuetrak web interface where HTML encoding of the IssueSubType2Name is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadIssueSubType2DTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "IssueSubType2ID": 0, "IssueSubType2Name": "", "DisplayOrder": 0 ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Sample Request URL: ~/api/v1/issuesubtypes2/ Sample Response: Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent IssueSubType2: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadIssueSubType2DTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 83 of 183
"IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "IssueSubType2ID": 0, "IssueSubType2Name": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 84 of 183
API OPERATIONS FOR ISSUESUBTYPES3 TABLE 11: ISSUESUBTYPES3 API OPERATIONS SUMMARY Operation Name Retrieve an IssueSubType3 by IssueSubType3 ID Relative API Request Path ~/api/v1/issuesubtypes3/issuesubtype3id HTTP Verb GET Description Retrieve a single IssueSubType3 by IssueSubType3 ID. Retrieve all IssueSubTypes3 ~/api/v1/issuesubtypes3 GET Retrieve a collection of currently defined IssueSubTypes3. Version 1 for Issuetrak API Version 1.2 Page 85 of 183
RETRIEVE AN ISSUESUBTYPE3 BY ISSUESUBTYPE3 ID (Return to: IssueSubTypes3 Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves an IssueSubType3 from the Issuetrak data store for a specified IssueSubType3 ID. The issuesubtype3id parameter must correspond to an existing IssueSubType3. If there is no such IssueSubType3 ID, an error message will be returned with an HTTP response status code of 404. When retrieving an IssueSubType3 using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueSubType3Name returned via the API method represents the IssueSubType3Name as stored within the Issuetrak database. Thus, when retrieving an IssueSubType3 created through the Issuetrak web interface where HTML encoding of the IssueSubType3Name is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadIssueSubType3DTO instance. Response DTO Schema: ReadIssueSubType3DTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), IssueSubType3ID": 0, IssueSubType3Name": "", DisplayOrder": 0 Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid IssueSubType3 ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent IssueSubType3: 404 Invalid IssueSubType3 ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/issuesubtypes3/11 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "IssueSubType3ID": 11, "IssueSubType3Name": "Duplicate Ticket", "DisplayOrder": 0 Version 1 for Issuetrak API Version 1.2 Page 86 of 183
RETRIEVE ALL ISSUESUBTYPES3 (Return to: IssueSubTypes3 Operations Summary) Description: This API method retrieves a collection of all currently-defined IssueSubTypes3 from the Issuetrak data store. When retrieving an IssueSubType3 using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueSubType3Name returned via the API method represents the IssueSubType3Name as stored within the Issuetrak database. Thus, when retrieving an IssueSubType3 created through the Issuetrak web interface where HTML encoding of the IssueSubType3Name is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadIssueSubType3DTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "IssueSubType3ID": 0, "IssueSubType3Name": "", "DisplayOrder": 0 ] Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent IssueSubType3: 404 Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadIssueSubType3DTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/issuesubtypes3/ Sample Response: Version 1 for Issuetrak API Version 1.2 Page 87 of 183
"IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "IssueSubType3ID": 0, "IssueSubType3Name": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 88 of 183
API OPERATIONS FOR ISSUESUBTYPES4 TABLE 12: ISSUESUBTYPES4 API OPERATIONS SUMMARY Operation Name Retrieve an IssueSubType4 by IssueSubType4 ID Relative API Request Path ~/api/v1/issuesubtypes4/issuesubtype4id HTTP Verb GET Description Retrieve a single IssueSubType4 by IssueSubType4 ID. Retrieve all IssueSubTypes4 ~/api /v1/issuesubtypes4 GET Retrieve a collection of currently defined IssueSubTypes4. Version 1 for Issuetrak API Version 1.2 Page 89 of 183
RETRIEVE AN ISSUESUBTYPE4 BY ISSUESUBTYPE4 ID (Return to: IssueSubTypes4 Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves an IssueSubType4 from the Issuetrak data store for a specified IssueSubType4 ID. The issuesubtype4id parameter must correspond to an existing IssueSubType4. If there is no such IssueSubType4 ID, an error message will be returned with an HTTP response status code of 404. When retrieving an IssueSubType4 using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueSubType4Name returned via the API method represents the IssueSubType4Name as stored within the Issuetrak database. Thus, when retrieving an IssueSubType4 created through the Issuetrak web interface where HTML encoding of the IssueSubType4Name is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadIssueSubType4DTO instance. Response DTO Schema: ReadIssueSubType4DTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), IssueSubType4ID": 0, IssueSubType4Name": "", DisplayOrder": 0 Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid IssueSubType4 ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent IssueSubType4: 404 Invalid IssueSubType4 ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/issuesubtypes4/11 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "IssueSubType4ID": 11, "IssueSubType4Name": "Duplicate Ticket", "DisplayOrder": 0 Version 1 for Issuetrak API Version 1.2 Page 90 of 183
RETRIEVE ALL ISSUESUBTYPES4 (Return to: IssueSubTypes4 Operations Summary) Description: This API method retrieves a collection of all currently-defined IssueSubTypes4 from the Issuetrak data store. When retrieving an IssueSubType4 using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueSubType4Name returned via the API method represents the IssueSubType4Name as stored within the Issuetrak database. Thus, when retrieving an IssueSubType4 created through the Issuetrak web interface where HTML encoding of the IssueSubType4Name is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadIssueSubType4DTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "IssueSubType4ID": 0, "IssueSubType4Name": "", "DisplayOrder": 0 ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Sample Request URL: ~/api/v1/issuesubtypes4/ Sample Response: Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent IssueSubType4: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadIssueSubType4DTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 91 of 183
"IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "IssueSubType4ID": 0, "IssueSubType4Name": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 92 of 183
API OPERATIONS FOR ISSUETYPES TABLE 13: ISSUETYPES API OPERATIONS SUMMARY Operation Name Retrieve an IssueType by IssueType ID Retrieve all IssueTypes Relative API Request Path ~/api/v1/issuetypes/issuetypeid ~/api/v1/issuetypes HTTP Verb GET GET Description Retrieve a single IssueType by IssueType ID. Retrieve a collection of currently defined IssueTypes. Version 1 for Issuetrak API Version 1.2 Page 93 of 183
RETRIEVE AN ISSUETYPE BY ISSUETYPE ID (Return to: IssueTypes Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves an IssueType from the Issuetrak data store for a specified IssueType ID. The issuetypeid parameter must correspond to an existing IssueType. If there is no such IssueType ID, an error message will be returned with an HTTP response status code of 404. When retrieving an IssueType using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueTypeName returned via the API method represents the IssueTypeName as stored within the Issuetrak database. Thus, when retrieving an IssueType created through the Issuetrak web interface where HTML encoding of the IssueTypeName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadIssueTypeDTO instance. Response DTO Schema: ReadIssueTypeDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), IssueTypeID": 0, IssueTypeName": "", DisplayOrder": 0 Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid IssueType ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent IssueType: 404 Invalid IssueType ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/issuetypes/11 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "IssueTypeID": 11, "IssueTypeName": "Duplicate Ticket", "DisplayOrder": 0 Version 1 for Issuetrak API Version 1.2 Page 94 of 183
RETRIEVE ALL ISSUETYPES (Return to: IssueTypes Operations Summary) Description: This API method retrieves a collection of all currently-defined IssueTypes from the Issuetrak data store. When retrieving an IssueType using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the IssueTypeName returned via the API method represents the IssueTypeName as stored within the Issuetrak database. Thus, when retrieving an IssueType created through the Issuetrak web interface where HTML encoding of the IssueTypeName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadIssueTypeDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "IssueTypeID": 0, "IssueTypeName": "", "DisplayOrder": 0 ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Sample Request URL: ~/api/v1/issuetypes/ Sample Response: "IsPageIndexZeroBased": true, Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent IssueType: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadIssueTypeDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 95 of 183
"PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "IssueTypeID": 0, "IssueTypeName": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 96 of 183
API OPERATIONS FOR LOCATIONS TABLE 14: LOCATIONS API OPERATIONS SUMMARY Operation Name Retrieve a Location by Location ID Retrieve all Locations Relative API Request Path ~/api/v1/locations/locationid ~/api/v1/locations HTTP Verb GET GET Description Retrieve a single Location by Location ID. Retrieve a collection of currently defined Locations. Version 1 for Issuetrak API Version 1.2 Page 97 of 183
RETRIEVE A LOCATION BY LOCATION ID (Return to: Locations Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves an Location from the Issuetrak data store for a specified Location ID. The locationid parameter must correspond to an existing Location. If there is no such Location ID, an error message will be returned with an HTTP response status code of 404. When retrieving an Location using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the LocationName returned via the API method represents the LocationName as stored within the Issuetrak database. Thus, when retrieving an Location created through the Issuetrak web interface where HTML encoding of the LocationName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadLocationDTO instance. Response DTO Schema: ReadLocationDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), LocationID": 0, LocationName": "", DisplayOrder": 0 Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid Location ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Location: 404 Invalid Location ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/locations/11 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "LocationID": 11, "LocationName": "Duplicate Ticket", "DisplayOrder": 0 Version 1 for Issuetrak API Version 1.2 Page 98 of 183
RETRIEVE ALL LOCATIONS (Return to: Locations Operations Summary) Description: This API method retrieves a collection of all currently-defined Locations from the Issuetrak data store. When retrieving an Location using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the LocationName returned via the API method represents the LocationName as stored within the Issuetrak database. Thus, when retrieving an Location created through the Issuetrak web interface where HTML encoding of the LocationName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadLocationDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "LocationID": 0, "LocationName": "", "DisplayOrder": 0 ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Sample Request URL: ~/api/v1/locations/ Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent Location: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadLocationDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 99 of 183
"CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "LocationID": 0, "LocationName": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 100 of 183
API OPERATIONS FOR MENUITEMS TABLE 15: MENUITEMS API OPERATIONS SUMMARY Operation Name Retrieve a MenuItem by MenuItem ID Retrieve all MenuItems Relative API Request Path ~/api/v1/menuitems/menuitemid ~/api/v1/menuitems HTTP Verb GET GET Description Retrieve a single MenuItem by MenuItem ID. Retrieve a collection of currently defined MenuItems. Version 1 for Issuetrak API Version 1.2 Page 101 of 183
RETRIEVE A MENUITEM BY MENUITEM ID (Return to: MenuItems Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a MenuItem from the Issuetrak data store for a specified MenuItem ID. The menuitemid parameter must correspond to an existing MenuItem. If there is no such MenuItem ID, an error message will be returned with an HTTP response status code of 404. When retrieving a MenuItem using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the MenuItem Name returned via the API method represents the MenuItem Name as stored within the Issuetrak database. Thus, when retrieving a MenuItem created through the Issuetrak web interface where HTML encoding of the MenuItemName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadMenuItemDTO instance. Response DTO Schema: ReadMenuItemDTO ExtensionData (Array[CustomKeyValuePairDataElement optional), Metadata (Array[CustomKeyValuePairDataElement optional), MenuItemID (integer, optional), MenuID (integer, optional), MenuName (string, optional), MenuPage (string, optional) CustomKeyValuePairDataElement Key (string), Value (string) Response DTO Property Notes: Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid MenuItem ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Cause: 404 Invalid MenuItem ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/menuitems/1 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-03-24T16:07:36.500667Z" Version 1 for Issuetrak API Version 1.2 Page 102 of 183
"MenuItemID": 1, "MenuID": 1, "MenuName": "My Issues", "MenuPage": "TrakHome.asp" Version 1 for Issuetrak API Version 1.2 Page 103 of 183
RETRIEVE ALL MENUITEMS (Return to: MenuItems Operations Summary) Description: This API method retrieves a collection of all currently-defined MenuItems from the Issuetrak data store. When retrieving a MenuItem using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the MenuItemName returned via the API method represents the MenuItemName as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the MenuItemName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadMenuItemDTO instance. Response DTO Schema: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "Key": "string", "Value": "Metadata": [ "CustomKeyValuePairDataElement" "MenuItemID": 0, "MenuID": 0, "MenuName": "string", "MenuPage": "string" ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent MenuItem: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadMenuItemDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 104 of 183
Sample Request URL: ~/api/v1/menuitems/ Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-03-24T16:08:21.0863244Z" "MenuItemID": 1, "MenuID": 1, "MenuName": "My Issues", "MenuPage": "TrakHome.asp" ] Version 1 for Issuetrak API Version 1.2 Page 105 of 183
API OPERATIONS FOR NOTES TABLE 16: NOTES API OPERATIONS SUMMARY Operation Name Retrieve a Note by Note ID Relative API Request Path ~/api/v1/notes/noteid HTTP Verb GET Description Retrieve a single Note from the database by Note ID. Retrieve a Collection of Notes by Issue Number ~/api/v1/notes/issue/issuenumber GET Retrieve a collection of Notes from the database by their associated issuenumber. Create a Note for an Issue ~/api/v1/notes POST Create a new Note for an Issue. Version 1 for Issuetrak API Version 1.2 Page 106 of 183
RETRIEVE A NOTE BY NOTE ID (Return to: Notes Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a Note from the Issuetrak data store for a specified Note ID value. The noteid parameter must correspond to an existing Note. If there is no such Note ID, an error message will be returned with an HTTP response status code of 400. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadNoteDTO instance. When retrieving a Note using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the NoteText returned via the API method represents the NoteText as stored within the Issuetrak database. Thus, when retrieving a Note created through the Issuetrak web interface where HTML encoding of the NoteText is performed, the API consumer may desire to perform additional clientside decoding. Response DTO Schema: ReadNoteDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), NoteID (integer), IssueNumber (integer), CreatedDate (ISO 8601 string), CreatedBy (string), ModifiedBy (string), ModifiedDate (ISO 8601 string), NoteText (string), IsPrivate (boolean), IsRichText (boolean) Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid Note ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Note: 404 Invalid Note ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/notes/102 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-10-08T16:06:58.6146552Z" "NoteID": 102, "IssueNumber": 1, "CreatedDate": "2011-06-22T18:55:30.47", "CreatedBy": "Admin", Version 1 for Issuetrak API Version 1.2 Page 107 of 183
"ModifiedBy": "Admin", "ModifiedDate": "2014-08-22T12:11:30.063", "NoteText": "What I've done", "IsPrivate": true, "IsRichText": true Version 1 for Issuetrak API Version 1.2 Page 108 of 183
RETRIEVE A COLLECTION OF NOTES BY ISSUE NUMBER (Return to: Notes Operations Summary) Description: This API method retrieves a collection of Attachment from the Issuetrak data store for the specified Issue Number. The issuenumber parameter must correspond to an existing Issue. If there is no such IssueNumber, an error message will be returned with an HTTP response status code of 400. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadNoteDTO instance. When retrieving a Note using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the NoteText returned via the API method represents the NoteText as stored within the Issuetrak database. Thus, when retrieving a Note created through the Issuetrak web interface where HTML encoding of the NoteText is performed, the API consumer may desire to perform additional clientside decoding. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "NoteID": 0, "IssueNumber": 0, "CreatedDate": "ISO 8601 string", "CreatedBy": "", "ModifiedBy": "", "ModifiedDate": "ISO 8601 string", "NoteText": "", "IsPrivate": false, "IsRichText": false ] Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid Issue Number: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Issue: 400 Invalid Issue Number: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. Version 1 for Issuetrak API Version 1.2 Page 109 of 183
The Collection property is an array containing the ReadNoteDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/notes/issuenumber/6 Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-10-08T16:24:53.1827312Z" "NoteID": 140, "IssueNumber": 6, "CreatedDate": "2011-06-23T10:55:37.81", "CreatedBy": "TestUser", "ModifiedBy": null, "ModifiedDate": null, "NoteText": "No action needed", "IsPrivate": true, "IsRichText": true ] Version 1 for Issuetrak API Version 1.2 Page 110 of 183
CREATE A NOTE FOR AN ISSUE (Return to: Notes Operations Summary) Description: This API method creates a new Note associated with a specific Issue (identified by IssueNumber) within the Issuetrak data store. The CreateNoteDTO object conveys the properties of the new Note. Because Notes are associated with Issues, the IssueNumber property of the DTO must correspond to an existing Issue. If there is no such IssueNumber, an error message will be returned with a 400 HTTP status code. The response code on success will be 201 (Created), and the response body will represent the 32-bit integer value representing the ID of the newly-created Note. When creating a Note using the API, no special character encoding (e.g., HTML encoding < as < or > as >) is performed. This deviates from the process when creating a Note through the Issuetrak web interface where HTML encoding of the NoteText is performed. Request DTO Schema: CreateNoteDTO IssueNumber (integer), CreatedDate (ISO 8601 string), CreatedBy (string), ShouldSuppressEmailForCreateOperation (boolean), NoteText (string), IsPrivate (boolean), IsRichText (boolean) Request HTTP Verb: POST Response Status Codes: Success: 201 (Created) Invalid Data: 400 Non-existent Issue: 400 Request DTO Property Notes: The ShouldSuppressEmailForCreateOperation property value determines whether or not email notifications will be sent by Issuetrak during the creation of this Note. If 'false', email notifications will be sent normally. If 'true', email notifications will not be sent. The CreatedBy property value must reference an existing, active User within the Issuetrak application. Sample Request URL: ~/api/v1/notes/ Sample Request: "IssueNumber": 6, "CreatedDate": "2014-01-01T11:30:10.0000000", "CreatedBy": "Admin", "ShouldSuppressEmailForCreateOperation": false, "NoteText": "This is a test public note.", "IsPrivate": false, "IsRichText": false Sample Response HTTP Status Code: 201 Sample Response Body: 123101 (represents the newly-created Note ID) Version 1 for Issuetrak API Version 1.2 Page 111 of 183
API OPERATIONS FOR ORGANIZATIONS TABLE 17: ORGANIZATIONS API OPERATIONS SUMMARY Operation Name Retrieve an Organization by Organization ID Retrieve all Organizations Relative API Request Path ~/api/v1/organizations/organizationid ~/api/v1/organizations HTTP Verb GET GET Description Retrieve a single Organization by Organization ID. Retrieve a collection of currently defined Organizations. Version 1 for Issuetrak API Version 1.2 Page 112 of 183
RETRIEVE AN ORGANIZATION BY ORGANIZATION ID (Return to: Organizations Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves an Organization from the Issuetrak data store for a specified Organization ID. The organizationid parameter must correspond to an existing Organization. If there is no such Organization ID, an error message will be returned with an HTTP response status code of 404. When retrieving an Organization using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the OrganizationName returned via the API method represents the OrganizationName as stored within the Issuetrak database. Thus, when retrieving an Organization created through the Issuetrak web interface where HTML encoding of the OrganizationName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadOrganizationDTO instance. Response DTO Schema: ReadOrganizationDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), OrganizationID": 0, OrganizationName": "", DisplayOrder": 0 Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid Organization ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Organization: 404 Invalid Organization ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/organizations/11 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-09T20:19:23.9695584Z" "OrganizationID": 11, "OrganizationName": "Duplicate Ticket", "DisplayOrder": 0 Version 1 for Issuetrak API Version 1.2 Page 113 of 183
RETRIEVE ALL ORGANIZATIONS (Return to: Organizations Operations Summary) Description: This API method retrieves a collection of all currently-defined Organizations from the Issuetrak data store. When retrieving an Organization using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the OrganizationName returned via the API method represents the OrganizationName as stored within the Issuetrak database. Thus, when retrieving an Organization created through the Issuetrak web interface where HTML encoding of the OrganizationName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadOrganizationDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "OrganizationID": 0, "OrganizationName": "", "DisplayOrder": 0 ] Response DTO Property Notes: versions. future API versions. included for use in future API versions. Sample Request URL: ~/api/v1/organizations/ Sample Response: "IsPageIndexZeroBased": true, Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent Organization: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadOrganizationDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Version 1 for Issuetrak API Version 1.2 Page 114 of 183
"PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "OrganizationID": 0, "OrganizationName": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 115 of 183
API OPERATIONS FOR PRIORITIES TABLE 18: PRIORITIES API OPERATIONS SUMMARY Operation Name Retrieve a Priority by Priority ID Relative API Request Path ~/api/v1/priorities/priorityid HTTP Verb GET Description Retrieve a single Priority by Priority ID. Retrieve all Priorities ~/api/v1/priorities GET Retrieve a collection of currently defined Priorities. Version 1 for Issuetrak API Version 1.2 Page 116 of 183
RETRIEVE A PRIORITY BY PRIORITY ID (Return to: Priorities Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a Priority from the Issuetrak data store for a specified Priority ID. The PriorityID parameter must correspond to an existing Priority. If there is no such Priority ID, an error message will be returned with an HTTP response status code of 404. When retrieving a Priority using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the PriorityName returned via the API method represents the PriorityName as stored within the Issuetrak database. Thus, when retrieving a Priority created through the Issuetrak web interface where HTML encoding of the PriorityName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadPriorityDTO instance. Response DTO Schema: Request HTTP Verb: GET ReadPriorityDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), PriorityID (integer), PriorityName (string), DisplayOrder (number), AutoAssignTo (string), Message (string), Color (string) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. Response Status Codes: Success: 200 Invalid Priority ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Priority: 404 Invalid Priority ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/priorities/1 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-22T18:18:39.4719339Z" "PriorityID": 1, "PriorityName": "High", "DisplayOrder": 2, "AutoAssignTo": null, "Message": null, Version 1 for Issuetrak API Version 1.2 Page 117 of 183
"Color": null Version 1 for Issuetrak API Version 1.2 Page 118 of 183
RETRIEVE ALL PRIORITIES (Return to: Priorities Operations Summary) Description: This API method retrieves a collection of all currently-defined Priority entities from the Issuetrak data store. When retrieving a Priority using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the PriorityName returned via the API method represents the PriorityName as stored within the Issuetrak database. Thus, when retrieving a Priority created through the Issuetrak web interface where HTML encoding of the PriorityName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadPriorityDTO instance. Response DTO Schema: Request HTTP Verb: GET "IsPageIndexZeroBased": false, Response Status Codes: "PageIndex": 0, Success: 200 "CountForPage": 0, Non-existent Priority: 404 "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "PriorityID": 0, "PriorityName": "", "DisplayOrder": 0, "AutoAssignTo": "", "Message": "", "Color": "" ] Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadPriorityDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/priorities/ Sample Response (abbreviated): Version 1 for Issuetrak API Version 1.2 Page 119 of 183
"IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 4, "PageSize": 2147483647, "TotalCount": 4, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-22T18:20:15.7665624Z" "PriorityID": 1, "PriorityName": "High", "DisplayOrder": 2, "AutoAssignTo": null, "Message": null, "Color": null ] Version 1 for Issuetrak API Version 1.2 Page 120 of 183
API OPERATIONS FOR PROJECTS TABLE 19: PROJECTS API OPERATIONS SUMMARY Operation Name Retrieve a Project by Project ID Relative API Request Path ~/api/v1/projects/projectid HTTP Verb GET Description Retrieve a single Project by Project ID. Retrieve all Projects ~/api/v1/projects GET Retrieve a collection of currently defined Projects. Version 1 for Issuetrak API Version 1.2 Page 121 of 183
RETRIEVE A PROJECT BY PROJECT ID (Return to: Projects Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a Project from the Issuetrak data store for a specified Project ID. The ProjectID parameter must correspond to an existing Project. If there is no such Project ID, an error message will be returned with an HTTP response status code of 404. When retrieving a Project using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the Title returned via the API method represents the Title as stored within the Issuetrak database. Thus, when retrieving a Project created through the Issuetrak web interface where HTML encoding of the Title is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadProjectDTO instance. Response DTO Schema: Request HTTP Verb: GET ReadProjectDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), ProjectID (integer), ProjectNumber (string), Title (string), Description (string), ProjectManager (string), OrganizationID (integer), LocationID (string), Status (string), CloseDate (ISO 8601 string), OpenDate (ISO 8601 string), TargetDate (ISO 8601 string), IsExclusive (boolean), CategoryID (integer), AutoAssignTo (string), RequiredByDate (ISO 8601 string), EstimatedHours (number), ActualHours (number), EstimatedBudget (number), ActualBudget (number), PercentCompleted (number), SubStatusID (integer) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. Response Status Codes: Success: 200 Invalid Project ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Project: 404 Invalid Project ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/projects/1 Sample Response: "ExtensionData": [ "Metadata": [ Version 1 for Issuetrak API Version 1.2 Page 122 of 183
"Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-24T16:13:38.6850608Z" "ProjectID": 1, "ProjectNumber": "100", "Title": "Test-Project", "Description": "This is a test project.", "ProjectManager": null, "OrganizationID": 2, "LocationID": "HQ", "Status": "Open", "CloseDate": null, "OpenDate": "2014-12-23T13:30:00", "TargetDate": null, "IsExclusive": false, "CategoryID": null, "AutoAssignTo": null, "RequiredByDate": null, "EstimatedHours": 10, "ActualHours": null, "EstimatedBudget": 2500, "ActualBudget": null, "PercentCompleted": null, "SubStatusID": null Version 1 for Issuetrak API Version 1.2 Page 123 of 183
RETRIEVE ALL PROJECTS (Return to: Projects Operations Summary) Description: This API method retrieves a collection of all currently-defined Project entities from the Issuetrak data store. When retrieving a Project using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the Title returned via the API method represents the Title as stored within the Issuetrak database. Thus, when retrieving a Project created through the Issuetrak web interface where HTML encoding of the Title is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadProjectDTO instance. Response DTO Schema: Request HTTP Verb: GET "IsPageIndexZeroBased": false, Response Status Codes: "PageIndex": 0, Success: 200 "CountForPage": 0, Non-existent Project: 404 "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "ProjectID": 0, "ProjectNumber": "", "Title": "", "Description": "", "ProjectManager": "", "OrganizationID": 0, "LocationID": "", "Status": "", "CloseDate": "ISO 8601 string", "OpenDate": "ISO 8601 string", "TargetDate": "ISO 8601 string", "IsExclusive": false, "CategoryID": 0, "AutoAssignTo": "", "RequiredByDate": "ISO 8601 string", "EstimatedHours": 0, "ActualHours": 0, "EstimatedBudget": 0, "ActualBudget": 0, "PercentCompleted": 0, "SubStatusID": 0 ] Version 1 for Issuetrak API Version 1.2 Page 124 of 183
Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadProjectDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/projects/ Sample Response (abbreviated): "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-24T16:14:09.4182428Z" "ProjectID": 1, "ProjectNumber": "100", "Title": "Test-Project", "Description": "This is a test project.", "ProjectManager": null, "OrganizationID": 2, "LocationID": "HQ", "Status": "Open", "CloseDate": null, "OpenDate": "2014-12-23T13:30:00", "TargetDate": null, "IsExclusive": false, "CategoryID": null, "AutoAssignTo": null, "RequiredByDate": null, "EstimatedHours": 10, "ActualHours": null, "EstimatedBudget": 2500, Version 1 for Issuetrak API Version 1.2 Page 125 of 183
"ActualBudget": null, "PercentCompleted": null, "SubStatusID": null ] Version 1 for Issuetrak API Version 1.2 Page 126 of 183
API OPERATIONS FOR SERVICELEVELAGREEMENTS TABLE 20: SERVICELEVELAGREEMENTS API OPERATIONS SUMMARY Issuetrak API Version 1.2 Operation Name Retrieve a ServiceLevelAgreeme nt by ServiceLevelAgreeme nt ID Relative API Request Path ~/api/v1/servicelevelagreements/servicelevelagreeme ntid HTTP Verb GET Description Retrieve a single ServiceLevelAgreemen t by ServiceLevelAgreemen t ID. Retrieve all ServiceLevelAgreeme nts ~/api/v1/servicelevelagreements GET Retrieve a collection of currently defined ServiceLevelAgreemen ts. Version 1 for Issuetrak API Version 1.2 Page 127 of 183
RETRIEVE A SERVICELEVELAGREEMENT BY SERVICELEVELAGREEMENT ID (Return to: ServiceLevelAgreement Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a ServiceLevelAgreement from the Issuetrak data store for a specified ServiceLevelAgreement ID. The servicelevelagreementid parameter must correspond to an existing ServiceLevelAgreement. If there is no such ServiceLevelAgreement ID, an error message will be returned with an HTTP response status code of 404. When retrieving a ServiceLevelAgreement using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the ServiceLevelAgreement Name returned via the API method represents the ServiceLevelAgreement Name as stored within the Issuetrak database. Thus, when retrieving a ServiceLevelAgreement created through the Issuetrak web interface where HTML encoding of the ServiceLevelAgreementName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadServiceLevelAgreementDTO instance. Response DTO Schema: ReadServiceLevelAgreementDTO ExtensionData (array[customkeyvaluepairdataelement]), Metadata (array[customkeyvaluepairdataelement]), ServiceLevelAgreementID (integer), ServiceLevelID (integer), ClientType (string), ClientID (integer), ServiceStartDate (ISO 8601 string), ServiceEndDate (ISO 8601 string), DefaultSeverityID (integer) Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid ServiceLevelAgreement ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Cause: 404 Invalid ServiceLevelAgreement ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) CustomKeyValuePairDataElement Key (string), Value (string) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/servicelevelagreements/1 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", Version 1 for Issuetrak API Version 1.2 Page 128 of 183
"Key": "QueryDate", "Value": "2015-02-10T15:14:13.9131436Z" "ServiceLevelAgreementID": 1, "ServiceLevelID": 1, "ClientType": "Org", "ClientID": 1, "ServiceStartDate": "2015-01-01T00:00:00", "ServiceEndDate": "2050-12-31T00:00:00", "DefaultSeverityID": 1 Version 1 for Issuetrak API Version 1.2 Page 129 of 183
RETRIEVE ALL SERVICELEVELAGREEMENTS (Return to: ServiceLevelAgreement Operations Summary) Description: This API method retrieves a collection of all currently-defined ServiceLevelAgreement from the Issuetrak data store. When retrieving a ServiceLevelAgreement using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the ServiceLevelAgreementName returned via the API method represents the ServiceLevelAgreementName as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the ServiceLevelAgreementName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadServiceLevelAgreementDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "Key": "", "Value": "" "Metadata": [ "Key": "", "Value": "" "ServiceLevelAgreementID": 0, "ServiceLevelID": 0, "ClientType": "", "ClientID": 0, "ServiceStartDate": "ISO 8601 string", "ServiceEndDate": "ISO 8601 string", "DefaultSeverityID": 0 ] Response DTO Property Notes: versions. Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent ServiceLevelAgreement: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. Version 1 for Issuetrak API Version 1.2 Page 130 of 183
The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadServiceLevelAgreementDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/servicelevelagreements/ Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-02-10T15:15:17.5675084Z" "ServiceLevelAgreementID": 1, "ServiceLevelID": 1, "ClientType": "Org", "ClientID": 1, "ServiceStartDate": "2015-01-01T00:00:00", "ServiceEndDate": "2050-12-31T00:00:00", "DefaultSeverityID": 1 ] Version 1 for Issuetrak API Version 1.2 Page 131 of 183
API OPERATIONS FOR SERVICELEVELSEVERITIES TABLE 21: SERVICELEVELSEVERITIES API OPERATIONS SUMMARY Operation Name Retrieve a ServiceLevelSeverity by ServiceLevelSeverity ID Retrieve all ServiceLevelSeverities Relative API Request Path ~/api/v1/servicelevelseverities/severityid ~/api/v1/servicelevelseverities HTTP Verb GET GET Description Retrieve a single ServiceLevelSeverity by ServiceLevelSeverity ID. Retrieve a collection of currently defined ServiceLevelSeverities. Version 1 for Issuetrak API Version 1.2 Page 132 of 183
RETRIEVE A SERVICELEVELSEVERITY BY SERVICELEVELSEVERITY ID (Return to: ServiceLevelSeverities Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a ServiceLevelSeverity from the Issuetrak data store for a specified ServiceLevelSeverity ID. The severityid parameter must correspond to an existing ServiceLevelSeverity. If there is no such ServiceLevelSeverity ID, an error message will be returned with an HTTP response status code of 404. When retrieving a ServiceLevelSeverity using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the ServiceLevelSeverity Name returned via the API method represents the ServiceLevelSeverity Name as stored within the Issuetrak database. Thus, when retrieving a ServiceLevelSeverity created through the Issuetrak web interface where HTML encoding of the ServiceLevelSeverityName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadServiceLevelSeverityDTO instance. Response DTO Schema: ReadServiceLevelSeverityDTO ExtensionData (array[customkeyvaluepairdataelement]), Metadata (array[customkeyvaluepairdataelement]), SeverityID (integer), Severity (string), SeverityDescription (string), DisplayOrder (number) CustomKeyValuePairDataElement Key (string), Value (string) Response DTO Property Notes: Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid ServiceLevelSeverity ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent ServiceLevelSeverity: 404 Invalid ServiceLevelSeverity ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/servicelevelseverities/1 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-02-09T14:07:58.2787766Z" "SeverityID": 1, Version 1 for Issuetrak API Version 1.2 Page 133 of 183
"Severity": "Low", "SeverityDescription": "Low Severity", "DisplayOrder": 1 Version 1 for Issuetrak API Version 1.2 Page 134 of 183
RETRIEVE ALL SERVICELEVELSEVERITIES (Return to: ServiceLevelSeverities Operations Summary) Description: This API method retrieves a collection of all currently-defined ServiceLevelSeverities from the Issuetrak data store. When retrieving a ServiceLevelSeverity using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the ServiceLevelSeverityName returned via the API method represents the ServiceLevelSeverityName as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the ServiceLevelSeverityName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadServiceLevelSeverityDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "Key": "", "Value": "" "Metadata": [ "Key": "", "Value": "" "SeverityID": 0, "Severity": "", "SeverityDescription": "", "DisplayOrder": 0 ] Response DTO Property Notes: versions. future API versions. Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent ServiceLevelSeverities: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is Version 1 for Issuetrak API Version 1.2 Page 135 of 183
included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadServiceLevelSeverityDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/servicelevelseverities/ Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-02-09T14:32:17.9301759Z" "SeverityID": 1, "Severity": "Low", "SeverityDescription": "Low Severity", "DisplayOrder": 1, ] Version 1 for Issuetrak API Version 1.2 Page 136 of 183
API OPERATIONS FOR SERVICELEVELS TABLE 22: SERVICELEVELS API OPERATIONS SUMMARY Operation Name Retrieve a ServiceLevel by ServiceLevel ID Retrieve all ServiceLevels Relative API Request Path ~/api/v1/servicelevels/servicelevelid ~/api/v1/servicelevels HTTP Verb GET GET Description Retrieve a single ServiceLevel by ServiceLevel ID. Retrieve a collection of currently defined ServiceLevels. Version 1 for Issuetrak API Version 1.2 Page 137 of 183
RETRIEVE A SERVICELEVEL BY SERVICELEVEL ID (Return to: ServiceLevels Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a ServiceLevel from the Issuetrak data store for a specified ServiceLevel ID. The servicelevelid parameter must correspond to an existing ServiceLevel. If there is no such ServiceLevel ID, an error message will be returned with an HTTP response status code of 404. When retrieving a ServiceLevel using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the ServiceLevel Name returned via the API method represents the ServiceLevel Name as stored within the Issuetrak database. Thus, when retrieving a ServiceLevel created through the Issuetrak web interface where HTML encoding of the ServiceLevelName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadServiceLevelDTO instance. Response DTO Schema: ReadServiceLevelDTO ExtensionData (array[customkeyvaluepairdataelement]), Metadata (array[customkeyvaluepairdataelement]), ServiceLevelID (integer), ServiceLevel (string), DisplayOrder (number), Comment (string), IsInactive (boolean) Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid ServiceLevel ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Cause: 404 Invalid ServiceLevel ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) CustomKeyValuePairDataElement Key (string), Value (string) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/servicelevels/1 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-02-09T18:14:06.1227057Z" Version 1 for Issuetrak API Version 1.2 Page 138 of 183
"ServiceLevelID": 1, "ServiceLevel": "Default Service Level", "DisplayOrder": 1, "Comment": "Default Service Level", "IsInactive": null Version 1 for Issuetrak API Version 1.2 Page 139 of 183
RETRIEVE ALL SERVICELEVELS (Return to: ServiceLevels Operations Summary) Description: This API method retrieves a collection of all currently-defined ServiceLevels from the Issuetrak data store. When retrieving a ServiceLevel using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the ServiceLevelName returned via the API method represents the ServiceLevelName as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the ServiceLevelName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadServiceLevelDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "Key": "", "Value": "" "Metadata": [ "Key": "", "Value": "" "ServiceLevelID": 0, "ServiceLevel": "", "DisplayOrder": 0, "Comment": "", "IsInactive": false ] Response DTO Property Notes: versions. future API versions. Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent ServiceLevel: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is Version 1 for Issuetrak API Version 1.2 Page 140 of 183
included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadServiceLevelDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/servicelevels/ Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-02-09T18:14:57.5088438Z" "ServiceLevelID": 1, "ServiceLevel": "Default Service Level", "DisplayOrder": 1, "Comment": "Default Service Level", "IsInactive": null ] Version 1 for Issuetrak API Version 1.2 Page 141 of 183
API OPERATIONS FOR SERVICELEVELTERMS TABLE 23: SERVICELEVELTERMS API OPERATIONS SUMMARY Operation Name Retrieve a ServiceLevelTerm by ServiceLevelTerm ID Retrieve all ServiceLevelTerms Relative API Request Path ~/api/v1/servicelevelterms/serviceleveltermid ~/api/v1/servicelevelterms HTTP Verb GET GET Description Retrieve a single ServiceLevelTerm by ServiceLevelTerm ID. Retrieve a collection of currently defined ServiceLevelTerms. Version 1 for Issuetrak API Version 1.2 Page 142 of 183
RETRIEVE A SERVICELEVELTERM BY SERVICELEVELTERM ID (Return to: ServiceLevelTerms Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a ServiceLevelTerm from the Issuetrak data store for a specified ServiceLevelTerm ID. The serviceleveltermid parameter must correspond to an existing ServiceLevelTerm. If there is no such ServiceLevelTerm ID, an error message will be returned with an HTTP response status code of 404. When retrieving a ServiceLevelTerm using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the ServiceLevelTerm Name returned via the API method represents the ServiceLevelTerm Name as stored within the Issuetrak database. Thus, when retrieving a ServiceLevelTerm created through the Issuetrak web interface where HTML encoding of the ServiceLevelTermName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadServiceLevelTermDTO instance. Response DTO Schema: ReadServiceLevelTermDTO ExtensionData (array[customkeyvaluepairdataelement]), Metadata (array[customkeyvaluepairdataelement]), ServiceLevelTermID (integer), ServiceLevelID (integer), SeverityID (integer), ResponseTime (integer), ResolutionTime (integer), CoverageStartDay (integer), CoverageEndDay (integer), Comment (string), CanUseSystemOffDates (boolean) CustomKeyValuePairDataElement Key (string), Value (string) Response DTO Property Notes: Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid ServiceLevelTerm ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Cause: 404 Invalid ServiceLevelTerm ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. The CoverageStartDay property is an Int32 value in the range 1 to 7 with 1 representing Monday, 2 representing Tuesday,, 7 representing Sunday. The CoverageEndDay property is an Int32 value in the range 1 to 7 with 1 representing Monday, 2 representing Tuesday,, 7 representing Sunday. Sample Request URL: ~/api/v1/servicelevelterms/1 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", Version 1 for Issuetrak API Version 1.2 Page 143 of 183
"Value": "v1", "Key": "QueryDate", "Value": "2015-02-09T15:46:07.8521238Z" "ServiceLevelTermID": 1, "ServiceLevelID": 1, "SeverityID": 3, "ResponseTime": 10, "ResolutionTime": 30, "CoverageStartTime": "1899-12-30T00:00:00", "CoverageEndTime": "1899-12-30T23:59:00", "CoverageStartDay": 1, "CoverageEndDay": 7, "Comment": "Test Comment", "CanUseSystemOffDates": true Version 1 for Issuetrak API Version 1.2 Page 144 of 183
RETRIEVE ALL SERVICELEVELTERMS (Return to: ServiceLevelTerms Operations Summary) Description: This API method retrieves a collection of all currently-defined ServiceLevelTerms from the Issuetrak data store. When retrieving a ServiceLevelTerm using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the ServiceLevelTermName returned via the API method represents the ServiceLevelTermName as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the ServiceLevelTermName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadServiceLevelTermDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "Key": "", "Value": "" "Metadata": [ "Key": "", "Value": "" "ServiceLevelTermID": 0, "ServiceLevelID": 0, "SeverityID": 0, "ResponseTime": 0, "ResolutionTime": 0, "CoverageStartDay": 0, "CoverageEndDay": 0, "Comment": "", "CanUseSystemOffDates": false ] Response DTO Property Notes: Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent ServiceLevelTerm: 404 The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. Version 1 for Issuetrak API Version 1.2 Page 145 of 183
The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadServiceLevelTermDTO objects returned. The ExtensionData property is not implemented in v1 of the API. The CoverageStartDay property is an Int32 value in the range 1 to 7 with 1 representing Monday, 2 representing Tuesday,, 7 representing Sunday. The CoverageEndDay property is an Int32 value in the range 1 to 7 with 1 representing Monday, 2 representing Tuesday,, 7 representing Sunday. Sample Request URL: ~/api/v1/servicelevelterms/ Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-02-09T15:44:45.3778772Z" "ServiceLevelTermID": 1, "ServiceLevelID": 1, "SeverityID": 3, "ResponseTime": 10, "ResolutionTime": 30, "CoverageStartTime": "1899-12-30T00:00:00", "CoverageEndTime": "1899-12-30T23:59:00", "CoverageStartDay": 1, "CoverageEndDay": 7, "Comment": "Test Comment", "CanUseSystemOffDates": true ] Version 1 for Issuetrak API Version 1.2 Page 146 of 183
API OPERATIONS FOR SUBSTATUSES TABLE 24: SUBSTATUSES API OPERATIONS SUMMARY Operation Name Retrieve a Substatus by Substatus ID Retrieve all Substatuses Relative API Request Path ~/api/v1/substatuses/substatusid ~/api/v1/substatuses HTTP Verb GET GET Description Retrieve a single Substatus by Substatus ID. Retrieve a collection of currently defined Substatuses. Version 1 for Issuetrak API Version 1.2 Page 147 of 183
RETRIEVE A SUBSTATUS BY SUBSTATUS ID (Return to: Substatuses Operations Summary) Description: This API method retrieves a Substatus from the Issuetrak data store for a specified Substatus ID. The substatusid parameter must correspond to an existing Substatus. If there is no such Substatus ID, an error message will be returned with an HTTP response status code of 404. When retrieving a Substatus using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the SubStatusName returned via the API method represents the SubstatusName as stored within the Issuetrak database. Thus, when retrieving a Substatus created through the Issuetrak web interface where HTML encoding of the SubstatusName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadSubstatusDTO instance. Response DTO Schema: Request HTTP Verb: GET ReadSubStatusDTO Response Status Codes: Success: 200 ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), SubStatusID (integer), SubStatusName (string), DisplayOrder (number) Invalid Substatus ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Substatus: 404 Invalid Substatus ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/substatuses/13 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-22T16:03:33.1153793Z" "SubStatusID": 13, "SubStatusName": "Pending Assignment", "DisplayOrder": 1 Version 1 for Issuetrak API Version 1.2 Page 148 of 183
RETRIEVE ALL SUBSTATUSES (Return to: Substatuses Operations Summary) Description: This API method retrieves a collection of all currently-defined Substatus entiries from the Issuetrak data store. When retrieving a Substatus using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the SubstatusName returned via the API method represents the SubstatusName as stored within the Issuetrak database. Thus, when retrieving a Substatus created through the Issuetrak web interface where HTML encoding of the SubstatusName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadSubstatusDTO instance. Response DTO Schema: Request HTTP Verb: GET "IsPageIndexZeroBased": false, Response Status Codes: "PageIndex": 0, Success: 200 "CountForPage": 0, Non-existent Substatus: 404 "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "SubStatusID": 0, "SubStatusName": "", "DisplayOrder": 0 ] Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadSubstatusDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/substatuses/ Sample Response (abbreviated): "IsPageIndexZeroBased": true, Version 1 for Issuetrak API Version 1.2 Page 149 of 183
"PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 11, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-22T16:06:29.8010461Z" "SubStatusID": 8, "SubStatusName": "Complete - Pending Second Review", "DisplayOrder": 9 ] Issuetrak API Version 1.2 Version 1 for Issuetrak API Version 1.2 Page 150 of 183
API OPERATIONS FOR TIMEZONES TABLE 25: TIMEZONES API OPERATIONS SUMMARY Operation Name Retrieve a TimeZone by TimeZone ID Retrieve all TimeZones Relative API Request Path ~/api/v1/timezones/timezoneid ~/api/v1/timezones HTTP Verb GET GET Description Retrieve a single TimeZone by TimeZone ID. Retrieve a collection of currently defined TimeZones. Version 1 for Issuetrak API Version 1.2 Page 151 of 183
RETRIEVE A TIMEZONE BY TIMEZONE ID (Return to: TimeZones Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a TimeZone from the Issuetrak data store for a specified TimeZone ID. The timezoneid parameter must correspond to an existing TimeZone. If there is no such TimeZone ID, an error message will be returned with an HTTP response status code of 404. When retrieving a TimeZone using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the TimeZone Name returned via the API method represents the TimeZone Name as stored within the Issuetrak database. Thus, when retrieving a TimeZone created through the Issuetrak web interface where HTML encoding of the TimeZoneName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadTimeZoneDTO instance. Response DTO Schema: ReadTimeZoneDTO "ExtensionData": [ "Key": "string", "Value": "Metadata": [ "CustomKeyValuePairDataElement" "TimeZoneID": 0, "TimeZone": "string", "Display": "string", "DaylightDisplay": "string", "DaylightAbbreviation": "string", "StandardDisplay": "string", "StandardAbbreviation": "string", "Bias": 0, "DaylightBias": 0, "StandardBias": 0, "DaylightYear": 0, "DaylightMonth": 0, "DaylightDOWCount": 0, "DaylightDayOfWeek": 0, "DaylightHour": 0, "DaylightMinute": 0, "DaylightSecond": 0, "DaylightMillisecond": 0, "StandardYear": 0, "StandardMonth": 0, "StandardDOWCount": 0, "StandardDayOfWeek": 0, "StandardHour": 0, Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid TimeZone ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent Cause: 404 Invalid TimeZone ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) "StandardMinute": 0, Version 1 for Issuetrak API Version 1.2 Page 152 of 183
"StandardSecond": 0, "StandardMillisecond": 0 CustomKeyValuePairDataElement Key (string), Value (string) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/timezones/1 Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-03-12T15:22:49.0895913Z" "TimeZoneID": 1, "TimeZone": "Afghanistan Standard Time", "Display": "(GMT+04:30) Kabul", "DaylightDisplay": "Afghanistan Daylight Time", "DaylightAbbreviation": null, "StandardDisplay": "Afghanistan Standard Time", "StandardAbbreviation": null, "Bias": -270, "DaylightBias": -60, "StandardBias": 0, "DaylightYear": 0, "DaylightMonth": 0, "DaylightDOWCount": 0, "DaylightDayOfWeek": 0, "DaylightHour": 0, "DaylightMinute": 0, "DaylightSecond": 0, "DaylightMillisecond": 0, "StandardYear": 0, "StandardMonth": 0, "StandardDOWCount": 0, "StandardDayOfWeek": 0, "StandardHour": 0, "StandardMinute": 0, "StandardSecond": 0, Version 1 for Issuetrak API Version 1.2 Page 153 of 183
"StandardMillisecond": 0 Version 1 for Issuetrak API Version 1.2 Page 154 of 183
RETRIEVE ALL TIMEZONES (Return to: TimeZones Operations Summary) Description: This API method retrieves a collection of all currently-defined TimeZones from the Issuetrak data store. When retrieving a TimeZone using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the TimeZone name returned via the API method represents the TimeZone name as stored within the Issuetrak database. Thus, when retrieving a Cause created through the Issuetrak web interface where HTML encoding of the TimeZoneName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadTimeZoneDTO instance. Response DTO Schema: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "Key": "string", "Value": "Metadata": [ "CustomKeyValuePairDataElement" "TimeZoneID": 0, "TimeZone": "string", "Display": "string", "DaylightDisplay": "string", "DaylightAbbreviation": "string", "StandardDisplay": "string", "StandardAbbreviation": "string", "Bias": 0, "DaylightBias": 0, "StandardBias": 0, "DaylightYear": 0, "DaylightMonth": 0, "DaylightDOWCount": 0, "DaylightDayOfWeek": 0, "DaylightHour": 0, "DaylightMinute": 0, "DaylightSecond": 0, "DaylightMillisecond": 0, Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent TimeZone: 404 "StandardYear": 0, Version 1 for Issuetrak API Version 1.2 Page 155 of 183
"StandardMonth": 0, "StandardDOWCount": 0, "StandardDayOfWeek": 0, "StandardHour": 0, "StandardMinute": 0, "StandardSecond": 0, "StandardMillisecond": 0 ] Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadTimeZoneDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/timezones/ Sample Response (truncated): "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, "TotalCount": 1, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2015-03-12T15:20:31.6548492Z" "TimeZoneID": 1, "TimeZone": "Afghanistan Standard Time", "Display": "(GMT+04:30) Kabul", "DaylightDisplay": "Afghanistan Daylight Time", "DaylightAbbreviation": null, "StandardDisplay": "Afghanistan Standard Time", "StandardAbbreviation": null, "Bias": -270, "DaylightBias": -60, Version 1 for Issuetrak API Version 1.2 Page 156 of 183
"StandardBias": 0, "DaylightYear": 0, "DaylightMonth": 0, "DaylightDOWCount": 0, "DaylightDayOfWeek": 0, "DaylightHour": 0, "DaylightMinute": 0, "DaylightSecond": 0, "DaylightMillisecond": 0, "StandardYear": 0, "StandardMonth": 0, "StandardDOWCount": 0, "StandardDayOfWeek": 0, "StandardHour": 0, "StandardMinute": 0, "StandardSecond": 0, "StandardMillisecond": 0 ] Version 1 for Issuetrak API Version 1.2 Page 157 of 183
API OPERATIONS FOR USER-DEFINED FIELD TYPES TABLE 26: USERDEFINEDFIELDTYPES API OPERATIONS SUMMARY Issuetrak API Version 1.2 Operation Name Retrieve a UserDefined FieldType by ID Relative API Request Path ~/api/v1/userdefinedfieldtypes/ userdefinedfieldtypeid HTTP Verb GET Description Retrieve a single UserDefinedFieldType by UserDefinedFieldType ID. Retrieve all UserDefinedFieldTypes ~/api/v1/userdefinedfieldtypes GET Retrieve a collection of currently defined UserDefinedFieldTypes. Version 1 for Issuetrak API Version 1.2 Page 158 of 183
RETRIEVE a UserDefinedFieldType by UserDefinedFieldType ID (Return to: User-defined Field Types Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves a UserDefinedFieldType from the Issuetrak data store for a specified UserDefinedFieldType ID. The UserDefinedFieldTypeID parameter must correspond to an existing UserDefinedFieldType. If there is no such UserDefinedFieldType ID, an error message will be returned with an HTTP response status code of 404. When retrieving a UserDefinedFieldType using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the DisplayName returned via the API method represents the DisplayName as stored within the Issuetrak database. Thus, when retrieving a UserDefinedFieldType created through the Issuetrak web interface where HTML encoding of the DisplayName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadUserDefinedFieldTypeDTO instance. Response DTO Schema: Request HTTP Verb: GET ReadUserDefinedFieldTypeDTO ExtensionData (array[keyvaluepair[string,object]]), Metadata (array[keyvaluepair[string,object]]), UserDefinedFieldTypeID (integer), UserDefinedFieldTypeNumber (string), Title (string), Description (string), UserDefinedFieldTypeManager (string), OrganizationID (integer), LocationID (string), Status (string), CloseDate (ISO 8601 string), OpenDate (ISO 8601 string), TargetDate (ISO 8601 string), IsExclusive (boolean), CategoryID (integer), AutoAssignTo (string), RequiredByDate (ISO 8601 string), EstimatedHours (number), ActualHours (number), EstimatedBudget (number), ActualBudget (number), PercentCompleted (number), SubStatusID (integer) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. Response Status Codes: Success: 200 Invalid UserDefinedFieldType ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent UserDefinedFieldType: 404 Invalid UserDefinedFieldType ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/userdefinedfieldtypes/4 Sample Response: Version 1 for Issuetrak API Version 1.2 Page 159 of 183
"ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-24T16:15:35.5023536Z" "UserDefinedFieldID": 4, "UserDefinedKeyID": 2, "DisplayName": "Large Text 1", "IsPrivate": false, "TextDisplayWidth": 0, "ReferenceNumber": 1 Version 1 for Issuetrak API Version 1.2 Page 160 of 183
RETRIEVE ALL USERDEFINEDFIELDTYPES (Return to: UserDefinedFieldTypes Operations Summary) Description: This API method retrieves a collection of all currently-defined UserDefinedFieldType entities from the Issuetrak data store. When retrieving a UserDefinedFieldType using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the DisplayName returned via the API method represents the DisplayName as stored within the Issuetrak database. Thus, when retrieving a UserDefinedFieldType created through the Issuetrak web interface where HTML encoding of the DisplayName is performed, the API consumer may desire to perform additional client-side decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadUserDefinedFieldTypeDTO instance. Response DTO Schema: Request HTTP Verb: GET "IsPageIndexZeroBased": false, Response Status Codes: "PageIndex": 0, Success: 200 "CountForPage": 0, Non-existent UserDefinedFieldType: 404 "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "KeyValuePair[String,Object]" "Metadata": [ "KeyValuePair[String,Object]" "UserDefinedFieldTypeID": 0, "UserDefinedFieldTypeNumber": "", "Title": "", "Description": "", "UserDefinedFieldTypeManager": "", "OrganizationID": 0, "LocationID": "", "Status": "", "CloseDate": "ISO 8601 string", "OpenDate": "ISO 8601 string", "TargetDate": "ISO 8601 string", "IsExclusive": false, "CategoryID": 0, "AutoAssignTo": "", "RequiredByDate": "ISO 8601 string", "EstimatedHours": 0, "ActualHours": 0, "EstimatedBudget": 0, "ActualBudget": 0, "PercentCompleted": 0, "SubStatusID": 0 ] Version 1 for Issuetrak API Version 1.2 Page 161 of 183
Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadUserDefinedFieldTypeDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/userdefinedfieldtypes/ Sample Response (abbreviated): "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 10, "PageSize": 2147483647, "TotalCount": 10, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "v1", "Key": "QueryDate", "Value": "2014-12-24T16:16:12.6629828Z" "UserDefinedFieldID": 1, "UserDefinedKeyID": 1, "DisplayName": "Primary Sec ID", "IsPrivate": false, "TextDisplayWidth": 5, "ReferenceNumber": 1 ] Version 1 for Issuetrak API Version 1.2 Page 162 of 183
API OPERATIONS FOR USERS TABLE 27: USERS API OPERATIONS SUMMARY Operation Name Retrieve an User by User ID Relative API Request Path ~/api/v1/users/userid/includeuserphoto HTTP Verb Retrieve all Users ~/api/v1/users/ includeuserphotos GET Create a User ~/api/v1/users POST Update a User ~/api/v1/users PUT Update a User Password ~/api/v1/users/password Inactivate a User ~/api/v1/users/inactivate PUT GET PUT Description Retrieve a single User by User ID. Retrieve a collection of currently defined Users. Create a User Update a User Update a User Password Inactivate a User Version 1 for Issuetrak API Version 1.2 Page 163 of 183
RETRIEVE A USER BY USER ID (Return to: Users Operations Summary) Issuetrak API Version 1.2 Description: This API method retrieves an User from the Issuetrak data store for a specified User ID. The userid parameter must correspond to an existing User. If there is no such User ID, an error message will be returned with an HTTP response status code of 404. The includeuserphoto is a true or false parameter is a Boolean indicating whether or the binary content for any existing user photo image file should be retrieved and included in the response. If the includeuserphoto parameter is true and if a user photo image file exists for the specified user, a base-64 encoded byte arrayr representing the photo image file will be included in the UserPhotoBytes property of the response. If the includeuserphoto parameter is false or if the user photo image file is not defined, the UserPhotoBytes property will be null. When retrieving an User using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the UserName returned via the API method represents the UserName as stored within the Issuetrak database. Thus, when retrieving an User created through the Issuetrak web interface where HTML encoding of the UserName is performed, the API consumer may desire to perform additional clientside decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized ReadUserDTO instance. Response DTO Schema: ReadUserDTO ExtensionData (Array[CustomKeyValuePairDataElement]), Metadata (Array[CustomKeyValuePairDataElement]), UserID (string), UserNumber (integer), FirstName (string), LastName (string), DisplayName (string), Address1 (string), Address2 (string), City (string), State (string), ZIPCode (string), Country (string), EmailAddress (string), Pager (string), Phone (string), DepartmentID (integer), OrganizationID (integer), LocationID (string), IsActive (boolean), ShouldShowDebug (boolean), IsSysAdmin (boolean), CreatedBy (string), Request HTTP Verb: GET Response Status Codes: Success: 200 Invalid User ID: 400 (Bad Request, e.g., a negative integer is supplied) Non-existent User: 404 Invalid User ID: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) CreatedDate (date-time), Version 1 for Issuetrak API Version 1.2 Page 164 of 183
ModifiedBy (string), ModifiedDate (date-time), LastLoginDate (date-time), CannotLogin (boolean), HasNoAuthentication (boolean), LastPasswordChange (date-time), LoginAttempts (integer), UserDefined1ID (integer), UserDefined1 (string), UserDefined2ID (integer), UserDefined2 (string), UserDefined3ID (integer), UserDefined3 (string), UserDefinedDate (date-time), TimeZoneID (integer), DoesTimeZoneUseDaylightSavings (boolean), HomePageID (integer), DashboardReload (integer), ShouldDashboardShowTimer (boolean), DashboardDefaultClass (integer), UserPhotoBytes (Base64 string), DashboardDefaultMonths (integer), RedirectTo (string), ListFormat (string) Response DTO Property Notes: The ExtensionData property is not used in version 1 of the API. The Metadata property provides a key/value collection of additional data about the API operation and/or the response body. Sample Request URL: ~/api/v1/users/11/false Sample Response: "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "1.2", "Key": "QueryDate", "Value": "2015-03-27T18:18:27.647502Z" "UserID": "Test.User.1239", "UserNumber": 1239, "FirstName": "Test", "LastName": "User", "DisplayName": "Test.User.Update", "Address1": "Test Address 1", "Address2": "Test Address 2", "City": "Test City", Version 1 for Issuetrak API Version 1.2 Page 165 of 183
"State": "VA", "ZIPCode": "23320", "Country": "United States", "EmailAddress": "test@test.com", "Pager": "555-111-1111", "Phone": "555-222-2222", "DepartmentID": null, "OrganizationID": 1, "LocationID": null, "IsActive": true, "ShouldShowDebug": true, "IsSysAdmin": false, "CreatedBy": "Admin", "CreatedDate": "2015-03-26T16:29:59.997", "ModifiedBy": "Admin", "ModifiedDate": "2015-03-26T16:29:59.997", "LastLoginDate": "2015-03-26T16:29:59.997", "CannotLogin": true, "HasNoAuthentication": true, "LastPasswordChange": "2015-03-26T16:29:59.997", "LoginAttempts": 0, "UserDefined1ID": null, "UserDefined1": null, "UserDefined2ID": null, "UserDefined2": null, "UserDefined3ID": null, "UserDefined3": null, "UserDefinedDate": null, "TimeZoneID": 26, "DoesTimeZoneUseDaylightSavings": true, "HomePageID": 1, "DashboardReload": 0, "ShouldDashboardShowTimer": true, "DashboardDefaultClass": 0, "UserPhotoBytes": null, "DashboardDefaultMonths": 1, "RedirectTo": "CSIssue_Submit.asp", "ListFormat": "Standard" Version 1 for Issuetrak API Version 1.2 Page 166 of 183
RETRIEVE ALL USERS (Return to: Users Operations Summary) Description: This API method retrieves a collection of all currently-defined Users from the Issuetrak data store. No UserPhotoBytes content is retrieved during this API method. All of the ReadUserDTO instances will have the UserPhotoBytes content property set to null. When retrieving an User using the API, no special character decoding (e.g., HTML decoding < as < or > as >) is performed. Therefore, please note that the UserName returned via the API method represents the UserName as stored within the Issuetrak database. Thus, when retrieving an User created through the Issuetrak web interface where HTML encoding of the UserName is performed, the API consumer may desire to perform additional clientside decoding. A successful response will include an HTTP status code of 200 (OK) and a response body containing a serialized collection of ReadUserDTO instance. Response DTO Schema: "IsPageIndexZeroBased": false, "PageIndex": 0, "CountForPage": 0, "PageSize": 0, "TotalCount": 0, "Collection": [ "ExtensionData": [ "Metadata": [ "Key": "APIVersion", "Value": "1.2", "Key": "QueryDate", "Value": "2015-03-27T18:18:27.647502Z" "UserID": "Test.User.1239", "UserNumber": 1239, "FirstName": "Test", "LastName": "User", "DisplayName": "Test.User.Update", "Address1": "Test Address 1", "Address2": "Test Address 2", "City": "Test City", "State": "VA", "ZIPCode": "23320", "Country": "United States", "EmailAddress": "test@test.com", "Pager": "555-111-1111", "Phone": "555-222-2222", Request HTTP Verb: GET Response Status Codes: Success: 200 Non-existent User: 404 "DepartmentID": null, Version 1 for Issuetrak API Version 1.2 Page 167 of 183
"OrganizationID": 1, "LocationID": null, "IsActive": true, "ShouldShowDebug": true, "IsSysAdmin": false, "CreatedBy": "Admin", "CreatedDate": "2015-03-26T16:29:59.997", "ModifiedBy": "Admin", "ModifiedDate": "2015-03-26T16:29:59.997", "LastLoginDate": "2015-03-26T16:29:59.997", "CannotLogin": true, "HasNoAuthentication": true, "LastPasswordChange": "2015-03-26T16:29:59.997", "LoginAttempts": 0, "UserDefined1ID": null, "UserDefined1": null, "UserDefined2ID": null, "UserDefined2": null, "UserDefined3ID": null, "UserDefined3": null, "UserDefinedDate": null, "TimeZoneID": 26, "DoesTimeZoneUseDaylightSavings": true, "HomePageID": 1, "DashboardReload": 0, "ShouldDashboardShowTimer": true, "DashboardDefaultClass": 0, "UserPhotoBytes": null, "DashboardDefaultMonths": 1, "RedirectTo": "CSIssue_Submit.asp", "ListFormat": "Standard" ] Response DTO Property Notes: The IsPageIndexZeroBased property value is always true. This property is included for use in future API versions. The PageIndex property value is always 0. This property is included for use in future API versions. The CountForPage property value is always the same as TotalCount. This property is included for use in future API versions. The PageSize property value is always the maximum value for a signed, 32-bit integer. This property is included for use in future API versions. The TotalCount property value is the number of records returned in the collection. The Collection property is an array containing the ReadUserDTO objects returned. The ExtensionData property is not implemented in v1 of the API. Sample Request URL: ~/api/v1/users/ Sample Response: "IsPageIndexZeroBased": true, "PageIndex": 0, "CountForPage": 1, "PageSize": 2147483647, Version 1 for Issuetrak API Version 1.2 Page 168 of 183
"TotalCount": 1, "Collection": [ "ExtensionData": ["KeyValuePair[String,Object]" "Metadata": ["KeyValuePair[String,Object]" "UserID": 0, "UserName": "", "DisplayOrder": 0 ] Version 1 for Issuetrak API Version 1.2 Page 169 of 183
CREATE A USER (Return to: Users Operations Summary) Description: This API method creates a new User associated with a specific UserID within the Issuetrak data store. The CreateUserDTO object conveys the properties of the new User. Because UserID values must be unique, the specified UserID value must not currently exist. If the UserID currently exists, an error message will be returned with a 400 HTTP status code. The response code on success will be 201 (Created), and the response body will represent the text value representing the ID of the newly-created User. When creating a User using the API, no special character encoding (e.g., HTML encoding < as < or > as >) is performed. Response DTO Schema: Request HTTP Verb: POST CreateUserDTO UserID (string), Password (string), FirstName (string), LastName (string), DisplayName (string), Address1 (string), Address2 (string), City (string), State (string), ZIPCode (string), Country (string), EmailAddress (string), Pager (string), Phone (string), DepartmentID (integer), OrganizationID (integer), LocationID (string), IsActive (boolean), ShouldShowDebug (boolean), IsSysAdmin (boolean), CreatedBy (string), CreatedDate (date-time), ModifiedBy (string), ModifiedDate (date-time), LastLoginDate (date-time), CannotLogin (boolean), HasNoAuthentication (boolean), LastPasswordChange (date-time), LoginAttempts (integer), UserDefined1ID (integer), UserDefined1 (string), UserDefined2ID (integer), UserDefined2 (string), UserDefined3ID (integer), Response Status Codes: Success: 201 Invalid User Properties: 400 (Bad Request, e.g., a negative integer is supplied) Invalid User DTO: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) UserDefined3 (string), Version 1 for Issuetrak API Version 1.2 Page 170 of 183
UserDefinedDate (date-time), TimeZoneID (integer), DoesTimeZoneUseDaylightSavings (boolean), HomePageID (integer), DashboardReload (integer), ShouldDashboardShowTimer (boolean), SystemUser (string), DashboardDefaultClass (integer), UserPhotoBytes (Base64 string), DashboardDefaultMonths (integer), RedirectTo (string), ListFormat (string) Request DTO Property Notes: The UserID property value is not required. If a null value is supplied, an auto-generated UserNumber value will be substituted. The Password property value is not required. If a null value is supplied, a blank password will be substituted. The FirstName property value is required. The LastName property value is required. The DisplayName property value is not required. If a null value is supplied, the FirstName and LastName values will be concatenated with an intervening space to form a substitute value. The EmailAddress, if specified, must represent a validly formatted e-mail address. The OrganizationID is required and must represent an existing Organization. The DepartmentID property value, if specified, must represent an existing Department. The LocationID property value, if specified, must reprsent an existing Location. Note that the LocationID is a text value in contrast to the OrganizationID and DepartmentID values. The TimeZoneID property value is requires and must represent an existing TimeZone. The existing timezones may be retrieved using the Retrieve all TimeZones TimeZones API controller method. The HomePageID property value is required and must represent the MenuItemID for an existing MenuItem corresponding to the desired home page. The existing menu items may be retrieved using the Retrieve all Menu Items MenuItems API controller method. The CreatedBy property value is required, and the specified value must reference an existing, active User within the Issuetrak application. The CreatedDate property value is required. If the ModifiedBy property value is specified, the value must reference an existing, active User within the Issuetrak application. The UserPhotoBytes property, if specified, represents the Base-64 encoded form of the image for the user. The image is best viewed at 150x150 pixels and must be less or equal to 500 KB in total size. Specify a null value for an empty UserPhoto. The image file format will be inferred from the byte array supplied after base-64 decoding. Sample Request URL: ~/api/v1/users/ Sample Request: "UserID": "TestUser1", "Password": "Test12345", "FirstName": "Test", "LastName": "User", "DisplayName": "Test.User", "Address1": "Test Address 1", Version 1 for Issuetrak API Version 1.2 Page 171 of 183
"Address2": "Test Address 2", "City": "Test City", "State": "Test State", "ZIPCode": "12345-6789", "Country": "United States", "EmailAddress": "test@test.com", "Pager": "757-555-1111", "Phone": "757-555-2222", "OrganizationID": 1, "DepartmentID": null, "LocationID": null, "IsInactive": false, "ShouldShowDebug": true, "IsSysAdmin": false, "CreatedBy": "APIUser", "CreatedDate": "2015-03-04T16:09:34.955Z", "ModifiedBy": "APIUser", "ModifiedDate": "2015-03-04T16:09:34.955Z", "LastLoginDate": "2015-03-04T16:09:34.955Z", "CannotLogin": false, "HasNoAuthentication": false, "LastPasswordChange": "2015-03-04T16:09:34.955Z", "LoginAttempts": 0, "UserDefined1ID": null, "UserDefined1": null, "UserDefined2ID": null, "UserDefined2": null, "UserDefined3ID": null, "UserDefined3": null, "UserDefinedDate": null, "TimeZoneID": 0, "TimeZoneDlt": true, "HomePageID": -1, "DashboardReload": 0, "ShouldDashboardShowTimer": true, "SystemUser": null, "DashboardDefaultClass": null, "UserPhotoBytes": null, "DashboardDefaultMonths": null, "RedirectTo": "CSIssue_Submit.asp", "ListFormat": "Standard" Sample Response HTTP Status Code: 201 Sample Response Body: TestUser1 (represents the newly-created User ID) Issuetrak API Version 1.2 Version 1 for Issuetrak API Version 1.2 Page 172 of 183
UPDATE A USER (Return to: Users Operations Summary) Description: This API method updates an existing User associated with a specific UserNumber within the Issuetrak data store. The UpdateUserDTO object conveys the properties of the existing User. Because UserID values must be unique, the specified UserID value must not currently exist for a user with a different UserNumber. If the UserID currently exists, an error message will be returned with a 400 HTTP status code. The User Password property cannot updated with this API method. Please use the dedicated API controller method for password updates. The response code on success will be 200 (OK), and the response body will represent the text value representing the ID of the edited User. When creating a User using the API, no special character encoding (e.g., HTML encoding < as < or > as >) is performed. Response DTO Schema: Request HTTP Verb: PUT UpdateUserDTO UserID (string), UserNumber (integer), FirstName (string), LastName (string), DisplayName (string), Address1 (string), Address2 (string), City (string), State (string), ZIPCode (string), Country (string), EmailAddress (string), Pager (string), Phone (string), DepartmentID (integer), OrganizationID (integer), LocationID (string), IsActive (boolean), ShouldShowDebug (boolean), IsSysAdmin (boolean), CreatedBy (string), CreatedDate (date-time), ModifiedBy (string), ModifiedDate (date-time), LastLoginDate (date-time), CannotLogin (boolean), HasNoAuthentication (boolean), LastPasswordChange (date-time), LoginAttempts (integer), UserDefined1ID (integer), UserDefined1 (string), Response Status Codes: Success: 200 Invalid User Properties: 400 (Bad Request, e.g., a negative integer is supplied) Invalid User DTO: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) UserDefined2ID (integer), Version 1 for Issuetrak API Version 1.2 Page 173 of 183
UserDefined2 (string), UserDefined3ID (integer), UserDefined3 (string), UserDefinedDate (date-time), TimeZoneID (integer), DoesTimeZoneUseDaylightSavings (boolean), HomePageID (integer), DashboardReload (integer), ShouldDashboardShowTimer (boolean), SystemUser (string), DashboardDefaultClass (integer), UserPhotoBytes (Base64 string), DashboardDefaultMonths (integer), RedirectTo (string), ListFormat (string) Request DTO Property Notes: The FirstName property value is required. The LastName property value is required. The EmailAddress, if specified, must represent a validly formatted e-mail address. The OrganizationID is required and must represent an existing Organization. The DepartmentID property value, if specified, must represent an existing Department. The LocationID property value, if specified, must reprsent an existing Location. Note that the LocationID is a text value in contrast to the OrganizationID and DepartmentID values. The TimeZoneID property value, if specified, must represent an existing TimeZone. The existing timezones may be retrieved using the Retrieve all TimeZones TimeZones API controller method. The HomePageID property value is required and must represent the MenuItemID for an existing MenuItem corresponding to the desired home page. The existing menu items may be retrieved using the Retrieve all Menu Items MenuItems API controller method. The CreatedBy property value is required, and the specified value must reference an existing, active User within the Issuetrak application. The CreatedDate property value is required. If the ModifiedBy property value must reference an existing, active User within the Issuetrak application. The ModifiedDate property value is required. The UserPhotoBytes property, if specified, represents the Base-64 encoded form of the image for the user. The image is best viewed at 150x150 pixels and must be less or equal to 500 KB in total size. Specify a null value for an empty UserPhoto. The image file format will be inferred from the byte array supplied after base-64 decoding. If there is an existing UserPhoto and a null value is supplied in the UpdateUserDTO, the existing UserPhoto will be deleted. Sample Request URL: ~/api/v1/users/ Sample Request: "UserID": "TestUser1", "FirstName": "Test", "LastName": "User", "DisplayName": "Test.User", "Address1": "Test Address 1", "Address2": "Test Address 2", "City": "Test City", "State": "Test State", "ZIPCode": "12345-6789", Version 1 for Issuetrak API Version 1.2 Page 174 of 183
"Country": "United States", "EmailAddress": "test@test.com", "Pager": "757-555-1111", "Phone": "757-555-2222", "OrganizationID": 1, "DepartmentID": null, "LocationID": null, "IsInactive": false, "ShouldShowDebug": true, "IsSysAdmin": false, "CreatedBy": "APIUser", "CreatedDate": "2015-03-04T16:09:34.955Z", "ModifiedBy": "APIUser", "ModifiedDate": "2015-03-04T16:09:34.955Z", "LastLoginDate": "2015-03-04T16:09:34.955Z", "CannotLogin": false, "HasNoAuthentication": false, "LastPasswordChange": "2015-03-04T16:09:34.955Z", "LoginAttempts": 0, "UserDefined1ID": null, "UserDefined1": null, "UserDefined2ID": null, "UserDefined2": null, "UserDefined3ID": null, "UserDefined3": null, "UserDefinedDate": null, "TimeZoneID": 0, "TimeZoneDlt": true, "HomePageID": -1, "DashboardReload": 0, "ShouldDashboardShowTimer": true, "SystemUser": null, "DashboardDefaultClass": null, "UserPhotoBytes": null, "DashboardDefaultMonths": null, "RedirectTo": "CSIssue_Submit.asp", "ListFormat": "Standard" Sample Response HTTP Status Code: 200 Sample Response Body: TestUser1 (represents the edited User ID) Issuetrak API Version 1.2 Version 1 for Issuetrak API Version 1.2 Page 175 of 183
UPDATE A USER PASSWORD (Return to: Users Operations Summary) Description: This API method updates the password for an existing User associated with a specific UserID within the Issuetrak data store. The UpdateUserPasswordDTO object conveys the new password. Because UserID values must be unique, the specified UserID value must currently exist. If the UserID currently exists, an error message will be returned with a 400 HTTP status code. The response code on success will be 200 (OK), and the response body will represent the text value representing the ID of the edited User. When creating a User using the API, no special character encoding (e.g., HTML encoding < as < or > as >) is performed. Response DTO Schema: Request HTTP Verb: PUT UpdateUserPasswordDTO UserID (string), Password (string Response Status Codes: Success: 200 Invalid User Properties: 400 (Bad Request, e.g., a negative integer is supplied) Invalid User DTO: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Request DTO Property Notes: The UserID property value must represent an existing UserID. The Password property value is required and must not exceed 150 characters in length. Sample Request URL: ~/api/v1/users/password/ Sample Request: "UserID": "TestUser1", "Password": "New.Password" Sample Response HTTP Status Code: 200 Sample Response Body: TestUser1 (represents the edited User ID) Version 1 for Issuetrak API Version 1.2 Page 176 of 183
INACTIVATE A USER (Return to: Users Operations Summary) Description: This API method updates an existing User associated with a specific UserID within the Issuetrak data store. The InactivateUserDTO object conveys the UserID of the existing User to inactivate. Because UserID values must be unique, the specified UserID value must exist. If the UserID does not currently exists, an error message will be returned with a 400 HTTP status code. The response code on success will be 200 (OK), and the response body will represent the text value representing the ID of the inactivated User. When inactivating a User using the API, no special character encoding (e.g., HTML encoding < as < or > as >) is performed. Response DTO Schema: Request HTTP Verb: PUT InactivateUserDTO Response Status Codes: Success: 200 UserID (string), Invalid User Properties: 400 (Bad Request, e.g., a non-existent UserID is specified) Invalid User DTO: 422 (Unprocessable Entity, e.g., a non-numeric value is supplied) Request DTO Property Notes: The UserID property value is required and must exist. Sample Request URL: ~/api/v1/users/inactivate Sample Request: "UserID": "InactiveUser", Sample Response HTTP Status Code: 200 Sample Response Body: InactiveUser (represents the inactivated User ID) Version 1 for Issuetrak API Version 1.2 Page 177 of 183
API SAMPLES OVERVIEW INTRODUCTION The Issuetrak API v 1.2 is a RESTful API that uses the HTTP protocol as the primary transport infrastructure both to invoke and API operation and to transmit the response from an API operation back to the API consumer. As such, the API is platform-agnostic. Any API consumer platform that can transmit the appropriately defined payload via a valid HTTP application protocol request using the API HMAC authorization scheme (see the API Authorization Overview section for details about the authorization scheme) can communicate with the API. Issuetrak has created to sample application to demonstrate how to communicate with the API using two different application platforms: Microsoft.NET and PHP..NET SAMPLE The.NET API sample relies upon an Issuetrak.API.Client library distributed with the sample as a.net assembly. This Issuetrak.API.Client includes a set of wrapper methods to encapsulate the details of the process of calling the Issuetrak API for a particular operation. For example, to retrieve a Note for a specific Note ID value, the Issuetrak.API.Client library exposes the following method signature: Task<IssuetrakAPIResponse<ReadNoteDTO>> GetNoteForNoteIDAsync(GetNoteForNoteIDRequest request) This signature indicates that the wrapper method is an asynchronous method that will return a Task with a task result of type <IssuetrakAPIResponse<ReadNoteDTO>>. The IssuetrakAPIResponse class provides a wrapper to encapsulate the details of an API response with properties such as ResponseStatusCode to retrieve the HTTP status code of the HTTP response and ResponseText to provide the raw string response of the HTTP response. To call the GetNoteForNoteIDAsync API method, the Issuetrak.API.Client library may be invoked as in the following C# example: using (IssuetrakAPIClient client = new IssuetrakAPIClient(API_KEY)) GetNoteForNoteIDRequest request = new GetNoteForNoteIDRequest(BASE_API_URL, API_VERSION, noteid); IssuetrakAPIResponse<ReadNoteDTO> response = await client.getnotefornoteidasync(request); In the sample, the API_KEY constant is the API key text value that is used for the API authorization scheme. The BASE_API_URL constant is the root URL to the Issuetrak API instance, and the API_VERSION constant is the integer identifier for the desired API version, e.g., 1. The noteid parameter is a variable that is used to identify the desired Note ID value to retrieve. PHP SAMPLE Version 1 for Issuetrak API Version 1.2 Page 178 of 183
The PHP sample project demonstrates how to interact with the Issuetrak API v 1.2 via standard PHP functions to include code samples to: 1) Create a New Note 2) Retrieve a Note by Note ID 3) Retrieve Issues by Issue Number List The PHP sample also demonstrates how to employ standard PHP functions to generate the authorization headers for API authorization. The PHP sample is included in the index.php file reproduced in full below. To execute the PHP sample, copy the text for the index.php file to the an appropriately configured PHP web server and update the $base_url and $api_key PHP variables with the appropriate values for the Issuetrak API deployment. <?php $base_url = "http://localhost/api"; # the base URL for your API installation $api_key = "test"; # the API Key generated using the API Key Tool $hash_algorithm = "sha512"; # the hashing algorithm used by the Issuetrak API ################################################################################ # CREATE A NEW NOTE ################################################################################ $request_method = "POST"; # all create operations use "POST" as their HTTP method $request_path = "/v1/notes"; # the path to the note create operation $request_time_iso8601 = date("c"); # a timestamp in the ISO 8601 format $request_guid = guid(); # a globally unique identifier, see example implementation below $request_query = ""; # if query-string parameters were present, they would be recorded here # The note entity we wish to create... $request_body = <<<END "IssueNumber": 1, "CreatedDate": "2014-08-25T12:32:32-04:00", "CreatedBy": "Admin", "ShouldSuppressEmailForCreateOperation": false, "NoteText": "Testing note creation from PHP.", "IsPrivate": false, "IsRichText": false END; # gather the request information into a summary; # note that the order of the elements in this array and the strtolower() operation on the GUID and path are mandatory $request_summary = implode("\n", [$request_method, strtolower($request_guid), $request_time_iso8601, strtolower($request_path), $request_query, $request_body]); # use the summary to generate a signature for authentication of this request $request_signature = base64_encode(hash_hmac($hash_algorithm, $request_summary, $api_key, true)); # assemble HTTP headers for this request; note that the headers below are mandatory $http_headers = array( "Content-Type: text/json", "X-Issuetrak-API-Timestamp: ". $request_time_iso8601, "X-Issuetrak-API-Request-ID: ". $request_guid, "X-Issuetrak-API-Authorization: ". $request_signature Version 1 for Issuetrak API Version 1.2 Page 179 of 183
); $curl = curl_init(); # initialize curl curl_setopt($curl, CURLOPT_POST, 1); # this request will be a POST curl_setopt($curl, CURLOPT_URL, $base_url. $request_path. $request_query); # tell curl about the request URL curl_setopt($curl, CURLOPT_POSTFIELDS, $request_body); # tell curl what the body content will be curl_setopt($curl, CURLOPT_HTTPHEADER, $http_headers); # tell curl about our array of headers curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); # tell curl that we'd like the result returned normally $new_note_id = curl_exec($curl); # make the request echo "The New NoteID: ". $new_note_id. "\n\n"; # the response should be a newly created NoteID ################################################################################ # RETRIEVE THE NOTE WE JUST CREATED ################################################################################ $request_method = "GET"; # all retrieval operations use "GET" as their HTTP method $request_path = "/v1/notes/". $new_note_id; # the path to the note we just created $request_time_iso8601 = date("c"); # a timestamp in the ISO 8601 format $request_guid = guid(); # a globally unique identifier, see example implmentation below $request_query = ""; # if query-string parameters were present, they would be recorded here $request_body = ""; # no additional information is required to retrieve the Note, but we still need this place-holder # gather the request information into a summary; # note that the order of the elements in this array and the strtolower() operation on the path are mandatory $request_summary = implode("\n", [$request_method, $request_time_iso8601, strtolower($request_path), $request_query, $request_body]); # use the summary to generate a signature for authentication of this request $request_signature = base64_encode(hash_hmac($hash_algorithm, $request_summary, $api_key, true)); # assemble HTTP headers for this request; note that the headers below are mandatory $http_headers = array( "Content-Type: text/json", "X-Issuetrak-API-Timestamp: ". $request_time_iso8601, "X-Issuetrak-API-Request-ID: ". $request_guid, "X-Issuetrak-API-Authorization: ". $request_signature ); $curl = curl_init(); # initialize curl curl_setopt($curl, CURLOPT_GET, 1); # this request will be a GET curl_setopt($curl, CURLOPT_URL, $base_url. $request_path. $request_query); # tell curl about the request URL curl_setopt($curl, CURLOPT_HTTPHEADER, $http_headers); # tell curl about our array of headers curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); # tell curl that we'd like the result returned normally $note_record = curl_exec($curl); # make the request echo "The New Note: ". $note_record. "\n\n"; # the response should be the Note we created above ################################################################################ # RETRIEVE SEVERAL ISSUES WITHOUT NOTES ################################################################################ $request_method = "GET"; # all retrieval operations use "GET" as their HTTP method $request_path = "/v1/issues/false/list"; # the path for Issue list retrieval without notes $request_time_iso8601 = date("c"); # a timestamp in the ISO 8601 format $request_guid = guid(); # a globally unique identifier, see example implmentation below $request_query = "?issuenumbers=1,2,3"; # issuenumbers is a query-string parameter $request_body = ""; # no additional information is required to retrieve the Issues, but we still need this place-holder # gather the request information into a summary; Version 1 for Issuetrak API Version 1.2 Page 180 of 183
# note that the order of the elements in this array and the strtolower() operation on the path are mandatory $request_summary = implode("\n", [$request_method, $request_time_iso8601, strtolower($request_path), $request_query, $request_body]); # use the summary to generate a signature for authentication of this request $request_signature = base64_encode(hash_hmac($hash_algorithm, $request_summary, $api_key, true)); # assemble HTTP headers for this request; note that the headers below are mandatory $http_headers = array( "Content-Type: text/json", "X-Issuetrak-API-Timestamp: ". $request_time_iso8601, "X-Issuetrak-API-Request-ID: ". $request_guid, "X-Issuetrak-API-Authorization: ". $request_signature ); $curl = curl_init(); # initialize curl curl_setopt($curl, CURLOPT_GET, 1); # this request will be a GET curl_setopt($curl, CURLOPT_URL, $base_url. $request_path. $request_query); # tell curl about the request URL curl_setopt($curl, CURLOPT_HTTPHEADER, $http_headers); # tell curl about our array of headers curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); # tell curl that we'd like the result returned normally $issues_collection = curl_exec($curl); # make the request echo "A Collection of Issues: ". $issues_collection. "\n\n"; # the response should contain Issues 1, 2, and 3 ################################################################################ # END OF EXECUTION ################################################################################ echo "Press any key to exit..."; fread(stdin, 1); # blocks until user presses any key ################################################################################ # EXAMPLE GUID GENERATOR ################################################################################ function guid() if (function_exists('com_create_guid')) # this happens on Windows return com_create_guid(); else # this happens on other platforms $charid = md5(uniqid(rand(), true)); $hyphen = chr(45); # "-" $uuid = chr(123) # "". substr($charid, 0, 8). $hyphen. substr($charid, 8, 4). $hyphen. substr($charid,12, 4). $hyphen. substr($charid,16, 4). $hyphen. substr($charid,20,12). chr(125); # "" return $uuid;?> Version 1 for Issuetrak API Version 1.2 Page 181 of 183
Appendix 1: Encrypting ConnectionStrings For additional protection against breach of sensitive data, customers may wish to encrypt the database connection information contained within the Issuetrak API s web.config file. For the encryption process, a tool provided by Microsoft is used, aspnet_regiis. Full documentation for the aspnet_regiis tool can be found at: https://msdn.microsoft.com/en-us/library/k6h9cz8h%28v=vs.140%29.aspx The following batch file can be used to encrypt the connectionstrings section of the Issuetrak.API web.config file; however, please note that the version of the batch file that is employed depends on the processor architecture of the operating system. Also, the encryption process must be run on each web server on which the API is deployed. WARNING: Before encrypting the connectionstrings section of the web.config, ensure that a backup of the web.config file has been made and that appropriate administrative approval to execute the aspnet_regiis utility has been granted. 32-BIT CONNECTIONSTRINGS SECTION ENCRYPTION BATCH FILE: SET ASPNET_REGIIS_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe SET API_APPLICATION_NAME=Issuetrak.API :: Encrypt the "connectionstring" section within the web.config file. "%ASPNET_REGIIS_PATH%" -pe "connectionstrings" -site "%API_APPLICATION_NAME%" -app "/" -prov "DataProtectionConfigurationProvider" 64-BIT CONNECTIONSTRINGS SECTION ENCRYPTION BATCH FILE: SET ASPNET_REGIIS_PATH=%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe SET API_APPLICATION_NAME=Issuetrak.API :: Encrypt the "connectionstring" section within the web.config file. "%ASPNET_REGIIS_PATH%" -pe "connectionstrings" -site "%API_APPLICATION_NAME%" -app "/" -prov "DataProtectionConfigurationProvider" 32-BIT CONNECTIONSTRINGS SECTION DECRYPTION BATCH FILE: SET ASPNET_REGIIS_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe SET API_APPLICATION_NAME=Issuetrak.API :: Encrypt the "connectionstring" section within the web.config file. "%ASPNET_REGIIS_PATH%" pd "connectionstrings" -site "%API_APPLICATION_NAME%" -app "/" 64-BIT CONNECTIONSTRINGS SECTION DECRYPTION BATCH FILE: SET ASPNET_REGIIS_PATH=%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe SET API_APPLICATION_NAME=Issuetrak.API :: Encrypt the "connectionstring" section within the web.config file. "%ASPNET_REGIIS_PATH%" pd "connectionstrings" -site "%API_APPLICATION_NAME%" -app "/" Version 1 for Issuetrak API Version 1.2 Page 182 of 183
Appendix 2: Troubleshooting Swagger The Issuetrak API provides a built-in API dashboard tool based on the Swagger specification. A typical Swagger access URL after the API has been deployed will resemble the following: http://local.issuetrakapi.com/api/swagger/ui/index PROBLEM 1: SWAGGER DASHBOARD DOESN T LOAD IN MICROSOFT INTERNET EXPLORER Possible Solution to Problem 1: Ensure that Display intranet sites in Compatibility View is unchecked. 1) From Microsoft Internet Explorer s Tools Menu, click on Compatibility View Settings. 2) Uncheck the Display intranet sites in Compatibility View option, and then click Close. 3) Reload the API Swagger URL to determine if the dashboard loads successfully. Version 1 for Issuetrak API Version 1.2 Page 183 of 183