Jump to >

Extension Resource

Name extension
URI /api/extensions/{extension_name}/
Description A resource for representing a Review Board Extension.
HTTP Methods
  • GET - For retrieving data about an ExtensionResource.
  • PUT - Updates the state of the extension.
Parent Resource Extension List Resource
Child Resources None
Anonymous Access Yes, if anonymous site access is enabled

Fields

Field Type Description
class_name String The class name for the extension.
enabled Boolean Whether or not the extension is enabled.
installed Boolean Whether or not the extension is installed.
name String The name of the extension.

HTTP GET

For retrieving data about an ExtensionResource.

HTTP PUT

Updates the state of the extension.

If enabled is true, then the extension will be enabled, if it is not already. If false, it will be disabled.

Request Parameters

Field Type Description
enabled (required) Boolean Whether or not to make the extension active.

Examples

application/vnd.reviewboard.org.extension+json

{
  "extension": {
    "class_name": "rbreports.extension.ReportsExtension", 
    "enabled": false, 
    "installed": false, 
    "links": {
      "self": {
        "href": "http://reviews.example.com/api/extensions/rbreports.extension.ReportsExtension/", 
        "method": "GET"
      }, 
      "update": {
        "href": "http://reviews.example.com/api/extensions/rbreports.extension.ReportsExtension/", 
        "method": "PUT"
      }
    }, 
    "name": "RB-Reports"
  }, 
  "stat": "ok"
}

application/vnd.reviewboard.org.extension+xml

<?xml version="1.0" encoding="utf-8"?>
<rsp>
 <stat>ok</stat>
 <extension>
  <class_name>rbreports.extension.ReportsExtension</class_name>
  <enabled>0</enabled>
  <name>RB-Reports</name>
  <links>
   <self>
    <href>http://reviews.example.com/api/extensions/rbreports.extension.ReportsExtension/</href>
    <method>GET</method>
   </self>
   <update>
    <href>http://reviews.example.com/api/extensions/rbreports.extension.ReportsExtension/</href>
    <method>PUT</method>
   </update>
  </links>
  <installed>0</installed>
 </extension>
</rsp>