Overview

The Code42 API is accessible through many tools, such as web browsers, scripting tools, and programming languages. This article provides links to third-party tools that you can use to interact with the Code42 API.

Considerations

Code42 server SSL certificate

The examples in this article assume that your Code42 server has a signed SSL certificate that is trusted by your client computer. If your Code42 server does not have a signed certificate, API requests that use HTTPS may fail. To avoid these errors, take either of the following actions:

Third-party software

This article provides resources and basic usage examples for interacting with the Code42 API using third-party software. Refer to documentation provided by the software's manufacturer for more detailed information.

Non-Code42 products
​Information about products from other manufacturers is intended as a resource to help you get the most out of Code42 products. However, our Customer Champions cannot provide direct assistance for these products. For assistance with products not developed by Code42, contact the product's manufacturer.

Web browsers

The Code42 API is HTTP-based, so you can use a web browser to interact with it:

Unmodified web browsers can examine Code42 API resources with the GET method because navigating to an API URL generates an HTTP GET request. Install a JSON formatter to make the return values easier to read.

REST client extensions expand browser functionality by allowing you to select a method (GET, PUT, POST, or DELETE) to interact with the Code42 API.

JSON formatter extensions

Install a JSON formatting extension to make return values easier to read.

Windows

Install Cygwin, which provides a Unix-like command-line interface for Windows, with the curl package. When you run setup.exe, on the Select Packages window make sure to select curl from within the net category, and select Python.

You can run curl examples with the same switches on Windows. Not only can you run curl from the Cygwin shell, you can also run curl from the Windows cmd shell if you add the Cygwin binary path to the Windows PATH system environment variable (for example, ;C:\cygwin64\bin).

Copy curl commands from the administration console

Chrome and Firefox include the option to copy a network request as a curl command. You can use this functionality to create a curl command that duplicates the functionality of an administration console action.

Use Chrome or Firefox to sign in to the administration console.

Navigate to the page that contains the command you want to copy.

Open the Chrome or Firefox developer tools, then click Network.

Initiate the action in the administration console that you want to copy.A network request that corresponds to the action appears in the developer tools.

In the developer tools, right-click the network request, then select Copy as cURL.

Paste the copied curl command in a text editor and modify the command as needed.

Windows PowerShell

Scripting interaction with the Code42 API on Windows relies on the PowerShell Invoke-RestMethod utility cmdlet.

Ruby

To interact with the Code42 API in Ruby, we recommend using the Faraday gem. The following examples use Faraday to run a simple GET method on the Computer resource. Faraday must be installed before the examples are executed.