Using the API
1. Introduction
This document explains how to use the API published on the Fujitsu Research Portal.
Users must first create a Fujitsu Research Portal account and sign in. For how to create an account, please refer to Creating an Account. Note that the contents of this manual may differ from the latest version.
2. How to Use the API
This document outlines two ways to use the API published on the Fujitsu Research Portal.
- 2.1. Calling the API from the Fujitsu Research Portal
- 2.2. Calling the API using cURL or other tools
- As cURL and Postman can be used in the same way, they are interchangeable within this document.
In addition, there is a limit of five requests/min for each user to use the API on the Fujitsu Research Portal. As requests are counted per user, calls to the other API will still be included in this number.
2.1. Calling the API on the Fujitsu Research Portal
-
After signing in to the portal, select the technology you want to use, then click "Try the Technology" and proceed to the "Details" page.
-
On the "Details" page, click the "Try the Technology" button. "Try the Technology" button appears if you are not logged in, or if you are logged in but do not agree to the technical terms.
-
In the pop-up, enter the "verification code" that was delivered to SMS in the form and click the “Verify Code" button.
-
Check the "Notice of Terms of Use for technology" and if you agree, check the "I agree with the Terms of Use" check box and click the "Proceed forward" button. If you don't agree, click Cancel at the top to close the screen.
-
Click the "Try the API" button at the bottom of the "Details" page to go to the "API Specification" page. "Try the API" button appears when you are logged in and you accept the technical terms.
-
On the "API Specification" page, choose the API you'd like to use from the list of APIs on the left. Check the API headers, parameters, and body, then click the "Try It" button at the top right to go to the "Try It" page.
-
On the "Try It" page, open the "Authorization" tab and select "authorization_code" for the "Developer_Portal_Access_Token" field. Once selected, the "Headers" tab is automatically populated with the "Authorization" field and the API access token, which can be obtained after authentication.
-
Enter the appropriate information in the "Headers," "Parameters," and "Body" fields, scroll to the bottom of the "Try It" page, open the "HTTP request" tab and click the "Send" button. Choose a language from the drop down menu under the "HTTP request" tab displays the code used for making the API request in the selected language.
-
Check the results of the HTTP request response that is displayed.
2.2. How to Call the API from cURL, etc.
-
Follow the same step in Calling the API on the Fujitsu Research Portal 8 to enter the required information. Then, from the drop-down menu under the "HTTP request" tab, choose "cURL" and click "Copy" to copy the cURL command.
-
Open a terminal on an environment compatible with cURL, paste the copied command and execute. At this time, depending on the terminal, if the "Request body" contains a line break, the command may be delimited by the line break. In this case, delete the line break before executing the command.
-
Check the results displayed.
2.3. Downloading API Specifications
Selecting a format from "API definition" at the center of the "API Specification" page downloads the API specifications in that format.
![api-definition-using-the-api](./figures/api-definition-using-the-api.png)