Developer Resources

API / (PUT) Update Watch

This API call updates an existing watch and returns it.
HTTP-, API- or Beetil-specific errors will be returned otherwise.

API URL
https://youraccount.beetil.com/external_api/v1/:parent/:parent_id/watches/:id.format
HTTP Method
PUT




URL parameters

ParameterFormatDefaultMandatory
parentThe name of the parent the watch belongs to (see Show Watches).stringYes
parent_idThe id of the parent the watch belongs to (see Show Watches).integerYes
idintegerYes




PUT parameters

ParameterFormatDefaultMandatory
watched_byThe id of the user that's watching.stringYes


These parameters are encapsulated into a 'watch' parameter. See the examples below.





Example PUT
{
  "watch": {
    "watched_by": 54
  }
}




Example PUT Response
{
  "result": {
    "time_entry": "JSON string similar to GET :parent/:parent_id/watches/:id"
  },
  "version": "1.0",
  "status": "Success"
}




Example Error
{
  "errors": [
    {
      "error": "[E400] watched_by can't be blank"
    }
  ],
  "version": "1.0",
  "status": "Failed"
}




Last updated 31 January 2011