The API Explorer Tool
Applies to: DeployR 8.x
Looking for the new documentation for the operationalization feature in Microsoft R Server 9.0.x ? Start here.
The DeployR API is extensive, providing a wide range of services related to users, projects, jobs and the repository. To help developers familiarize themselves with the full set of APIs DeployR ships with a Web-based API Explorer tool. This tool allows developers to explore the DeployR API in an interactive manner.
You cannot log into DeployR from two different accounts within the same brand of browser program. To use two or more different accounts, you'll need to log into each one in a separate brand of browser.
Hovering your mouse over most UI elements in the API Explorer reveals helpful tooltips.
Accessing the API Explorer
The API Explorer is accessible after auto-installing DeployR. With a manual installation on Linux, make sure you install the API Explorer software. For more information, refer to the DeployR Installation Guide for your OS.
Visit the DeployR home page at
http://<DEPLOYR-SERVER-IP-ADDRESS-AND-PORT>/deployr/landing/. From there, you can launch the API Explorer in your Web browser by clicking the API Explorer link near the top of the page.
Or, access the API Explorer directly here:
This tool requires that the Adobe Flash Player plug-in be installed and enabled in your Web browser.
Overview of the API Explorer Interface
The interface to the API Explorer consists of four main panels:
Panel 1: Preferences
At the top of the API Explorer window, you can find the Preferences Panel. Preference controls are on the right side of this panel. You can use these controls to set global preferences for all of the API calls you will make within this tool.
These global preferences are described as follows:
- API : this preference specifies whether JSON encodings should be used on API calls.
- DEV : this preference specifies the default device for rendering plots in R: PNG or SVG
- DLD : this preference specifies whether file downloads are saved as attachments or rendered directly in the Web browser.
Panel 2: The API Tabs
The center section of the API Explorer window contains the API tabs panel:
Use the functionality found under each tab in API Explorer to interact with and invoke a subset of the full API. Each of these tabs is described in the following sections.
The DeployR tab is the starting point in the API Explorer. This tab gives the user access to the full set of User APIs.
When a user first launches the API Explorer the DeployR tab and the Repo Scripts tab are the only tabs enabled in the API Tabs Panel. In order to gain access to additional tabs you must first sign-in to DeployR.
Once you successfully authenticates with DeployR the following tabs are activated:
- Repo Files
When you sign out of DeployR, most tabs are automatically disabled except the default DeployR tab and the Repo Scripts tab, which are always enabled.
The Projects tab provides access to the full set of Project Management APIs.
Once you select a specific project from the list of projects displayed under this tab, the following set of additional project-specific tabs are enabled in addition to those enabled earlier:
The functionality found under these tabs allows you to interact with APIs on the selected project.
Clearing the active selection in the list of projects displayed under the Projects tab will automatically disable the complete set of project-specific tabs.
The Console tab offers access to the full set of Project Execution APIs.
** Workspace Tab**
The Workspace tab offers access to the full set of Project Workspace APIs.
The Directory tab offers access to the full set of Project Directory APIs.
The Packages tab offers access to the full set of Project Package APIs.
Repo Files Tab
The Repo Files tab offers access to the full set of Repository File APIs.
The Jobs tab offers access to the full set of Job APIs.
Repo Scripts Tab
The Repo Scripts tab offers access to the full set of Repository Script APIs.
Panel 3: API Request
The lower left area of the API Explorer window contains the API Request Panel. Each time you make an API call, this panel automatically displays details of that call, including the following:
- API call parameters
- API call method
- API call endpoint
Panel 4: API Response Markup
The lower right area of the API Explorer window contains the API Response Markup Panel. Each time an API call sees a response from the server, the complete response markup for the call is displayed in this panel.