Child pages
  • Using RESTClient for Firefox to test syntax and load data

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

The REST Client Add-On for Firefox is useful for testing the syntax of sbJSON packaged and presented to ScienceBase for loading and manipulating data. It provides a simple, visual way to be authenticated in ScienceBase and either .  A user can view how the REST services will behave under different scenarios or perform actual data management tasks that .  These tasks are only going to be used once and so where building a full application of some kind is not really necessary. The following example describes a real case where information was packaged and loaded into ScienceBase to create new items 

Table of Contents

Use Case: One-time load of item data to ScienceBase

...

To create a new item using the RESTClient for Firefox we first set the "Method" to "POST" and the URL to point at "www.sciencebase.gov/catalog/item/". The "Accept" header header will be set to "Content-Type".  The value must now be set to "application/json" since we are sending JSON. We put our JSON package into the "Body." Very minimal information is needed to create a basic ScienceBase item - only a parentId, for which your user credentials have "write" access, and a title.

...