Confluence Retirement

In an effort to consolidate USGS hosted Wikis, myUSGS’ Confluence service is scheduled for retirement on January 27th, 2023. The official USGS Wiki and collaboration space is now SharePoint. Please migrate existing spaces and content to the SharePoint platform and remove it from Confluence at your earliest convenience. If you need any additional information or have any concerns about this change, please contact Thank you for your prompt attention to this matter.
Child pages
  • Using RESTClient for Firefox
Skip to end of metadata
Go to start of metadata

The REST Client Firefox Add-On

The REST Client Add-On for Firefox is very useful for testing syntax. Download it here:

Using the RESTClient plugin to GET and item

Note: Parameters for other REST clients should be similar to these instructions, but may break the URL down into HOST and GET parts.

In HTTPClient it is very simple to query an item for JSON or XML. Set the "Method" to GET, pointed at the URL of the item we want to query. Click “Headers” menu item then “Custom Header".  Set the Name = "Accept" and it's Value = "application/json" for JSON, "application/xml" for XML, or "application/text" for the normal text that you would see in a web browser.
That's it! Push "Send" and you will be able to see your results in raw and copyable form in the "Response Body" tab or formatted in a "Formatted JSON", "Formatted XML", or "Formatted HTML" tab.

You will also be returned with the "Response Header" in it's own tab with useful information like the Status Code.

Creating a basic New Item from RESTClient

To create a new item using the RESTClient for Firefox we first set the "Method" to "POST" and the URL to point at "". The "Content-Type" value must now be set to "application/json" since we are sending it JSON. We put our JSON request into the "Request Body", here we will use the minimum requirements to create a new item, setting just the parentId and the title:

{"parentId":"4f28888de4b050c1ade5f38e","title":"Test Item Title"}

Note: If you haven't used JSON before it is basically just a map with String keys and values that can be Strings or collections of Strings. See for more info.

Note: You must be logged in for this to be successful! You will get a Status Code of 200 even if you are not logged in, but the item WILL NOT be created and it will return Formatted HTML (in the form of a login page) instead of the Formatted JSON of your new item. The reason we use this plugin is because you can sign into usgs in a different tab and then use RESTClient because it will use the saved cookies you created.

Creating a more advanced New Item with RESTClient (using more fields) Example

Adding more fields to an item can be as simple as adding key/value string pairs, but the best way to figure out the formatting is to do a GET on an item that has the fields you are looking for (sometimes you may have to create a new item with these fields and do a get on it).

Nested Strings can be sent like this:

{"key":{"subkey": "value", "subkey2": "value2"}}

Nested Arrays of Strings can be sent like this:


Nested Arrays of key/value pairs can be sent like this:

{"key": [{"subkey1": "value", "subkey2": "value"},{"subkey1.2": "value", "subkey2.2": "value"}]}
Full Example{"parentId":"4f2add32e4b009ef29abd063",
"title":"Test Item Title",
"alternateTitles":["Alternate Titles","Alternate Titles 2","Alternate Titles 3"],
"materialRequestInstructions":"Material Request Instructions",
"tableOfContents":"Table of contents",
  • No labels