Get a single webhook by it's ID

Get a single webhook by its id

Give a single webhook id and optionally a list of fields to fetch. By default, it will fetch all the fields the current user can read.

GET /restapi/1.0/webhooks/{id}

Request:

GET /restapi/1.0/webhooks/7 HTTP/1.1
Host: {your_Odoo_server_url}

Response:

HTTP/1.1 200 OK

{
  'webhook': {
      'id': 7,
      'name': 'Product Update',
      'model': 'product.product',
      'kind': 'on_write',
      'address': 'https://requestbin.net/152eq5l1',
      'format': 'json',
      'language': 'en_US',
      'fields': [],
      'create_date': '2017-11-02 12:15:47',
      'write_date': '2017-11-02 14:12:40'
  }
}

Query Parameters:

fields – OPTIONAL. list of field names to return (default is all fields).

Headers and Status Codes
Description

Request Headers

  • Accept – the response content type depends on header

  • Authorization – The OAuth protocol parameters to authenticate.

Response Headers

Status Codes

Conversely, picking only six fields deemed interesting.

Request:

GET /restapi/1.0/webhooks/7?fields=['name','model', 'kind', 'address', 'format', 'language'] HTTP/1.1
Host: {your_Odoo_server_url}

Response:

HTTP/1.1 200 OK

{
  'webhook': {
      'id': 7,
      'name': 'Product Update',
      'model': 'product.product',
      'kind': 'on_write',
      'address': 'https://requestbin.net/152eq5l1',
      'format': 'json',
      'language': 'en_US'
  }
}

Note

even if the id field is not requested, it is always returned

Last updated