According to API documentation, V query parameter for webhook trigger is optional (https://developer.openstack.org/api-ref/clustering/#id250):
V (Optional) query string The webhook implementation version requested.
However, when sending a webhook trigger request without the V query parameter, an error is returned:
(openstack) cluster receiver create --cluster mycluster --action CLUSTER_SCALE_OUT --type webhook test-receiver +------------+------------------------------------------------------------------------------------------------------+ | Field | Value | +------------+------------------------------------------------------------------------------------------------------+ | action | CLUSTER_SCALE_OUT | | actor | { | | | "trust_id": "d27dfaa97525490b8407822820bbf4e0" | | | } | | channel | { | | | "alarm_url": "http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger?V=1" | | | } | | cluster_id | 447efe11-7505-49bb-b264-534523464cdd | | created_at | 2018-03-28T16:15:20Z | | domain_id | None | | id | 30ef5c97-abab-4bfe-b73d-ca226ebf5f7d | | location | None | | name | test-receiver | | params | {} | | project_id | ce556a7d93c84471a0fc2154d3cbb592 | | type | webhook | | updated_at | None | | user_id | 1d7de07588dc4b08b478fd71e80ec8f2 | +------------+------------------------------------------------------------------------------------------------------+
stack@sandboxController:~> curl -X POST http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
The request to the webhook trigger does succeed without the V query parameter if the user passes in a X-Auth-Token:
stack@sandboxController:~> curl -X POST -H "X-Auth-Token: gAAAAABau9wcXjvwrJ1W-uFSK2T-wrbJSvmT--_6tGW_Dldv0W6-orLwZ5f-JWftvUjjxos2JCbwkxhXHv-2eSeuCAkKL9ps-sPZAaCEUX6gcO6sNH_c7-UAh5D1hgrrC2OkMYQiq9um1cb6wmW-ec-NE7XAXMy8e51lgXwPUVCqWo3pDXGjMbk" http://10.0.20.10:8778/v1/webhooks/30ef5c97-abab-4bfe-b73d-ca226ebf5f7d/trigger {"action": "fce862ed-aafc-4f3e-9bf5-30a2b14ede18"}
According to API documentation, V query parameter for webhook trigger is optional (https:/ /developer. openstack. org/api- ref/clustering/ #id250):
V (Optional) query string The webhook implementation version requested.
However, when sending a webhook trigger request without the V query parameter, an error is returned:
(openstack) cluster receiver create --cluster mycluster --action CLUSTER_SCALE_OUT --type webhook test-receiver ------+ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----+ ------+ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----+ 0b8407822820bbf 4e0" | 10.0.20. 10:8778/ v1/webhooks/ 30ef5c97- abab-4bfe- b73d-ca226ebf5f 7d/trigger? V=1" | 7505-49bb- b264-534523464c dd | 28T16:15: 20Z | abab-4bfe- b73d-ca226ebf5f 7d | 1a0fc2154d3cbb5 92 | 8b478fd71e80ec8 f2 | ------+ ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----+
+------
| Field | Value |
+------
| action | CLUSTER_SCALE_OUT |
| actor | { |
| | "trust_id": "d27dfaa9752549
| | } |
| channel | { |
| | "alarm_url": "http://
| | } |
| cluster_id | 447efe11-
| created_at | 2018-03-
| domain_id | None |
| id | 30ef5c97-
| location | None |
| name | test-receiver |
| params | {} |
| project_id | ce556a7d93c8447
| type | webhook |
| updated_at | None |
| user_id | 1d7de07588dc4b0
+------
stack@sandboxCo ntroller: ~> curl -X POST http:// 10.0.20. 10:8778/ v1/webhooks/ 30ef5c97- abab-4bfe- b73d-ca226ebf5f 7d/trigger
{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
The request to the webhook trigger does succeed without the V query parameter if the user passes in a X-Auth-Token:
stack@sandboxCo ntroller: ~> curl -X POST -H "X-Auth-Token: gAAAAABau9wcXjv wrJ1W-uFSK2T- wrbJSvmT- -_6tGW_ Dldv0W6- orLwZ5f- JWftvUjjxos2JCb wkxhXHv- 2eSeuCAkKL9ps- sPZAaCEUX6gcO6s NH_c7-UAh5D1hgr rC2OkMYQiq9um1c b6wmW-ec- NE7XAXMy8e51lgX wPUVCqWo3pDXGjM bk" http:// 10.0.20. 10:8778/ v1/webhooks/ 30ef5c97- abab-4bfe- b73d-ca226ebf5f 7d/trigger aafc-4f3e- 9bf5-30a2b14ede 18"}
{"action": "fce862ed-