Developer Resources

API / (POST) Create Watch

This API call creates a 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.format
HTTP Method
POST




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




POST 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 POST
{
  "watch": {
    "watched_by": 7
  }
}




Example POST 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