How to run the REST APIs directly from the Developer Portal using the "Try it out" button

This document instructs the member to run the REST APIs Directly from the Developer Portal by using the Try it out button.

Steps

  1. Log into Bluescape: https://client.apps.us.bluescape.com/my. Your browser will store a cookie to authenticate your calls in the openapi documents in the Developer Portal.
  2. After opening a workspace, copy the workspace ID:
    a. Go to the URL window in your browser. The workspace ID is the ID after “https://client.apps.us.bluescape.com/” and before “?”.
    Example:
    In https://client.apps.us.bluescape.com/XkV4hX_IcjCaoI1gP6s3?targetRect=%5B16943%2 , the workspace ID is XkV4hX_IcjCaoI1gP6s3
  3. Create a couple of Text elements in your workspace.
  4. In the same browser, open a new tab and load the Developer Portal Reference page.
  5. Select one of the openapi documents under REST API v3 and use the Try it out button on the path of each API.

Example:

  1. Click on the “Workspace Content APIs” link.

  2. Select Elements → Get (https://api.apps.us.bluescape.com/docs/doc/us/elementary#/Elements/RestQueryController.find)

  3. Click on Try it out.

  4. You will see that the fields are now enabled for edition.

  5. In the workspace field, paste the workspace ID saved from #2 above.

  6. In the Type field, select Text.

  7. Delete the sample values in the rest of the fields.

Example:

  1. Click the Execute button.
  2. The results are now visible below the Execute button, in the Responses section (see image below):
    a. Curl is the curl operation that could be run to execute this API.
    b. Request URL is the request URL that was executed. It can be used in Postman or another similar tool.
    c. Response Body are the results of the execution of the API; the Text elements for the specified workspace.

The results are displayed:

Steps 3 to 9 can be repeated with other API paths.

After clicking the Try it out button, remember to delete the default values you do not want to use, or they will be included in the API execution.

3 Likes