HTTP Verb: GET

Available statuses: 200 OK, 422 Unprocessable Entity

Object: Webhook

Location: n/a

Formats: XML, JSON

Update webhook.

Params

To update the webhook, a data body must be provided. Data can be provided in three formats: XML, JSON and query string. To specify data type of XML or JSON add the Content-type: application/(json|xml) header to request headers, if you want to provide query string simply skip the Content-type header.

All params should be sent in the webhook namespace, e.g.:

XML

<webhook>
  <enabled>1</enabled>
  ...
</webhook>

JSON

{"webhook":{"enabled":"1",...}}

Query string

webhook[enabled]=1&...

Check the full list of available params on Webhook object fields reference

Examples

For example purposes we use a JSON body

{"webhook":{"enabled":"1"}}

Request XML, using cURL utility:

curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"webhook":{"enabled":"1"}}' https://api.assembla.com/v1/spaces/_space_id/webhooks/_webhook_id.xml

Response

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Wed, 20 Jun 2012 12:13:01 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

Request JSON, using cURL utility:

curl -i -X PUT -H "Authorization: Bearer _token" -H "Content-type: application/json" -d '{"webhook":{"enabled":"1"}}' https://api.assembla.com/v1/spaces/_space_id/webhooks/_webhook_id.json

Response

HTTP/1.1 200 OK
Server: nginx/0.8.55
Date: Wed, 20 Jun 2012 12:05:41 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 200
...

{}

For update operations no response body is available.