Who is this article for?
CrashPlan for Enterprise, yes.
Code42 for Enterprise, yes.
CrashPlan for Small Business, no.
This article applies to Code42 cloud environments.
Other available versions:
API documentation viewers describe the resources and methods provided by the Code42 API. This article describes how to access and use the two API documentation viewers: one for API version 1 (https://<cloud-address>/apidocviewer), the other for API versions 3 and later (https://<cloud-address>/swagger). A new version of the API is created whenever there is a breaking change that prevents backward compatibility.
The Code42 API documentation viewers are publicly available. You can see them in a browser without signing in. But the API resources themselves only work for you under these conditions:
- You have a product plan that includes access to the Code42 API.
- Your credentials rely on local authentication. SSO or authentication through any third-party provider will not work.
- Your role provides permission to access the data necessary to a given API resource. For example, if you do not have permission to change device settings in the Code42 console, then you don't have permission to change device settings with the API.
The Code42 API and the documentation viewers are built to serve both the Code42 cloud and on-premises Code42 environments.
Customers using the Code42 cloud will see documentation about API resources that to do not apply to the Code42 cloud. For example:
- Resources for managing LDAP.
- Resources for managing storage server.
If your API calls fail because you do not have permission to use them, you will see reply messages like these:
- HTTP 401 Unauthorized
- HTTP 401 Could not authenticate user
- Your Code42 product plan does not permit use of the Code42 API.
Use version 1 and version 4 and later API resources with either token authentication or name:password authentication. For version 3, however, you must use token authentication. See Code42 API authentication methods for details.
Find API documentation
The Code42 cloud hosts two API documentation viewers for several versions of the API.
Go to https://<cloud-address>/apidocviewer.
The resource you use depends on your Code42 cloud address. For the Code42 cloud, API resources reside at https://<cloud-address>/apidocviewer:
Versions 3 and later
Go to https://<cloud-address>/swagger and select a version in the API Version menu in the upper-right.
The resource you use depends on your Code42 cloud address. For the Code42 cloud, API resources reside at https://<cloud-address>/swagger:
API documentation reference
|a||Search API||Filters the list of resources based on search text.|
Lists the version 1 Code42 API resources.
|c||Resource description||Describes the resource and the methods it offers. Available methods vary by resource but may include get, put, post, and delete.|
|d||Refresh API||Loads the latest resources and descriptions from the Code42 cloud, instead of from the browser's cache. When the Code42 cloud gets updated, you may need to click Refresh API to see new API information.|
|e||Shortcut Controls||Displays keyboard shortcuts.|
Versions 3 and later
|a||URL||Version 3 and later API documentation resides at https://<cloud-address>/swagger.|
|b||API Version||Select a version.|
|c||Links and controls||
|d||Category||API resources are categorized according to their functions. Click the heading to expand or collapse a category.|
|e||Resource||Click on a resource to see details about its use.|
The documentation may further describe a resource here. Three kinds of notes are common:
Parameter Specification Options:
This states when a resource requires specific licensing. A common example:
Authority Server Only:
Such notes apply only to on-premises Code42 environments, where administrators may control multiple Code42 servers.
Describes valid parameters and values, and whether they are required. Unless stated otherwise, provide parameters as name=value pairs at the end of a URL, after a question mark (?), and separated by ampersands (&).
|c||Request body||When parameters can or must be provided as body data, the documentation describes that request body.|
For most resources, format body parameters as JSON data.
For some resources, you may format data as
Note: The documentation viewer does not display examples of such data. Regardless of your menu selection, the display shows JSON data.
Value | Model
For data in request bodies and in responses, the documentation displays either example values for you to imitate, or the precise specifications of the data model.
The viewer also provides a complete list and description of data models at the end, following the descriptions of resources.
Describes the value and meaning of the possible HTTP response codes.
Some resources respond with additional data. Such data is always in JSON format.