HTTP Verb: GET

Available statuses: 200 OK, 204 No Content, 404 Not Found

Object: MergeRequest

Location: n/a

Formats: XML, JSON

Returns a list of merge requests related to ticket.

Params

No params available

Examples

Request JSON, using cURL utility:

curl -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/tickets/_ticket_number/merge_requests.json

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Mon, 18 Jun 2012 11:31:32 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

[
  {
    "id":8,
    "title":"Fix the worst bug ever",
    "space_tool_id":"b89TL8MYWr4id7adbNA33N",
    "target_space_tool_id":"b89TL8MYWr4id7adbNA33N",
    "user_id":"bRxpnOMYWr4id7adbNA33N",
    "description":"in-production #tickets",
    "status":1,
    "created_at":"2011-09-02T10:21:48Z",
    "updated_at":"2012-04-12T10:32:58Z",
    "source_symbol":"hotfix_branch",
    "target_symbol":"master",
    "source_symbol_type":1,
    "processed_by_user_id":"bRxpnOMYWr4id7adbNA33N",
    "commit":"44eca96e140d0fa5698c554f547e2035224aab32",
    "url":"https://api.assembla.com/v1/spaces/myspace/space_tools/git/merge_requests/8",
    "target_space_id":"bRxpnOMYWr4id7adbNA33N"
  },
  ...
]

JSON is formatted here for readability, in a real response JSON body is inline with no indentation.

Request XML, using cURL utility:

curl -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/tickets/_ticket_number/merge_requests.xml

Response:

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Mon, 18 Jun 2012 11:35:32 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...


<?xml version="1.0" encoding="UTF-8"?>
<merge-requests type="array">
  <merge-request>
    <id type="integer">8</id>
    <title>Fix the worst bug ever</title>
    <space-tool-id>b89TL8MYWr4id7adbNA33N</space-tool-id>
    <target-space-tool-id>b89TL8MYWr4id7adbNA33N</target-space-tool-id>
    <user-id>bRxpnOMYWr4id7adbNA33N</user-id>
    <description>in-production #tickets</description>
    <status type="integer">1</status>
    <created-at type="dateTime">2011-09-02T10:21:48Z</created-at>
    <updated-at type="dateTime">2012-04-12T10:32:58Z</updated-at>
    <source-symbol>hotfix_branch</source-symbol>
    <target-symbol>master</target-symbol>
    <source-symbol-type type="integer">1</source-symbol-type>
    <processed-by-user-id>bRxpnOMYWr4id7adbNA33N</processed-by-user-id>
    <commit>44eca96e140d0fa5698c554f547e2035224aab32</commit>
    <url>https://api.assembla.com/v1/spaces/myspace/space_tools/git/merge_requests/8</url>
    <target-space-id>bRxpnOMYWr4id7adbNA33N</target-space-id>
  </merge-request>
  ...
</merge-requests>

Description for each field: merge request object fields reference