Codebase API Documentation

Tickets and Milestones

Each project can contain any number of tickets. A ticket also belongs to a number of "property objects" - statuses, priorities or categories - the available objects are listed below and are referenced to the ticket using the foreign ID. For example, the ticket status is linked using the status-id field, the priority uses the priority-id field, and so on. Each project maintains it's own set of property objects and you should ensure you use the appropriate foreign IDs for the project you are working with. The Statuses, Priorities & Categories documentation will give you information about how to obtain a list of all available properties for a specific project.

API URLs

Data Method URL
All tickets GET /project/tickets
All tickets (with search query) GET /project/tickets?query=query
Creating a new ticket POST /project/tickets

Object Properties

The XML output below shows the properties which are returned by default when accessing ticket details.

GET /project/tickets

<ticket>
  <ticket-id type="integer">2</ticket-id>
  <summary>Another Test Ticket</summary>
  <ticket-type>bug</ticket-type>
  <reporter-id type="integer">321</reporter-id>
  <assignee-id type="integer">321</assignee-id>
  <assignee>adam</assignee>
  <reporter>adam</reporter>
  <category-id type="integer">3351</category-id>
  <priority-id type="integer">3297</priority-id>
  <status-id type="integer">6675</status-id>
  <milestone-id type="integer" nil="true"/>
  <upload-tokens type="array">
    <upload-token>c2959f1c-0297-0af7-4e52-ed0bc3e2fb02</upload-token>
  </upload-tokens>
</ticket>
  • ticket-id contains the unique ID for the ticket. Each project's ticket numbering starts at 1 and increments by one each time.
  • summary required the current ticket summary
  • ticket-type required the ticket type - any of 'bug', 'enhancement' or 'task'.
  • reporter-id the ID of the user who reported this ticket
  • assignee-id the ID of the user who is currently assigned this ticket
  • assignee the username of the assignee. See below.
  • reporter the username of the reporter. See below.
  • category-id the ID of the ticket's category.
  • priority-id required the ID of the ticket's priority.
  • status-id required the ID of the ticket's status.
  • milestone-id the ID of the ticket's milestone or nil if no milestone is assigned.
  • upload_tokens allows already uploaded files to be attached to a ticket. Should be an array of tokens returned from Uploading Files.

See Statuses, Priorities &amp; Categories for information about IDs to use with status-id, category-id or priority-id and the milestone documentation for information about the content for milestone-id.

assignee and reporter are for information only. You cannot use these when creating or updating records. To update the assignee and reporter you should send the new assignee-id and reporter-id values, respectively.

Creating a ticket

You can also create a ticket using the parameters above. You can also set the initial content for a ticket by setting a description tag. Please note that if you're using any non-XML safe characters you should wrap your data in CDATA tags like so:

POST /project/tickets

<ticket>
  <summary>My new ticket</summary>
  <description><![CDATA[This happened & then that happened]]></description>
</ticket>