HTTP Verb: POST

Available statuses: 201 Created, 404 Not Found, 422 Unprocessable Entity

Object: SpaceTool

Location: available

Formats: XML, JSON

Add a space tool to space. To add a space tool to space a tool id must be provided, check the list of available tool ids on space tool object fields reference

Params

No params available

Examples

Request XML, using cURL utility:

curl -i -H "Authorization: Bearer _token" -X POST https://api.assembla.com/v1/spaces/_space_id/space_tools/_tool_id/add.xml

Response:

HTTP/1.1 201 Created
Server: nginx/0.8.55
Date: Tue, 11 Sep 2012 09:06:02 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 201
Location: https://api.assembla.com/v1/spaces/dPaXdY--8r4z__adbNA33N/space_tools/13
...

<?xml version="1.0" encoding="UTF-8"?>
<space-tool>
  <type>TicketTool</type>
  <active type="boolean">true</active>
  <tool-id type="integer">13</tool-id>
  <created-at type="datetime">2012-09-11T09:06:02Z</created-at>
  <space-id>atZ4pwbtar4zpiadbNA33N</space-id>
  <url nil="true"></url>
  <team-permissions nil="true"></team-permissions>
  <number type="integer">1</number>
  <public-permissions nil="true"></public-permissions>
  <parent-id nil="true"></parent-id>
  <watcher-permissions nil="true"></watcher-permissions>
  <menu-name>Tickets</menu-name>
  <name>dPaXdY--8r4z__adbNA33N</name>
  <id>dPaXdY--8r4z__adbNA33N</id>
  <settings nil="true"></settings>
</space-tool>

Request JSON, using cURL utility:

curl -i -H "Authorization: Bearer _token" -X POST https://api.assembla.com/v1/spaces/_space_id/space_tools/_tool_id/add.json

Response:

HTTP/1.1 201 Created
Server: nginx/0.8.55
Date: Tue, 11 Sep 2012 09:07:30 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 201
Location: https://api.assembla.com/v1/spaces/aDHZx2-_ar4AGFadbNA33N/space_tools/13

{
  "type":"TicketTool",
  "active":true,
  "tool_id":13,
  "created_at":"2012-09-11T09:07:30Z",
  "space_id":"atZ4pwbtar4zpiadbNA33N",
  "url":null,
  "team_permissions":null,
  "number":1,
  "public_permissions":null,
  "parent_id":null,
  "watcher_permissions":null,
  "menu_name":"Tickets",
  "name":"aDHZx2-_ar4AGFadbNA33N",
  "id":"aDHZx2-_ar4AGFadbNA33N",
  "settings":null
}

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

Note: pay attention to Location header, this is the URL where newly created resource is located, you can GET on this URL to access this resource.

Description for each field: space tool object fields reference