Using the Browser to Call API Methods

To learn more about the API and practice using the methods, you can either use this guide to make the calls using either a browser or a RESTful addon to a browser.

There are two methods for learning more about the API using your browser.

Using the browser address bar

It is simple to make calls to the API using only your browser's address bar. For the most part, only GET methods will work for this approach.

Steps:

  1. Go to the API Reference to see which methods exist and which one specifically you would like to test.

  2. Download a JSON formatter so that the output JSON is easily readable.

    Suggestions

  3. Go to your browser's address bar and type in the following url

    https://api.basespace.illumina.com/v1pre3/

    Followed by the method you would like to see.

    An example of how to see the runs the current user has access to using the method GET: users/current/runs, type in the following:

    https://api.basespace.illumina.com/v1pre3/users/current/runs

  4. For query parameters, simply add them onto the end of the url you just typed in with a ? after the method call but before typing in the query parameters. Each query parameter is separated by &.

    An example of how to see the runs a current user has access to using the method GET: users/current/runs with query parameters of status=complete and limit=10, type in the following:

    https://api.basespace.illumina.com/v1pre3/users/current/runs?Statuses=complete&Limit=10

Using a RESTful addon for your browser

Steps:

  1. Install a RESTful addon of your choice:

    Suggestions

    • Google Chrome: Install the Postman RESTful Client, or another RESTful Client of your choice, addon for Google Chrome

    • Mozilla Firefox: Install the RESTClient, or another RESTful Client of your choice, addon for Mozilla Firefox

    • Safari: Install the RESTClient, or another RESTful Client of your choice, addon for Safari

  2. Looking at the API Reference, you can now use the methods listed to see the JSON responses from the API, this should give you a better idea of the information that the API gives at each resource level

You will now be able to specify all of the methods through this addon and make GET and POST calls appropriately. The responses are described in detail in the API Reference.