Ticket Fields
To fetch metadata of Ticket object send a GET request to:
https://api.assembla.com/v1/meta/tickets.(json|xml)
example. request json with curl utility:
curl -H "Authorization: bearer _token" https://api.assembla.com/v1/meta/tickets.json
example. request xml with curl utility:
curl -H "Authorization: bearer _token" https://api.assembla.com/v1/meta/tickets.xml
table below is the list of fields contained in the response, this list will be properly formatted to json or xml as requested.
Fields
| Param | Data type | Access | Description |
|---|---|---|---|
| id | integer | read | Ticket identifier |
| number | integer | read/write | Ticket number, can be set ticket on creation |
| summary | string | read/write | Summary of the ticket, only field required to create a ticket. |
| description | text | read/write | Ticket description |
| priority | integer | read/write | Ticket priority, possible values are bolded:
|
| completed_date | datetime | read | Date and time when ticket was moved to one of Closed statuses (Fixed/Invalid). |
| component_id | integer | read/write | Id of the component associated with the ticket |
| created_on | datetime | read/write | Date and time when ticket was created, can be set ticket on creation |
| permission_type | integer | read/write | Sets ticket as a development or a support Public/Private ticket. To enable support tickets, a Support Tool must be added to the project. Available values are in bold:
|
| importance | float | read | Sorting criteria for Assembla Planner |
| is_story | boolean(0,1) | read/write | Mark ticket as a story, this is a general organization option, it will not affect tickets directly unless you manage it in your app. |
| milestone_id | integer | read/write | Id of the milestone that ticket is associated with |
| tags | array | write | Associate tags to the ticket. Examples: XML
<ticket>
<tags type="array">
<tag>tag1</tag>
<tag>tag2</tag>
</tags>
</ticket>
JSON
{"ticket":{"tags":["tag1","tag2"]}}
Query string
ticket[tags][]=tag1&ticket[tags][]=tag2 |
| followers | array | write | Add followers to the ticket by user login, email or id, examples: XML
<ticket>
<followers type="array">
<follower>a_user_login</follower>
<follower>user@example.com</follower>
<follower>bgnP_qA1Gr2QjIaaaHk9wZ</follower>
</followers>
</ticket>
JSON
{"ticket":{"followers":["a_user_login","user@example.com","bgnP_qA1Gr2QjIaaaHk9wZ"]}}
Query string
ticket[followers][]=a_user_login&ticket[followers][]=user@example.com&ticket[followers][]=bgnP_qA1Gr2QjIaaaHk9wZConsider bgnP_qA1Gr2QjIaaaHk9wZ is a user ID.
|
| notification_list | text | read/write |
A list of user IDs and emails separated by a comma, be careful when updating this field, any update operation will totally rewrite the field, you have to programmatically get the existing list, append your data to it and update the field with the full list. Example list: bgnP_qA1Gr2QjIaaaHk9wZ,user@example.com,ngngqA1Gr2QjIaaaHkhw0Note Consider using followers field to add users to notification list, use notification_list only to remove users or clear the list. |
| space_id | string | read | ID of the space that ticket is associated with |
| state | integer | read | Two values are available:
|
| status | string | read/write | String value of ticket status, set it to change the status of a ticket, not case sensitive i.e. New can be set as new or NEWNote: This field is writable on update operations only, not modifiable on ticket creation, this is restricted to preserve UI behavior. |
| story_importance | integer | read/write | Importance of a ticket inside a story |
| updated_at | datetime | read | Date and time ticket was updated. |
| working_hours | float | read/write | Working hours remained for the ticket. |
| estimate | float | read/write | Value of ticket estimation points |
| total_estimate | float | read | If ticket is story, this field contains all estimate data collected from associated tickets |
| total_invested_hours | float | read | Hours invested in ticket. |
| total_working_hours | float | read | Hours specified for this ticket to be invested for work on it. |
| assigned_to_id | string | read/write | ID of user ticket is assigned to. |
| reporter_id | string | read/write | ID of user who reported the ticket, can be set on ticket creation by a user with all permissions in space |
| custom_fields | hash | read/write | An array with custom fields and their values. To provide custom fields on create/update operations, add the custom fields collection with values e.g.: XML
<ticket>
...
<custom-fields type="array">
<Field-name>value</Field-name>
</custom-fields>
</ticket>
JSON
{"ticket":{"custom_fields":{"Field name":"MyField"}}}
Query string
ticket[custom_fields][Field name]=MyFieldNote: Spaces in field names are converted to dashes in XML. So if custom field name is "Field name" it will be displayed "Field-name" in XML responses, if field name should be provided for create/update operations spaces should be replaced with dashes for XML(Field-name). More information on ticket create and ticket update documentation pages. |
| hierarchy_type | integer | read/write | Plan level. Available values are in bold:
|
| is_support | boolean | read/write | Virtual attribute used for support tickets creation. Pass true if you want the ticket to be created with Support tool permissions. |
Validations
| Field | Validator | Description |
|---|---|---|
| reporter_id | presence validator | Reporter should be present, reporter is set automatically on ticket creation therefore removing it is not possible. |
| estimate | numericality validator | Only integer and float values or NULL are acceptable. |
| state | presence validator | State should be present, a default value is set for the field so you don't have to specify it on creation. |
| space_id | presence validator | Space id should be present, space id is set automatically on ticket creation and can't be changed or removed. |
| summary | presence validator | Ticket summary should be present. |
| working_hours | numericality validator | Only integer and float values or NULL are acceptable. |
| number | uniqueness validator | Ticket number should be unique in space scope. |
| priority | inclusion validator | Should be in range from 1 to 5. |