Skip to content

Commit 9f91e22

Browse files
author
APIs and Common Services team
committed
Automated SDK update
This updates the SDK from internal repo commit segmentio/public-api@32694df2.
1 parent 851a35d commit 9f91e22

File tree

691 files changed

+1151
-693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

691 files changed

+1151
-693
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ See the next sections for more information on how to use the Segment Public API.
1111

1212
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
1313

14-
- API version: 59.6.1
15-
- Package version: 59.6.1
14+
- API version: 59.7.0
15+
- Package version: 59.7.0
1616
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1717

1818
For more information, please visit [https://docs.segmentapis.com](https://docs.segmentapis.com)

docs/AudiencesApi.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Method | HTTP request | Description
77
[**add_audience_schedule_to_audience**](AudiencesApi.md#add_audience_schedule_to_audience) | **POST** /spaces/{spaceId}/audiences/{id}/schedules | Add Audience Schedule to Audience
88
[**create_audience**](AudiencesApi.md#create_audience) | **POST** /spaces/{spaceId}/audiences | Create Audience
99
[**create_audience_preview**](AudiencesApi.md#create_audience_preview) | **POST** /spaces/{spaceId}/audiences/previews | Create Audience Preview
10+
[**force_execute_audience_run**](AudiencesApi.md#force_execute_audience_run) | **POST** /spaces/{spaceId}/audiences/{audienceId}/runs | Force Execute Audience Run
1011
[**get_audience**](AudiencesApi.md#get_audience) | **GET** /spaces/{spaceId}/audiences/{id} | Get Audience
1112
[**get_audience_preview**](AudiencesApi.md#get_audience_preview) | **GET** /spaces/{spaceId}/audiences/previews/{id} | Get Audience Preview
1213
[**get_audience_schedule_from_space_and_audience**](AudiencesApi.md#get_audience_schedule_from_space_and_audience) | **GET** /spaces/{spaceId}/audiences/{id}/schedules/{scheduleId} | Get Audience Schedule from Space And Audience
@@ -249,6 +250,81 @@ Name | Type | Description | Notes
249250
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
250251

251252

253+
## Operation: force_execute_audience_run
254+
255+
> ForceExecuteAudienceRun200Response force_execute_audience_run(space_id, audience_id)
256+
257+
Force Execute Audience Run
258+
259+
The ability to force execute a run for an Audience is limited to Linked Audiences (audienceType = `LINKED`). • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to [email protected]. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Run Forced` event in the [audit trail](/tag/Audit-Trail).
260+
261+
### Example
262+
263+
* Bearer Authentication (token):
264+
```python
265+
import time
266+
import os
267+
import segment_public_api
268+
from segment_public_api.models.force_execute_audience_run200_response import ForceExecuteAudienceRun200Response
269+
from segment_public_api.rest import ApiException
270+
from pprint import pprint
271+
272+
273+
274+
# Configure Bearer authorization: token
275+
configuration = segment_public_api.Configuration(
276+
access_token = os.environ["BEARER_TOKEN"]
277+
)
278+
279+
# Enter a context with an instance of the API client
280+
with segment_public_api.ApiClient(configuration) as api_client:
281+
# Create an instance of the API class
282+
api_instance = segment_public_api.AudiencesApi(api_client)
283+
space_id = '9aQ1Lj62S4bomZKLF4DPqW' # str |
284+
audience_id = 'aud_0ujsszwN8NRY24YaXiTIE2VWDTS' # str |
285+
286+
try:
287+
# Force Execute Audience Run
288+
api_response = api_instance.force_execute_audience_run(space_id, audience_id)
289+
print("The response of AudiencesApi->force_execute_audience_run:\n")
290+
pprint(api_response)
291+
except Exception as e:
292+
print("Exception when calling AudiencesApi->force_execute_audience_run: %s\n" % e)
293+
```
294+
295+
296+
297+
### Parameters
298+
299+
Name | Type | Description | Notes
300+
------------- | ------------- | ------------- | -------------
301+
**space_id** | **str**| |
302+
**audience_id** | **str**| |
303+
304+
### Return type
305+
306+
[**ForceExecuteAudienceRun200Response**](ForceExecuteAudienceRun200Response.md)
307+
308+
### Authorization
309+
310+
[token](../README.md#token)
311+
312+
### HTTP request headers
313+
314+
- **Content-Type**: Not defined
315+
- **Accept**: application/vnd.segment.v1alpha+json, application/json
316+
317+
### HTTP response details
318+
| Status code | Description | Response headers |
319+
|-------------|-------------|------------------|
320+
**200** | OK | - |
321+
**404** | Resource not found | - |
322+
**422** | Validation failure | - |
323+
**429** | Too many requests | - |
324+
325+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
326+
327+
252328
## Operation: get_audience
253329

254330
> GetAudience200Response get_audience(space_id, id, include=include)

segment_public_api/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
88
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
99
10-
The version of the OpenAPI document: 59.6.1
10+
The version of the OpenAPI document: 59.7.0
1111
1212
Generated by OpenAPI Generator (https://openapi-generator.tech)
1313
1414
Do not edit the class manually.
1515
""" # noqa: E501
1616

1717

18-
__version__ = "59.6.1"
18+
__version__ = "59.7.0"
1919

2020
# import apis into sdk package
2121
from segment_public_api.api.api_calls_api import APICallsApi
@@ -108,6 +108,7 @@
108108
from segment_public_api.models.audience_preview_identifier import AudiencePreviewIdentifier
109109
from segment_public_api.models.audience_preview_profile_result import AudiencePreviewProfileResult
110110
from segment_public_api.models.audience_preview_result import AudiencePreviewResult
111+
from segment_public_api.models.audience_run_info import AudienceRunInfo
111112
from segment_public_api.models.audience_schedule import AudienceSchedule
112113
from segment_public_api.models.audience_size import AudienceSize
113114
from segment_public_api.models.audience_summary import AudienceSummary
@@ -291,6 +292,8 @@
291292
from segment_public_api.models.event_source_v1 import EventSourceV1
292293
from segment_public_api.models.fql_defined_property_v1 import FQLDefinedPropertyV1
293294
from segment_public_api.models.filter import Filter
295+
from segment_public_api.models.force_execute_audience_run200_response import ForceExecuteAudienceRun200Response
296+
from segment_public_api.models.force_execute_audience_run_alpha_output import ForceExecuteAudienceRunAlphaOutput
294297
from segment_public_api.models.function_deployment import FunctionDeployment
295298
from segment_public_api.models.function_setting_v1 import FunctionSettingV1
296299
from segment_public_api.models.function_v1 import FunctionV1

segment_public_api/api/activations_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 59.6.1
8+
The version of the OpenAPI document: 59.7.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/api_calls_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 59.6.1
8+
The version of the OpenAPI document: 59.7.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/audiences_api.py

Lines changed: 153 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 59.6.1
8+
The version of the OpenAPI document: 59.7.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111
@@ -30,6 +30,7 @@
3030
from segment_public_api.models.create_audience_beta_input import CreateAudienceBetaInput
3131
from segment_public_api.models.create_audience_preview200_response import CreateAudiencePreview200Response
3232
from segment_public_api.models.create_audience_preview_beta_input import CreateAudiencePreviewBetaInput
33+
from segment_public_api.models.force_execute_audience_run200_response import ForceExecuteAudienceRun200Response
3334
from segment_public_api.models.get_audience200_response import GetAudience200Response
3435
from segment_public_api.models.get_audience_preview200_response import GetAudiencePreview200Response
3536
from segment_public_api.models.get_audience_schedule_from_space_and_audience200_response import GetAudienceScheduleFromSpaceAndAudience200Response
@@ -548,6 +549,157 @@ def create_audience_preview_with_http_info(self, space_id : constr(strict=True),
548549
collection_formats=_collection_formats,
549550
_request_auth=_params.get('_request_auth'))
550551

552+
@validate_arguments
553+
def force_execute_audience_run(self, space_id : constr(strict=True), audience_id : constr(strict=True), **kwargs) -> ForceExecuteAudienceRun200Response: # noqa: E501
554+
"""Force Execute Audience Run # noqa: E501
555+
556+
The ability to force execute a run for an Audience is limited to Linked Audiences (audienceType = `LINKED`). • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to [email protected]. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Run Forced` event in the [audit trail](/tag/Audit-Trail). # noqa: E501
557+
This method makes a synchronous HTTP request by default. To make an
558+
asynchronous HTTP request, please pass async_req=True
559+
560+
>>> thread = api.force_execute_audience_run(space_id, audience_id, async_req=True)
561+
>>> result = thread.get()
562+
563+
:param space_id: (required)
564+
:type space_id: str
565+
:param audience_id: (required)
566+
:type audience_id: str
567+
:param async_req: Whether to execute the request asynchronously.
568+
:type async_req: bool, optional
569+
:param _request_timeout: timeout setting for this request.
570+
If one number provided, it will be total request
571+
timeout. It can also be a pair (tuple) of
572+
(connection, read) timeouts.
573+
:return: Returns the result object.
574+
If the method is called asynchronously,
575+
returns the request thread.
576+
:rtype: ForceExecuteAudienceRun200Response
577+
"""
578+
kwargs['_return_http_data_only'] = True
579+
if '_preload_content' in kwargs:
580+
message = "Error! Please call the force_execute_audience_run_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
581+
raise ValueError(message)
582+
return self.force_execute_audience_run_with_http_info(space_id, audience_id, **kwargs) # noqa: E501
583+
584+
@validate_arguments
585+
def force_execute_audience_run_with_http_info(self, space_id : constr(strict=True), audience_id : constr(strict=True), **kwargs) -> ApiResponse: # noqa: E501
586+
"""Force Execute Audience Run # noqa: E501
587+
588+
The ability to force execute a run for an Audience is limited to Linked Audiences (audienceType = `LINKED`). • This endpoint is in **Alpha** testing. Please submit any feedback by sending an email to [email protected]. • In order to successfully call this endpoint, the specified Workspace needs to have the Audience feature enabled. Please reach out to your customer success manager for more information. • When called, this endpoint may generate the `Audience Run Forced` event in the [audit trail](/tag/Audit-Trail). # noqa: E501
589+
This method makes a synchronous HTTP request by default. To make an
590+
asynchronous HTTP request, please pass async_req=True
591+
592+
>>> thread = api.force_execute_audience_run_with_http_info(space_id, audience_id, async_req=True)
593+
>>> result = thread.get()
594+
595+
:param space_id: (required)
596+
:type space_id: str
597+
:param audience_id: (required)
598+
:type audience_id: str
599+
:param async_req: Whether to execute the request asynchronously.
600+
:type async_req: bool, optional
601+
:param _preload_content: if False, the ApiResponse.data will
602+
be set to none and raw_data will store the
603+
HTTP response body without reading/decoding.
604+
Default is True.
605+
:type _preload_content: bool, optional
606+
:param _return_http_data_only: response data instead of ApiResponse
607+
object with status code, headers, etc
608+
:type _return_http_data_only: bool, optional
609+
:param _request_timeout: timeout setting for this request. If one
610+
number provided, it will be total request
611+
timeout. It can also be a pair (tuple) of
612+
(connection, read) timeouts.
613+
:param _request_auth: set to override the auth_settings for an a single
614+
request; this effectively ignores the authentication
615+
in the spec for a single request.
616+
:type _request_auth: dict, optional
617+
:type _content_type: string, optional: force content-type for the request
618+
:return: Returns the result object.
619+
If the method is called asynchronously,
620+
returns the request thread.
621+
:rtype: tuple(ForceExecuteAudienceRun200Response, status_code(int), headers(HTTPHeaderDict))
622+
"""
623+
624+
_params = locals()
625+
626+
_all_params = [
627+
'space_id',
628+
'audience_id'
629+
]
630+
_all_params.extend(
631+
[
632+
'async_req',
633+
'_return_http_data_only',
634+
'_preload_content',
635+
'_request_timeout',
636+
'_request_auth',
637+
'_content_type',
638+
'_headers'
639+
]
640+
)
641+
642+
# validate the arguments
643+
for _key, _val in _params['kwargs'].items():
644+
if _key not in _all_params:
645+
raise ApiTypeError(
646+
"Got an unexpected keyword argument '%s'"
647+
" to method force_execute_audience_run" % _key
648+
)
649+
_params[_key] = _val
650+
del _params['kwargs']
651+
652+
_collection_formats = {}
653+
654+
# process the path parameters
655+
_path_params = {}
656+
if _params['space_id']:
657+
_path_params['spaceId'] = _params['space_id']
658+
659+
if _params['audience_id']:
660+
_path_params['audienceId'] = _params['audience_id']
661+
662+
663+
# process the query parameters
664+
_query_params = []
665+
# process the header parameters
666+
_header_params = dict(_params.get('_headers', {}))
667+
# process the form parameters
668+
_form_params = []
669+
_files = {}
670+
# process the body parameter
671+
_body_params = None
672+
# set the HTTP header `Accept`
673+
_header_params['Accept'] = self.api_client.select_header_accept(
674+
['application/vnd.segment.v1alpha+json', 'application/json']) # noqa: E501
675+
676+
# authentication setting
677+
_auth_settings = ['token'] # noqa: E501
678+
679+
_response_types_map = {
680+
'200': "ForceExecuteAudienceRun200Response",
681+
'404': "RequestErrorEnvelope",
682+
'422': "RequestErrorEnvelope",
683+
'429': "RequestErrorEnvelope",
684+
}
685+
686+
return self.api_client.call_api(
687+
'/spaces/{spaceId}/audiences/{audienceId}/runs', 'POST',
688+
_path_params,
689+
_query_params,
690+
_header_params,
691+
body=_body_params,
692+
post_params=_form_params,
693+
files=_files,
694+
response_types_map=_response_types_map,
695+
auth_settings=_auth_settings,
696+
async_req=_params.get('async_req'),
697+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
698+
_preload_content=_params.get('_preload_content', True),
699+
_request_timeout=_params.get('_request_timeout'),
700+
collection_formats=_collection_formats,
701+
_request_auth=_params.get('_request_auth'))
702+
551703
@validate_arguments
552704
def get_audience(self, space_id : constr(strict=True), id : constr(strict=True), include : Annotated[Optional[StrictStr], Field(description="Additional resource to include, support schedules only. This parameter exists in alpha.")] = None, **kwargs) -> GetAudience200Response: # noqa: E501
553705
"""Get Audience # noqa: E501

segment_public_api/api/audit_trail_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 59.6.1
8+
The version of the OpenAPI document: 59.7.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

segment_public_api/api/catalog_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
77
8-
The version of the OpenAPI document: 59.6.1
8+
The version of the OpenAPI document: 59.7.0
99
1010
Generated by OpenAPI Generator (https://openapi-generator.tech)
1111

0 commit comments

Comments
 (0)