svix 0.41.0 → 0.48.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +62 -8
- data/lib/svix/api/application_api.rb +23 -1
- data/lib/svix/api/authentication_api.rb +7 -1
- data/lib/svix/api/endpoint_api.rb +61 -18
- data/lib/svix/api/environment_api.rb +158 -0
- data/lib/svix/api/environment_settings_api.rb +82 -0
- data/lib/svix/api/event_type_api.rb +23 -1
- data/lib/svix/api/health_api.rb +6 -1
- data/lib/svix/api/integration_api.rb +627 -0
- data/lib/svix/api/message_api.rb +31 -3
- data/lib/svix/api/message_attempt_api.rb +359 -5
- data/lib/svix/api/organization_api.rb +152 -0
- data/lib/svix/api/organization_settings_api.rb +7 -7
- data/lib/svix/api/statistics_api.rb +7 -1
- data/lib/svix/api_client.rb +1 -1
- data/lib/svix/api_error.rb +1 -1
- data/lib/svix/configuration.rb +1 -1
- data/lib/svix/endpoint_api.rb +1 -1
- data/lib/svix/integration_api.rb +38 -0
- data/lib/svix/internal.rb +1 -0
- data/lib/svix/message_attempt_api.rb +11 -1
- data/lib/svix/models/application_in.rb +1 -1
- data/lib/svix/models/application_out.rb +1 -1
- data/lib/svix/models/attempt_statistics_data.rb +1 -1
- data/lib/svix/models/attempt_statistics_response.rb +1 -1
- data/lib/svix/models/border_radius_config.rb +1 -1
- data/lib/svix/models/border_radius_enum.rb +1 -1
- data/lib/svix/models/custom_theme_override.rb +1 -1
- data/lib/svix/models/dashboard_access_out.rb +1 -1
- data/lib/svix/models/endpoint_created_event.rb +1 -1
- data/lib/svix/models/endpoint_created_event_data.rb +1 -1
- data/lib/svix/models/endpoint_deleted_event.rb +1 -1
- data/lib/svix/models/endpoint_deleted_event_data.rb +1 -1
- data/lib/svix/models/endpoint_disabled_event.rb +1 -1
- data/lib/svix/models/endpoint_disabled_event_data.rb +1 -1
- data/lib/svix/models/endpoint_headers_in.rb +1 -1
- data/lib/svix/models/endpoint_headers_out.rb +1 -1
- data/lib/svix/models/endpoint_in.rb +38 -2
- data/lib/svix/models/endpoint_message_out.rb +38 -2
- data/lib/svix/models/endpoint_out.rb +38 -2
- data/lib/svix/models/endpoint_secret_out.rb +1 -1
- data/lib/svix/models/endpoint_secret_rotate_in.rb +1 -1
- data/lib/svix/models/endpoint_stats.rb +1 -1
- data/lib/svix/models/endpoint_update.rb +38 -2
- data/lib/svix/models/endpoint_updated_event.rb +1 -1
- data/lib/svix/models/endpoint_updated_event_data.rb +1 -1
- data/lib/svix/models/environment_in.rb +257 -0
- data/lib/svix/models/environment_out.rb +259 -0
- data/lib/svix/models/environment_settings_out.rb +308 -0
- data/lib/svix/models/event_example_in.rb +1 -1
- data/lib/svix/models/event_type_example_out.rb +1 -1
- data/lib/svix/models/event_type_in.rb +1 -1
- data/lib/svix/models/event_type_out.rb +1 -1
- data/lib/svix/models/event_type_schema_in.rb +1 -1
- data/lib/svix/models/event_type_update.rb +1 -1
- data/lib/svix/models/export_organization_out.rb +259 -0
- data/lib/svix/models/font_size_config.rb +1 -1
- data/lib/svix/models/http_error_out.rb +1 -1
- data/lib/svix/models/http_validation_error.rb +1 -1
- data/lib/svix/models/import_organization_in.rb +257 -0
- data/lib/svix/models/integration_in.rb +223 -0
- data/lib/svix/models/integration_key_out.rb +223 -0
- data/lib/svix/models/integration_out.rb +265 -0
- data/lib/svix/models/integration_update.rb +223 -0
- data/lib/svix/models/list_response_application_out.rb +1 -1
- data/lib/svix/models/list_response_endpoint_message_out.rb +1 -1
- data/lib/svix/models/list_response_endpoint_out.rb +1 -1
- data/lib/svix/models/list_response_event_type_out.rb +1 -1
- data/lib/svix/models/list_response_integration_out.rb +248 -0
- data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +1 -1
- data/lib/svix/models/list_response_message_attempt_out.rb +1 -1
- data/lib/svix/models/list_response_message_endpoint_out.rb +1 -1
- data/lib/svix/models/list_response_message_out.rb +1 -1
- data/lib/svix/models/message_attempt_endpoint_out.rb +16 -2
- data/lib/svix/models/message_attempt_exhausted_event.rb +1 -1
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +1 -1
- data/lib/svix/models/message_attempt_failed_event.rb +1 -1
- data/lib/svix/models/message_attempt_out.rb +1 -1
- data/lib/svix/models/message_attempt_trigger_type.rb +1 -1
- data/lib/svix/models/message_endpoint_out.rb +38 -2
- data/lib/svix/models/message_in.rb +38 -2
- data/lib/svix/models/message_out.rb +38 -2
- data/lib/svix/models/message_status.rb +1 -1
- data/lib/svix/models/portal_settings_out.rb +16 -5
- data/lib/svix/models/recover_in.rb +1 -1
- data/lib/svix/models/settings_in.rb +339 -0
- data/lib/svix/models/settings_out.rb +339 -0
- data/lib/svix/models/statistics_period.rb +1 -1
- data/lib/svix/models/validation_error.rb +1 -1
- data/lib/svix/models/webhook_types.rb +1 -1
- data/lib/svix/svix.rb +2 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +8 -2
- metadata +23 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1742c65f260a8cbf205d478341f72aff69b0e6ef1019ddccb309355b266f583
|
4
|
+
data.tar.gz: 62150765756ff23b82ddd3f3906d60923f14053d3895c94317bde67d0b39d51a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cac5c60620c751a953300a734bf1910a11f30401752d81e1eb3b5d19eac33e57f2e87f8da7614f1e715e5ab71b31542a4cfefafbc7d0cd14f5072a41b9ccf01f
|
7
|
+
data.tar.gz: 79428d402103ce0068cd8e52a48bdb208c90c96be1169ceb8c17bd845f91ad831803fa4b1e92427da43911f74fa875abfb552d4068e7154403490978eb318d41
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,46 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
<h1 align="center">
|
2
|
+
<a style="text-decoration: none" href="https://www.svix.com">
|
3
|
+
<img width="120" src="https://avatars.githubusercontent.com/u/80175132?s=200&v=4" />
|
4
|
+
<p align="center">Svix - Webhooks as a service</p>
|
5
|
+
</a>
|
6
|
+
</h1>
|
7
|
+
<h2 align="center">
|
8
|
+
<a href="https://svix.com">Website</a> | <a href="https://docs.svix.com">Documentation</a> | <a href="https://svix.com/slack">Community Slack</a>
|
9
|
+
<h2>
|
10
|
+
|
11
|
+
Ruby library for interacting with the Svix API and verifying webhook signatures
|
12
|
+
|
13
|
+
![GitHub tag](https://img.shields.io/github/tag/svix/svix-webhooks.svg)
|
14
|
+
[![Gem](https://img.shields.io/gem/v/svix)](https://rubygems.org/gems/svix)
|
15
|
+
|
16
|
+
|
17
|
+
[![Join our slack](https://img.shields.io/badge/Slack-join%20the%20community-blue?logo=slack&style=social)](https://www.svix.com/slack/)
|
18
|
+
|
19
|
+
# Usage Documentation
|
20
|
+
|
21
|
+
You can find general usage documentation at <https://docs.svix.com>. For complete API documentation with code examples for each endpoint in all of our official client libraries head over to our API documentation site at <https://api.svix.com>.
|
22
|
+
|
23
|
+
# Language Support
|
24
|
+
|
25
|
+
<table style="table-layout:fixed; white-space: nowrap;">
|
26
|
+
<th colspan="2">⚡️ Features ⚡️</th>
|
27
|
+
<tr>
|
28
|
+
<th>Officially Supported</th>
|
29
|
+
<th>✅</th>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<th>API Support</th>
|
33
|
+
<th>✅</th>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<th>Signature Verification</th>
|
37
|
+
<th>✅</th>
|
38
|
+
</tr>
|
39
|
+
<tr>
|
40
|
+
<th>Caveats</th>
|
41
|
+
<th>🚀 None!</th>
|
42
|
+
</tr>
|
43
|
+
</table>
|
4
44
|
|
5
45
|
## Installation
|
6
46
|
|
@@ -22,19 +62,33 @@ Or install it yourself as:
|
|
22
62
|
gem install svix
|
23
63
|
```
|
24
64
|
|
25
|
-
|
65
|
+
# Development
|
66
|
+
|
67
|
+
First checkout the [core README](../README.md#development) for details on how to generate our API bindings, then follow the steps below.
|
26
68
|
|
27
|
-
|
69
|
+
## Building
|
28
70
|
|
29
|
-
|
71
|
+
```sh
|
72
|
+
bundler exec rake build
|
73
|
+
```
|
30
74
|
|
75
|
+
## Contributing
|
31
76
|
|
32
|
-
|
77
|
+
Before opening a PR be sure to format your code!
|
33
78
|
|
79
|
+
```sh
|
34
80
|
bundle exec rspec spec
|
81
|
+
```
|
35
82
|
|
83
|
+
## Running Tests
|
84
|
+
|
85
|
+
Simply run:
|
86
|
+
|
87
|
+
```sh
|
88
|
+
bundle exec rspec spec
|
89
|
+
```
|
36
90
|
|
37
|
-
|
91
|
+
## Publishing
|
38
92
|
|
39
93
|
```sh
|
40
94
|
gem build svix.gemspec
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -23,6 +23,8 @@ module Svix
|
|
23
23
|
# Create a new application.
|
24
24
|
# @param application_in [ApplicationIn]
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [Boolean] :get_if_exists (default to false)
|
27
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
26
28
|
# @return [ApplicationOut]
|
27
29
|
def create_application_api_v1_app_post(application_in, opts = {})
|
28
30
|
data, _status_code, _headers = create_application_api_v1_app_post_with_http_info(application_in, opts)
|
@@ -33,6 +35,8 @@ module Svix
|
|
33
35
|
# Create a new application.
|
34
36
|
# @param application_in [ApplicationIn]
|
35
37
|
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [Boolean] :get_if_exists
|
39
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
36
40
|
# @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
|
37
41
|
def create_application_api_v1_app_post_with_http_info(application_in, opts = {})
|
38
42
|
if @api_client.config.debugging
|
@@ -47,6 +51,7 @@ module Svix
|
|
47
51
|
|
48
52
|
# query parameters
|
49
53
|
query_params = opts[:query_params] || {}
|
54
|
+
query_params[:'get_if_exists'] = opts[:'get_if_exists'] if !opts[:'get_if_exists'].nil?
|
50
55
|
|
51
56
|
# header parameters
|
52
57
|
header_params = opts[:header_params] || {}
|
@@ -54,6 +59,7 @@ module Svix
|
|
54
59
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
60
|
# HTTP header 'Content-Type'
|
56
61
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
62
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
57
63
|
|
58
64
|
# form parameters
|
59
65
|
form_params = opts[:form_params] || {}
|
@@ -88,6 +94,7 @@ module Svix
|
|
88
94
|
# Delete an application.
|
89
95
|
# @param app_id [String]
|
90
96
|
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
91
98
|
# @return [nil]
|
92
99
|
def delete_application_api_v1_app_app_id_delete(app_id, opts = {})
|
93
100
|
delete_application_api_v1_app_app_id_delete_with_http_info(app_id, opts)
|
@@ -98,6 +105,7 @@ module Svix
|
|
98
105
|
# Delete an application.
|
99
106
|
# @param app_id [String]
|
100
107
|
# @param [Hash] opts the optional parameters
|
108
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
101
109
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
102
110
|
def delete_application_api_v1_app_app_id_delete_with_http_info(app_id, opts = {})
|
103
111
|
if @api_client.config.debugging
|
@@ -130,6 +138,7 @@ module Svix
|
|
130
138
|
header_params = opts[:header_params] || {}
|
131
139
|
# HTTP header 'Accept' (if needed)
|
132
140
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
141
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
133
142
|
|
134
143
|
# form parameters
|
135
144
|
form_params = opts[:form_params] || {}
|
@@ -164,6 +173,7 @@ module Svix
|
|
164
173
|
# Get an application.
|
165
174
|
# @param app_id [String]
|
166
175
|
# @param [Hash] opts the optional parameters
|
176
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
167
177
|
# @return [ApplicationOut]
|
168
178
|
def get_application_api_v1_app_app_id_get(app_id, opts = {})
|
169
179
|
data, _status_code, _headers = get_application_api_v1_app_app_id_get_with_http_info(app_id, opts)
|
@@ -174,6 +184,7 @@ module Svix
|
|
174
184
|
# Get an application.
|
175
185
|
# @param app_id [String]
|
176
186
|
# @param [Hash] opts the optional parameters
|
187
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
177
188
|
# @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
|
178
189
|
def get_application_api_v1_app_app_id_get_with_http_info(app_id, opts = {})
|
179
190
|
if @api_client.config.debugging
|
@@ -206,6 +217,7 @@ module Svix
|
|
206
217
|
header_params = opts[:header_params] || {}
|
207
218
|
# HTTP header 'Accept' (if needed)
|
208
219
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
220
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
209
221
|
|
210
222
|
# form parameters
|
211
223
|
form_params = opts[:form_params] || {}
|
@@ -241,6 +253,7 @@ module Svix
|
|
241
253
|
# @param [Hash] opts the optional parameters
|
242
254
|
# @option opts [String] :iterator
|
243
255
|
# @option opts [Integer] :limit (default to 50)
|
256
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
244
257
|
# @return [ListResponseApplicationOut]
|
245
258
|
def list_applications_api_v1_app_get(opts = {})
|
246
259
|
data, _status_code, _headers = list_applications_api_v1_app_get_with_http_info(opts)
|
@@ -252,11 +265,16 @@ module Svix
|
|
252
265
|
# @param [Hash] opts the optional parameters
|
253
266
|
# @option opts [String] :iterator
|
254
267
|
# @option opts [Integer] :limit
|
268
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
255
269
|
# @return [Array<(ListResponseApplicationOut, Integer, Hash)>] ListResponseApplicationOut data, response status code and response headers
|
256
270
|
def list_applications_api_v1_app_get_with_http_info(opts = {})
|
257
271
|
if @api_client.config.debugging
|
258
272
|
@api_client.config.logger.debug 'Calling API: ApplicationApi.list_applications_api_v1_app_get ...'
|
259
273
|
end
|
274
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
|
275
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ApplicationApi.list_applications_api_v1_app_get, must be smaller than or equal to 250.'
|
276
|
+
end
|
277
|
+
|
260
278
|
# resource path
|
261
279
|
local_var_path = '/api/v1/app/'
|
262
280
|
|
@@ -269,6 +287,7 @@ module Svix
|
|
269
287
|
header_params = opts[:header_params] || {}
|
270
288
|
# HTTP header 'Accept' (if needed)
|
271
289
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
290
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
272
291
|
|
273
292
|
# form parameters
|
274
293
|
form_params = opts[:form_params] || {}
|
@@ -304,6 +323,7 @@ module Svix
|
|
304
323
|
# @param app_id [String]
|
305
324
|
# @param application_in [ApplicationIn]
|
306
325
|
# @param [Hash] opts the optional parameters
|
326
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
307
327
|
# @return [ApplicationOut]
|
308
328
|
def update_application_api_v1_app_app_id_put(app_id, application_in, opts = {})
|
309
329
|
data, _status_code, _headers = update_application_api_v1_app_app_id_put_with_http_info(app_id, application_in, opts)
|
@@ -315,6 +335,7 @@ module Svix
|
|
315
335
|
# @param app_id [String]
|
316
336
|
# @param application_in [ApplicationIn]
|
317
337
|
# @param [Hash] opts the optional parameters
|
338
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
318
339
|
# @return [Array<(ApplicationOut, Integer, Hash)>] ApplicationOut data, response status code and response headers
|
319
340
|
def update_application_api_v1_app_app_id_put_with_http_info(app_id, application_in, opts = {})
|
320
341
|
if @api_client.config.debugging
|
@@ -353,6 +374,7 @@ module Svix
|
|
353
374
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
354
375
|
# HTTP header 'Content-Type'
|
355
376
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
377
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
356
378
|
|
357
379
|
# form parameters
|
358
380
|
form_params = opts[:form_params] || {}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#Svix API
|
3
3
|
|
4
|
-
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
|
4
|
+
#Welcome to the Svix API documentation! Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/) # Introduction This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com). ## Main concepts In Svix you have four important entities you will be interacting with: - `messages`: these are the webhooks being sent. They can have contents and a few other properties. - `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform. - `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type). - `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint. ## Authentication Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. <SecurityDefinitions /> ## Code samples The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/). ## Idempotency Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response. To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Svix's idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result. Please note that idempotency is only supported for `POST` requests. ## Cross-Origin Resource Sharing This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 1.4
|
7
7
|
|
@@ -23,6 +23,7 @@ module Svix
|
|
23
23
|
# Use this function to get magic links (and authentication codes) for connecting your users to the management UIs.
|
24
24
|
# @param app_id [String]
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
26
27
|
# @return [DashboardAccessOut]
|
27
28
|
def get_dashboard_access_api_v1_auth_dashboard_access_app_id_post(app_id, opts = {})
|
28
29
|
data, _status_code, _headers = get_dashboard_access_api_v1_auth_dashboard_access_app_id_post_with_http_info(app_id, opts)
|
@@ -33,6 +34,7 @@ module Svix
|
|
33
34
|
# Use this function to get magic links (and authentication codes) for connecting your users to the management UIs.
|
34
35
|
# @param app_id [String]
|
35
36
|
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
36
38
|
# @return [Array<(DashboardAccessOut, Integer, Hash)>] DashboardAccessOut data, response status code and response headers
|
37
39
|
def get_dashboard_access_api_v1_auth_dashboard_access_app_id_post_with_http_info(app_id, opts = {})
|
38
40
|
if @api_client.config.debugging
|
@@ -65,6 +67,7 @@ module Svix
|
|
65
67
|
header_params = opts[:header_params] || {}
|
66
68
|
# HTTP header 'Accept' (if needed)
|
67
69
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
70
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
68
71
|
|
69
72
|
# form parameters
|
70
73
|
form_params = opts[:form_params] || {}
|
@@ -98,6 +101,7 @@ module Svix
|
|
98
101
|
# Logout
|
99
102
|
# Logout an app token. Trying to log out other tokens will fail.
|
100
103
|
# @param [Hash] opts the optional parameters
|
104
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
101
105
|
# @return [nil]
|
102
106
|
def logout_api_v1_auth_logout_post(opts = {})
|
103
107
|
logout_api_v1_auth_logout_post_with_http_info(opts)
|
@@ -107,6 +111,7 @@ module Svix
|
|
107
111
|
# Logout
|
108
112
|
# Logout an app token. Trying to log out other tokens will fail.
|
109
113
|
# @param [Hash] opts the optional parameters
|
114
|
+
# @option opts [String] :idempotency_key The request's idempotency key
|
110
115
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
111
116
|
def logout_api_v1_auth_logout_post_with_http_info(opts = {})
|
112
117
|
if @api_client.config.debugging
|
@@ -122,6 +127,7 @@ module Svix
|
|
122
127
|
header_params = opts[:header_params] || {}
|
123
128
|
# HTTP header 'Accept' (if needed)
|
124
129
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
130
|
+
header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
|
125
131
|
|
126
132
|
# form parameters
|
127
133
|
form_params = opts[:form_params] || {}
|