Class: Stigg::Resources::V1::Events::DataExport

Inherits:
Object
  • Object
show all
Defined in:
lib/stigg/resources/v1/events/data_export.rb,
lib/stigg/resources/v1/events/data_export/destinations.rb

Defined Under Namespace

Classes: Destinations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ DataExport

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DataExport.

Parameters:



113
114
115
116
# File 'lib/stigg/resources/v1/events/data_export.rb', line 113

def initialize(client:)
  @client = client
  @destinations = Stigg::Resources::V1::Events::DataExport::Destinations.new(client: client)
end

Instance Attribute Details

#destinationsStigg::Resources::V1::Events::DataExport::Destinations (readonly)



9
10
11
# File 'lib/stigg/resources/v1/events/data_export.rb', line 9

def destinations
  @destinations
end

Instance Method Details

#list_models(x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExportListModelsResponse

Some parameter documentations has been truncated, see Models::V1::Events::DataExportListModelsParams for more details.

List the catalog of data-export models the customer can opt into when connecting a destination.

Parameters:

  • x_account_id (String)

    Account ID — optional when authenticating with a user JWT (Bearer token); falls

  • x_environment_id (String)

    Environment ID — required when authenticating with a user JWT (Bearer token) on

  • request_options (Stigg::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/stigg/resources/v1/events/data_export.rb', line 28

def list_models(params = {})
  parsed, options = Stigg::V1::Events::DataExportListModelsParams.dump_request(params)
  @client.request(
    method: :get,
    path: "api/v1/data-export/models",
    headers: parsed.transform_keys(
      x_account_id: "x-account-id",
      x_environment_id: "x-environment-id"
    ),
    model: Stigg::Models::V1::Events::DataExportListModelsResponse,
    options: options
  )
end

#mint_scoped_token(application_origin:, destination_type: nil, enabled_models: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExportMintScopedTokenResponse

Some parameter documentations has been truncated, see Models::V1::Events::DataExportMintScopedTokenParams for more details.

Mint a scoped JWT for the FE embedded SDK. Lazy-creates the DATA_EXPORT integration if needed.

Parameters:

  • application_origin (String)

    Body param: FE origin the resulting JWT is bound to (provider-side anti-fraud)

  • destination_type (String)

    Body param: Pin the token to a specific warehouse connect flow

  • enabled_models (Array<String>)

    Body param

  • x_account_id (String)

    Header param: Account ID — optional when authenticating with a user JWT (Bearer

  • x_environment_id (String)

    Header param: Environment ID — required when authenticating with a user JWT (Bea

  • request_options (Stigg::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/stigg/resources/v1/events/data_export.rb', line 65

def mint_scoped_token(params)
  parsed, options = Stigg::V1::Events::DataExportMintScopedTokenParams.dump_request(params)
  header_params = {x_account_id: "x-account-id", x_environment_id: "x-environment-id"}
  @client.request(
    method: :post,
    path: "api/v1/data-export/scoped-token",
    headers: parsed.slice(*header_params.keys).transform_keys(header_params),
    body: parsed.except(*header_params.keys),
    model: Stigg::Models::V1::Events::DataExportMintScopedTokenResponse,
    options: options
  )
end

#trigger_sync(destination_id: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExportTriggerSyncResponse

Some parameter documentations has been truncated, see Models::V1::Events::DataExportTriggerSyncParams for more details.

Trigger a sync for one destination or all destinations under the provider entity.

Parameters:

  • destination_id (String)

    Body param: Provider destination ID to sync. Omit to sync all destinations.

  • x_account_id (String)

    Header param: Account ID — optional when authenticating with a user JWT (Bearer

  • x_environment_id (String)

    Header param: Environment ID — required when authenticating with a user JWT (Bea

  • request_options (Stigg::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/stigg/resources/v1/events/data_export.rb', line 97

def trigger_sync(params = {})
  parsed, options = Stigg::V1::Events::DataExportTriggerSyncParams.dump_request(params)
  header_params = {x_account_id: "x-account-id", x_environment_id: "x-environment-id"}
  @client.request(
    method: :post,
    path: "api/v1/data-export/sync",
    headers: parsed.slice(*header_params.keys).transform_keys(header_params),
    body: parsed.except(*header_params.keys),
    model: Stigg::Models::V1::Events::DataExportTriggerSyncResponse,
    options: options
  )
end