You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+39-65
Original file line number
Diff line number
Diff line change
@@ -16,19 +16,21 @@ The Developer Portal UI can also be used to help build your integration by showi
16
16
<!-- Start Summary [summary] -->
17
17
## Summary
18
18
19
-
airbyte-api: Programatically control Airbyte Cloud, OSS & Enterprise.
19
+
airbyte-api: Programmatically control Airbyte Cloud, OSS & Enterprise.
20
20
<!-- End Summary [summary] -->
21
21
22
22
<!-- Start Table of Contents [toc] -->
23
23
## Table of Contents
24
+
<!-- $toc-max-depth=2 -->
25
+
*[Authentication](#authentication)
26
+
*[SDK Installation](#sdk-installation)
27
+
*[SDK Example Usage](#sdk-example-usage)
28
+
*[Available Resources and Operations](#available-resources-and-operations)
29
+
*[Error Handling](#error-handling)
30
+
*[Server Selection](#server-selection)
31
+
*[Custom HTTP Client](#custom-http-client)
32
+
*[Authentication](#authentication-1)
24
33
25
-
*[SDK Installation](#sdk-installation)
26
-
*[SDK Example Usage](#sdk-example-usage)
27
-
*[Available Resources and Operations](#available-resources-and-operations)
28
-
*[Error Handling](#error-handling)
29
-
*[Server Selection](#server-selection)
30
-
*[Custom HTTP Client](#custom-http-client)
31
-
*[Authentication](#authentication)
32
34
<!-- End Table of Contents [toc] -->
33
35
34
36
<!-- Start SDK Installation [installation] -->
@@ -53,8 +55,8 @@ from airbyte_api import models
53
55
s = airbyte_api.AirbyteAPI(
54
56
security=models.Security(
55
57
basic_auth=models.SchemeBasicAuth(
56
-
password="",
57
-
username="",
58
+
password='',
59
+
username='',
58
60
),
59
61
),
60
62
)
@@ -160,11 +162,22 @@ if res.connection_response is not None:
160
162
<!-- Start Error Handling [errors] -->
161
163
## Error Handling
162
164
163
-
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
165
+
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an exception.
|`.raw_response`|*httpx.Response*| The raw HTTP response |
174
+
|`.body`|*str*| The response content |
175
+
176
+
When custom error responses are specified for an operation, the SDK may also raise their associated exception. You can refer to respective *Errors* tables in SDK docs for more details on possible exception types for each operation. For example, the `create_connection` method may raise the following exceptions:
177
+
178
+
| Error Type | Status Code | Content Type |
179
+
| --------------- | ----------- | ------------ |
180
+
| errors.SDKError | 4XX, 5XX |\*/\*|
168
181
169
182
### Example
170
183
@@ -175,8 +188,8 @@ from airbyte_api import errors, models
175
188
s = airbyte_api.AirbyteAPI(
176
189
security=models.Security(
177
190
basic_auth=models.SchemeBasicAuth(
178
-
password="",
179
-
username="",
191
+
password='',
192
+
username='',
180
193
),
181
194
),
182
195
)
@@ -206,45 +219,6 @@ if res.connection_response is not None:
206
219
<!-- Start Server Selection [server] -->
207
220
## Server Selection
208
221
209
-
### Select Server by Index
210
-
211
-
You can override the default server globally by passing a server index to the `server_idx: int` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
212
-
213
-
| # | Server | Variables |
214
-
| - | ------ | --------- |
215
-
| 0 |`https://api.airbyte.com/v1`| None |
216
-
217
-
#### Example
218
-
219
-
```python
220
-
import airbyte_api
221
-
from airbyte_api import models
222
-
223
-
s = airbyte_api.AirbyteAPI(
224
-
server_idx=0,
225
-
security=models.Security(
226
-
basic_auth=models.SchemeBasicAuth(
227
-
password="",
228
-
username="",
229
-
),
230
-
),
231
-
)
232
-
233
-
234
-
res = s.connections.create_connection(request=models.ConnectionCreateRequest(
The default server can also be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
@@ -253,11 +227,11 @@ import airbyte_api
253
227
from airbyte_api import models
254
228
255
229
s = airbyte_api.AirbyteAPI(
256
-
server_url="https://api.airbyte.com/v1",
230
+
server_url='https://api.airbyte.com/v1',
257
231
security=models.Security(
258
232
basic_auth=models.SchemeBasicAuth(
259
-
password="",
260
-
username="",
233
+
password='',
234
+
username='',
261
235
),
262
236
),
263
237
)
@@ -304,11 +278,11 @@ s = airbyte_api.AirbyteAPI(client=http_client)
304
278
305
279
This SDK supports the following security schemes globally:
You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
314
288
```python
@@ -318,8 +292,8 @@ from airbyte_api import models
0 commit comments