Home - Accompa  |  Home - API Manual
REST API MANUAL
 
 
Table of Contents
1) Introduction
2) Objects
3) Records:
Requirements:
Read, Create, Update, Delete
Features:
Read, Create, Update, Delete
Use Cases:
Read, Create, Update, Delete
Custom Object Records:
Read, Create, Update, Delete
4) Relationships:
Read Related Items
5) Field History:
Read Field History
6) Views:
Read a View, Read List of Views
7) Search:
Search a View, Search All Records
8) Users:
Read, Read List
9) HTTP Response Codes & Errors
10) API Rate Limits
11) Miscellaneous
12) API Versions/Release Notes
 
 
Contact Support
Contact Accompa Support

Features

This page explains how to use the Accompa REST API to manage features:

Read a Feature

Reading a feature is achieved via a HTTP GET request to its URI.
 
GET /ft/{id}
Returns a single feature whose integer ID is {id}
 
RESPONSE
Status: 200

<feature>
  <fields>
    <field>
      <name>id</name>
      <label>ID</label>
      <value>55</value>
      <prefix>FT-</prefix>
      <sort>0</sort>
    </field>
    <field>
      <name>field_49</name>
      <label>Title</label>
      <value>Save document as CSV file</value>
      <sort>1</sort>
    </field>
    <field>
      <name>field_50</name>
      <label>Description</label>
      <value><![CDATA[<b>Important:</b> We have received requests from many customers to allow them to save the file as a <i>CSV file</i> (see example of such a file at <a href="http://www.MyExampleDomain.com/example_file.csv">this link</a>) so that they can import into other software.]]></value>
      <value_plaintext>Important: We have received requests from many customers to allow them to save the file as a CSV file (see example of such a file at this link) so that they can import into other software.</value_plaintext>
      <sort>2</sort>
    </field>
    <field>
      <name>field_51</name>
      <label>Products</label>
      <value id="5">Remarkable Spreadsheet</value>
      <list_type>normal</list_type>
      <sort>3</sort>
    </field>
    <field>
      <name>field_52</name>
      <label>Priority</label>
      <value id="1">P1 - Highest</value>
      <list_type>normal</list_type>
      <sort>4</sort>
    </field>
    <field>
      <name>field_57</name>
      <label>Assigned To</label>
      <value id="173" email="mickey.mouse@disney.com">Mickey Mouse</value>
      <list_type>user</list_type>
      <sort>5</sort>
    </field>
    ...
    ...
    ...
    <field>
      <name>version_number</name>
      <label>Version Number (Auto-generated)</label>
      <value>2</value>
      <sort />
    </field>
    <field>
      <name>created_time</name>
      <label>Created Time (GMT Timestamp)</label>
      <value>1262920833</value>
      <sort />
    </field>
    <field>
      <name>last_updated_time</name>
      <label>Last Updated Time (GMT Timestamp)</label>
      <value>1273784841</value>
      <sort />
    </field>
    <field>
      <name>created_by</name>
      <label>Created By</label>
      <value>14</value>
      <sort />
    </field>
    <field>
      <name>last_updated_by</name>
      <label>Last Updated By</label>
      <value>23</value>
      <sort />
    </field>
    <field>
      <name>version_comment</name>
      <label>Version Comment</label>
      <value>Fixed and updated status</value>
      <sort />
    </field>
  </fields>
</feature>
If a Feature with ID matching {id} exists, an XML response will be generated along with the status code "200". The XML response will contain the data stored for that particular Feature - and will include standard fields as well as custom fields.

If a Feature with ID matching {id} does not exist, the response HTTP 404 "not found" will be returned. Other errors will return a response other than "200", usually along with an error message in XML format.
 
Accompa API version "2" and later:
Contents of any "rich text" (Textarea) field will be returned as a CDATA section - i.e. starting with <![CDATA[ and ending with ]]> - containing HTML content.

In earlier versions of the API - only the "plain text" content of any Textarea field is returned, and will not be marked as a CDATA section.

Learn more about API versions
 

Create a Feature

Creating a feature is achieved via a HTTP POST request to the following URI.
 
POST /ft
Creates a single feature.
 
REQUEST
<feature>
  <fields>
    <field>
      <name>field_3005</name>
      <value>Save document as CSV file</value>
    </field>
    <field>
      <name>field_3006</name>
      <value>We have received requests from many customers to allow them to save the file as a CSV file so that they can import into other software.</value>
    </field>
    <field>
      <name>field_3007</name>
      <value>2</value>
    </field>
    <field>
      <name>field_3009</name>
      <value>1</value>
    </field>
    <field>
      <name>field_3010</name>
      <value>5930</value>
    </field>
    <field>
      <name>version_comment</name>
      <value>Created per request from customer: ABC, Inc.</value>
    </field>
    ...
  </fields>
</feature>
 
RESPONSE
Status: 201

Location: https://www.accompa.com/api2/{api_key}/ft/{id}
, where {id} is the Feature ID of the newly created feature.

If a feature is not created, a response other than "201" will be sent, usually along with an error message in XML format.
 
In order to construct the request, you'll need a list of all available fields for the Feature resource. You can retrieve this list via:
 
GET /ft/field
Returns a list of all fields available for the Feature resource.
 
RESPONSE
Status: 200

<feature_fields>
  <fields>
    <field>
      <name>id</name>
      <label>ID</label>
      <type>Number-Integer</type>
      <sort>0</sort>
      <help>This is the unique ID for this feature</help>
      <required>0</ftquired>
      <default_value />
      <max_size>15</max_size>
      <special_purpose>id</special_purpose>
    </field>
    <field>
      <id>3005</id>
      <name>field_3005</name>
      <label>Title</label>
      <type>Textbox</type>
      <sort>1</sort>
      <help>Enter a brief title for this feature.</help>
      <required>1</ftquired>
      <default_value>0</default_value>
      <max_size>255</max_size>
      <special_purpose>title</special_purpose>
    </field>
    <field>
      <id>3006</id>
      <name>field_3006</name>
      <label>Description</label>
      <type>Textarea</type>
      <sort>2</sort>
      <help>Enter description for this feature.</help>
      <required>1</ftquired>
      <default_value>10</default_value>
      <max_size>30000</max_size>
      <special_purpose>desc</special_purpose>
    </field>
    <field>
      <id>3007</id>
      <name>field_3007</name>
      <label>Products</label>
      <type>Picklist-Pick Multiple</type>
      <sort>3</sort>
      <help>Select products that this feature applies to.</help>
      <required>1</ftquired>
      <default_value />
      <max_size />
      <special_purpose>product</special_purpose>
      <picklist_options>
          <option>
            <value>1</value>
            <label>Remarkable Writer</label>
            <desc>This product is our online word processor.</desc>
            <option_sort />
            <option_default />
          </option>
          <option>
            <value>2</value>
            <label>Remarkable Spreadsheet</label>
            <desc>This product is a spreadsheet product.</desc>
            <option_sort />
            <option_default />
          </option>
          <option>
            <value>3</value>
            <label>Remarkable Calc</label>
            <desc />
            <option_sort />
            <option_default />
          </option>
          <option>
            ...
          </option>
      </picklist_options>
    </field>
    <field>
      <id>3008</id>
      <name>field_3008</name>
      <label>Tags</label>
      <type>Textbox</type>
      <sort>4</sort>
      <help>Tags are keywords or descriptive terms used to classify features. Tags are used to show similar features, and in searches.</help>
      <required>0</ftquired>
      <default_value>0</default_value>
      <max_size>255</max_size>
      <special_purpose>tags</special_purpose>
    </field>
    <field>
      <id>3009</id>
      <name>field_3009</name>
      <label>Status</label>
      <type>Picklist-Pick One</type>
      <sort>5</sort>
      <help>Enter status of this feature.</help>
      <required>0</ftquired>
      <default_value />
      <max_size />
      <special_purpose>status</special_purpose>
      <picklist_options>
          <option>
            <value>1</value>
            <label>Pending Review</label>
            <desc />
            <option_sort />
            <option_default />
          </option>
          <option>
            <value>2</value>
            <label>Accepted - Scheduled</label>
            <desc />
            <option_sort />
            <option_default />
          </option>
            ...
          <option>
          </option>
      </picklist_options>
    </field>
    <field>
      <id>3010</id>
      <name>field_3010</name>
      <label>Owner</label>
      <type>Picklist-Pick One</type>
      <sort>6</sort>
      <help>Select the owner for this feature. This person is currently responsible for this feature.</help>
      <required>0</ftquired>
      <default_value>0</default_value>
      <max_size />
      <special_purpose>owner</special_purpose>
      <picklist_options>
          <option>
            <value>1</value>
            <label>{{USERS}}</label>
            <desc />
            <option_sort />
            <option_default />
          </option>
      </picklist_options>
    </field>
    ...
  </fields>
</feature_fields>
When creating a feature, don't include the field with <name> value of "id" - ID of a new feature will be automatically assigned by the system. Please make sure to include all fields with <required> value of "1" in your request.

As you can see in the example above, picklist fields (such as 'Products' and 'Status' fields) will contain a <picklist_options> element which will list all available values for that field. For these picklist fields, set the <value> element in your request to appropriate integer value from one of the <value> elements in the response above. For picklist fields that accept multiple values (as indicated by <type>Picklist-Pick Multiple</type>) - set the <value> element in your request to a comma-separated string containing multiple integer values (example: <value>1,2,3</value>).

For picklist fields that contain a list of users on your system (such as 'Owner' field in the example above) - the response will contain only one child element within <picklist_options>, with <label> set to "{{USERS}}" . In these cases, you can get a list of all users on your system via:
 
GET /user
Returns a list of all users on your system.
 
RESPONSE
Status: 200

<users>
  <user>
    <user_id>5840</user_id>
    <email>mickey.mouse@disney.com</email>
    <firstname>Mickey</firstname>
    <lastname>Mouse</lastname>
    <deleted />
    <status>Active</status>
  </user>
  <user>
    <user_id>5930</user_id>
    <email>jason.bourne@treadstone.com</email>
    <firstname>Jason</firstname>
    <lastname>Bourne</lastname>
    <deleted />
    <status>Active</status>
  </user>
  ...
</users>
For such picklist fields, set the <value> element in your request to appropriate integer value from one of the <user_id> elements in the response above.
 

Update a Feature

Updating a feature is achieved via a HTTP POST request to the following URI.
 
PUT /ft/{id}
Updates a single feature whose integer ID is {id}
 
REQUEST
<feature>
  <fields>
    <field>
      <name>field_3005</name>
      <value>Save document as CSV file</value>
    </field>
    <field>
      <name>field_3006</name>
      <value>We have received requests from many customers to allow them to save the file as a CSV file so that they can import into other software.</value>
    </field>
    <field>
      <name>field_3007</name>
      <value>2</value>
    </field>
    <field>
      <name>field_3009</name>
      <value>1</value>
    </field>
    <field>
      <name>version_comment</name>
      <value>Updated status per request from Alex and Chris</value>
    </field>
    ...
  </fields>
</feature>
 
RESPONSE
Status: 200
If the feature is not updated, a response other than "200" will be sent, usually along with an error message in XML format.
 
In order to construct the request, you'll need a list of all available fields for the Feature resource. You can retrieve this list using the Retrieve Field List and Retrieve User List techniques described above under Create a Feature section.
 

Delete a Feature

Deleting a feature is achieved via a HTTP DELETE request to the following URI.
 
DELETE /ft/{id}
Deletes a single feature whose integer ID is {id}
 
RESPONSE
Status: 200
If the feature is not deleted, a response other than "200" will be sent, usually along with an error message in XML format.
   
  back to top ^
Home - Requirements Management Software - Terms of Service - Privacy Policy
© Accompa, Inc. 5201 Great America Pkwy, Ste 320, Santa Clara, CA 95054 (United States)