All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| bulk_variables | PATCH /api/v2/variables | Bulk Variables |
| delete_variable | DELETE /api/v2/variables/{variable_key} | Delete Variable |
| get_variable | GET /api/v2/variables/{variable_key} | Get Variable |
| get_variables | GET /api/v2/variables | Get Variables |
| patch_variable | PATCH /api/v2/variables/{variable_key} | Patch Variable |
| post_variable | POST /api/v2/variables | Post Variable |
BulkResponse bulk_variables(bulk_body_variable_body)
Bulk Variables
Bulk create, update, and delete variables.
import airflow_client.client from airflow_client.client.models.bulk_body_variable_body import BulkBodyVariableBody from airflow_client.client.models.bulk_response import BulkResponse from airflow_client.client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = airflow_client.client.Configuration( host = "http://localhost" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. configuration.access_token = os.environ["ACCESS_TOKEN"] # Configure Bearer authorization: HTTPBearer configuration = airflow_client.client.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.VariableApi(api_client) bulk_body_variable_body = airflow_client.client.BulkBodyVariableBody() # BulkBodyVariableBody | try: # Bulk Variables api_response = api_instance.bulk_variables(bulk_body_variable_body) print("The response of VariableApi->bulk_variables:\n") pprint(api_response) except Exception as e: print("Exception when calling VariableApi->bulk_variables: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| bulk_body_variable_body | BulkBodyVariableBody |
OAuth2PasswordBearer, HTTPBearer
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_variable(variable_key)
Delete Variable
Delete a variable entry.
import airflow_client.client from airflow_client.client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = airflow_client.client.Configuration( host = "http://localhost" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. configuration.access_token = os.environ["ACCESS_TOKEN"] # Configure Bearer authorization: HTTPBearer configuration = airflow_client.client.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.VariableApi(api_client) variable_key = 'variable_key_example' # str | try: # Delete Variable api_instance.delete_variable(variable_key) except Exception as e: print("Exception when calling VariableApi->delete_variable: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| variable_key | str |
void (empty response body)
OAuth2PasswordBearer, HTTPBearer
| Status code | Description | Response headers |
|---|---|---|
| 204 | Successful Response | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableResponse get_variable(variable_key)
Get Variable
Get a variable entry.
import airflow_client.client from airflow_client.client.models.variable_response import VariableResponse from airflow_client.client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = airflow_client.client.Configuration( host = "http://localhost" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. configuration.access_token = os.environ["ACCESS_TOKEN"] # Configure Bearer authorization: HTTPBearer configuration = airflow_client.client.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.VariableApi(api_client) variable_key = 'variable_key_example' # str | try: # Get Variable api_response = api_instance.get_variable(variable_key) print("The response of VariableApi->get_variable:\n") pprint(api_response) except Exception as e: print("Exception when calling VariableApi->get_variable: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| variable_key | str |
OAuth2PasswordBearer, HTTPBearer
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableCollectionResponse get_variables(limit=limit, offset=offset, order_by=order_by, variable_key_pattern=variable_key_pattern)
Get Variables
Get all Variables entries.
import airflow_client.client from airflow_client.client.models.variable_collection_response import VariableCollectionResponse from airflow_client.client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = airflow_client.client.Configuration( host = "http://localhost" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. configuration.access_token = os.environ["ACCESS_TOKEN"] # Configure Bearer authorization: HTTPBearer configuration = airflow_client.client.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.VariableApi(api_client) limit = 50 # int | (optional) (default to 50) offset = 0 # int | (optional) (default to 0) order_by = [id] # List[str] | (optional) (default to [id]) variable_key_pattern = 'variable_key_pattern_example' # str | SQL LIKE expression — use `%` / `_` wildcards (e.g. `%customer_%`). Regular expressions are **not** supported. (optional) try: # Get Variables api_response = api_instance.get_variables(limit=limit, offset=offset, order_by=order_by, variable_key_pattern=variable_key_pattern) print("The response of VariableApi->get_variables:\n") pprint(api_response) except Exception as e: print("Exception when calling VariableApi->get_variables: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int | [optional] [default to 50] | |
| offset | int | [optional] [default to 0] | |
| order_by | List[str] | [optional] [default to [id]] | |
| variable_key_pattern | str | SQL LIKE expression — use `%` / `` wildcards (e.g. `%customer%`). Regular expressions are not supported. | [optional] |
OAuth2PasswordBearer, HTTPBearer
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableResponse patch_variable(variable_key, variable_body, update_mask=update_mask)
Patch Variable
Update a variable by key.
import airflow_client.client from airflow_client.client.models.variable_body import VariableBody from airflow_client.client.models.variable_response import VariableResponse from airflow_client.client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = airflow_client.client.Configuration( host = "http://localhost" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. configuration.access_token = os.environ["ACCESS_TOKEN"] # Configure Bearer authorization: HTTPBearer configuration = airflow_client.client.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.VariableApi(api_client) variable_key = 'variable_key_example' # str | variable_body = airflow_client.client.VariableBody() # VariableBody | update_mask = ['update_mask_example'] # List[str] | (optional) try: # Patch Variable api_response = api_instance.patch_variable(variable_key, variable_body, update_mask=update_mask) print("The response of VariableApi->patch_variable:\n") pprint(api_response) except Exception as e: print("Exception when calling VariableApi->patch_variable: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| variable_key | str | ||
| variable_body | VariableBody | ||
| update_mask | List[str] | [optional] |
OAuth2PasswordBearer, HTTPBearer
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successful Response | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableResponse post_variable(variable_body)
Post Variable
Create a variable.
import airflow_client.client from airflow_client.client.models.variable_body import VariableBody from airflow_client.client.models.variable_response import VariableResponse from airflow_client.client.rest import ApiException from pprint import pprint # Defining the host is optional and defaults to http://localhost # See configuration.py for a list of all supported configuration parameters. configuration = airflow_client.client.Configuration( host = "http://localhost" ) # The client must configure the authentication and authorization parameters # in accordance with the API server security policy. # Examples for each auth method are provided below, use the example that # satisfies your auth use case. configuration.access_token = os.environ["ACCESS_TOKEN"] # Configure Bearer authorization: HTTPBearer configuration = airflow_client.client.Configuration( access_token = os.environ["BEARER_TOKEN"] ) # Enter a context with an instance of the API client with airflow_client.client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = airflow_client.client.VariableApi(api_client) variable_body = airflow_client.client.VariableBody() # VariableBody | try: # Post Variable api_response = api_instance.post_variable(variable_body) print("The response of VariableApi->post_variable:\n") pprint(api_response) except Exception as e: print("Exception when calling VariableApi->post_variable: %s\n" % e)
| Name | Type | Description | Notes |
|---|---|---|---|
| variable_body | VariableBody |
OAuth2PasswordBearer, HTTPBearer
| Status code | Description | Response headers |
|---|---|---|
| 201 | Successful Response | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 409 | Conflict | - |
| 422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]