|
5 | 5 |
|
6 | 6 | 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.
|
7 | 7 |
|
8 |
| - The version of the OpenAPI document: 59.6.1 |
| 8 | + The version of the OpenAPI document: 59.7.0 |
9 | 9 |
|
10 | 10 | Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11 | 11 |
|
|
30 | 30 | from segment_public_api.models.create_audience_beta_input import CreateAudienceBetaInput
|
31 | 31 | from segment_public_api.models.create_audience_preview200_response import CreateAudiencePreview200Response
|
32 | 32 | 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 |
33 | 34 | from segment_public_api.models.get_audience200_response import GetAudience200Response
|
34 | 35 | from segment_public_api.models.get_audience_preview200_response import GetAudiencePreview200Response
|
35 | 36 | 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),
|
548 | 549 | collection_formats=_collection_formats,
|
549 | 550 | _request_auth=_params.get('_request_auth'))
|
550 | 551 |
|
| 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 | + |
551 | 703 | @validate_arguments
|
552 | 704 | 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
|
553 | 705 | """Get Audience # noqa: E501
|
|
0 commit comments