The Issuetrak API 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 article for details about the authorization scheme) can communicate with the API.
Issuetrak has created sample applications to demonstrate how to communicate with the API using Microsoft .NET, PHP, Python, and NodeJS. You can get the samples from the zip file attached here. Please reference the samples from the aforementioned zip file using your favorite text editor, with the exception of Python, which we provide as code examples within this article.
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);
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.
The PHP sample project demonstrates how to interact with the Issuetrak API via standard PHP functions to include code samples to:
- Create a New Note
- Retrieve a Note by Note ID
- 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.
To execute the PHP sample, copy the text for the “index.php” file to 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.
The Python sample projects demonstrate how to interact with the Issuetrak API via Python to:
- Retrieve an Issue
- Update an Issue
- Submit an Issue
The NodeJS sample project demonstrates how to insert a note into an issue by calling the notes API end point.
The Java sample project facilitates barebones API authorization so that additional code (provided by your developer) can communicate with your site's API.