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, 10 per page by default.

Params

Param Description
page Parameter to specify which page to request, see per_page to determine how many items per page.
per_page Specify the number of merge requests fetched per one page, default is 10.
status To get only merge requests with a specific status, set this parameter to one of the following values:
  • open for open merge requests
  • closed for closed merge requests
  • ignored for ignored merge requests

Examples

Request JSON, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/space_tools/_space_tool_id/merge_requests.json

Response

HTTP/1.1 200 OK
Server: nginx/0.7.68
Date: Tue, 24 Jul 2012 13:03:50 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

[
  {
    "processed_by_user_id":null,
    "status":0,
    "apply_status":null,
    "description":"",
    "title":"title",
    "target_space_tool_id":"bgfq4qA1Gr2QjIaaaHk9wZ",
    "target_space_id":"bBEAVq-5Gr4yhAimNqr_pR",
    "applied_at":null,
    "target_symbol":"master",
    "source_symbol_type":0,
    "source_symbol":"test_branch",
    "space_tool_id":"a5BqzgFVSr4zLpab_q0pIh",
    "updated_at":"2012-07-26T07:59:40Z",
    "commit":null,
    "id":2,
    "created_at":"2012-06-27T12:41:17Z",
    "user_id":"aeF1CInHCr4ybVab_q0pIh"
  },
  ...
]

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

Request XML, using cURL utility:

curl -i -H "Authorization: Bearer _token" https://api.assembla.com/v1/spaces/_space_id/space_tools/_space_tool_id/merge_requests.xml

Response

HTTP/1.1 200 OK
Server: nginx/0.7.68
Date: Tue, 24 Jul 2012 13:21:38 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>
    <processed-by-user-id nil="true"></processed-by-user-id>
    <status type="integer">0</status>
    <apply-status nil="true"></apply-status>
    <description></description>
    <title>title</title>
    <target-space-tool-id>bgfq4qA1Gr2QjIaaaHk9wZ</target-space-tool-id>
    <target-space-id>bBEAVq-5Gr4yhAimNqr_pR</target-space-id>
    <applied-at nil="true"></applied-at>
    <target-symbol>master</target-symbol>
    <source-symbol-type type="integer">0</source-symbol-type>
    <source-symbol>test_branch</source-symbol>
    <space-tool-id>a5BqzgFVSr4zLpab_q0pIh</space-tool-id>
    <updated-at type="datetime">2012-07-26T07:59:40Z</updated-at>
    <commit nil="true"></commit>
    <id type="integer">2</id>
    <created-at type="datetime">2012-06-27T12:41:17Z</created-at>
    <user-id>aeF1CInHCr4ybVab_q0pIh</user-id>
  </merge-request>
  ...
</merge-requests>

Description for each field: merge request object fields reference