-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathwebhook.yaml
More file actions
80 lines (80 loc) · 2.09 KB
/
webhook.yaml
File metadata and controls
80 lines (80 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
openapi: 3.1.0
info:
title: Optimizely Server API
description: Optimizely.
termsOfService: http://optimizely.com/terms/
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: '0.1.0'
servers:
- url: https://api.optimizely.com
description: Hosted Optimizely Decision Service
security:
- WebhookSignature: []
paths:
/webhooks/optimizely:
post:
summary: handleWebhook
description: Incoming webhook message from Optimizely
operationId: handleWebhook
requestBody:
description: Webhook message received from Optimizely
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/WebhookRequest'
- description: Webhook message received from Optimizely
contentMediaType: application/json
required: true
responses:
'204':
description: No content. Webhook message received and processed.
'400':
description: Invalid webhook message received.
security:
- WebhookSignature: []
deprecated: false
components:
securitySchemes:
WebhookSignature:
type: apiKey
name: X-Hub-Signature
in: header
description: "HMAC-SHA1 signature of the request payload using the webhook secret (format: sha1=<hex_digest>)"
schemas:
DatafileUpdateData:
title: DatafileUpdateData
required:
- revision
- cdn_url
type: object
properties:
revision:
type: integer
contentEncoding: int32
origin_url:
type: string
cdn_url:
type: string
environment:
type: string
WebhookRequest:
title: WebhookRequest
required:
- project_id
- timestamp
- event
- data
type: object
properties:
project_id:
type: number
timestamp:
type: number
event:
const: project.datafile_updated
type: string
data:
$ref: '#/components/schemas/DatafileUpdateData'