Skip to content

Latest commit

 

History

History
431 lines (274 loc) · 12.2 KB

SettingsAPI.md

File metadata and controls

431 lines (274 loc) · 12.2 KB

\SettingsAPI

All URIs are relative to https://rudder.example.local/rudder/api/latest

Method HTTP request Description
GetAllSettings Get /settings List all settings
GetAllowedNetworks Get /settings/allowed_networks/{nodeId} Get allowed networks for a policy server
GetSetting Get /settings/{settingId} Get the value of a setting
ModifyAllowedNetworks Post /settings/allowed_networks/{nodeId}/diff Modify allowed networks for a policy server
ModifySetting Post /settings/{settingId} Set the value of a setting
SetAllowedNetworks Post /settings/allowed_networks/{nodeId} Set allowed networks for a policy server

GetAllSettings

GetAllSettings200Response GetAllSettings(ctx).Execute()

List all settings

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/juhnny5/rudder-golang"
)

func main() {

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SettingsAPI.GetAllSettings(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SettingsAPI.GetAllSettings``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetAllSettings`: GetAllSettings200Response
	fmt.Fprintf(os.Stdout, "Response from `SettingsAPI.GetAllSettings`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetAllSettingsRequest struct via the builder pattern

Return type

GetAllSettings200Response

Authorization

API-Tokens

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAllowedNetworks

GetAllowedNetworks200Response GetAllowedNetworks(ctx, nodeId).Execute()

Get allowed networks for a policy server

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/juhnny5/rudder-golang"
)

func main() {
	nodeId := "9a1773c9-0889-40b6-be89-f6504443ac1b" // string | Policy server ID for which you want to manage allowed networks.

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SettingsAPI.GetAllowedNetworks(context.Background(), nodeId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SettingsAPI.GetAllowedNetworks``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetAllowedNetworks`: GetAllowedNetworks200Response
	fmt.Fprintf(os.Stdout, "Response from `SettingsAPI.GetAllowedNetworks`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
nodeId string Policy server ID for which you want to manage allowed networks.

Other Parameters

Other parameters are passed through a pointer to a apiGetAllowedNetworksRequest struct via the builder pattern

Name Type Description Notes

Return type

GetAllowedNetworks200Response

Authorization

API-Tokens

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetSetting

GetSetting200Response GetSetting(ctx, settingId).Execute()

Get the value of a setting

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/juhnny5/rudder-golang"
)

func main() {
	settingId := "global_policy_mode" // string | Id of the setting to set

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SettingsAPI.GetSetting(context.Background(), settingId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SettingsAPI.GetSetting``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetSetting`: GetSetting200Response
	fmt.Fprintf(os.Stdout, "Response from `SettingsAPI.GetSetting`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
settingId string Id of the setting to set

Other Parameters

Other parameters are passed through a pointer to a apiGetSettingRequest struct via the builder pattern

Name Type Description Notes

Return type

GetSetting200Response

Authorization

API-Tokens

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ModifyAllowedNetworks

ModifyAllowedNetworks200Response ModifyAllowedNetworks(ctx, nodeId).ModifyAllowedNetworksRequest(modifyAllowedNetworksRequest).Execute()

Modify allowed networks for a policy server

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/juhnny5/rudder-golang"
)

func main() {
	nodeId := "9a1773c9-0889-40b6-be89-f6504443ac1b" // string | Policy server ID for which you want to manage allowed networks.
	modifyAllowedNetworksRequest := *openapiclient.NewModifyAllowedNetworksRequest() // ModifyAllowedNetworksRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SettingsAPI.ModifyAllowedNetworks(context.Background(), nodeId).ModifyAllowedNetworksRequest(modifyAllowedNetworksRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SettingsAPI.ModifyAllowedNetworks``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ModifyAllowedNetworks`: ModifyAllowedNetworks200Response
	fmt.Fprintf(os.Stdout, "Response from `SettingsAPI.ModifyAllowedNetworks`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
nodeId string Policy server ID for which you want to manage allowed networks.

Other Parameters

Other parameters are passed through a pointer to a apiModifyAllowedNetworksRequest struct via the builder pattern

Name Type Description Notes

modifyAllowedNetworksRequest | ModifyAllowedNetworksRequest | |

Return type

ModifyAllowedNetworks200Response

Authorization

API-Tokens

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ModifySetting

ModifySetting200Response ModifySetting(ctx, settingId).ModifySettingRequest(modifySettingRequest).Execute()

Set the value of a setting

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/juhnny5/rudder-golang"
)

func main() {
	settingId := "global_policy_mode" // string | Id of the setting to set
	modifySettingRequest := *openapiclient.NewModifySettingRequest() // ModifySettingRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SettingsAPI.ModifySetting(context.Background(), settingId).ModifySettingRequest(modifySettingRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SettingsAPI.ModifySetting``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ModifySetting`: ModifySetting200Response
	fmt.Fprintf(os.Stdout, "Response from `SettingsAPI.ModifySetting`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
settingId string Id of the setting to set

Other Parameters

Other parameters are passed through a pointer to a apiModifySettingRequest struct via the builder pattern

Name Type Description Notes

modifySettingRequest | ModifySettingRequest | |

Return type

ModifySetting200Response

Authorization

API-Tokens

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

SetAllowedNetworks

SetAllowedNetworks200Response SetAllowedNetworks(ctx, nodeId).SetAllowedNetworksRequest(setAllowedNetworksRequest).Execute()

Set allowed networks for a policy server

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/juhnny5/rudder-golang"
)

func main() {
	nodeId := "9a1773c9-0889-40b6-be89-f6504443ac1b" // string | Policy server ID for which you want to manage allowed networks.
	setAllowedNetworksRequest := *openapiclient.NewSetAllowedNetworksRequest() // SetAllowedNetworksRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SettingsAPI.SetAllowedNetworks(context.Background(), nodeId).SetAllowedNetworksRequest(setAllowedNetworksRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SettingsAPI.SetAllowedNetworks``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SetAllowedNetworks`: SetAllowedNetworks200Response
	fmt.Fprintf(os.Stdout, "Response from `SettingsAPI.SetAllowedNetworks`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
nodeId string Policy server ID for which you want to manage allowed networks.

Other Parameters

Other parameters are passed through a pointer to a apiSetAllowedNetworksRequest struct via the builder pattern

Name Type Description Notes

setAllowedNetworksRequest | SetAllowedNetworksRequest | |

Return type

SetAllowedNetworks200Response

Authorization

API-Tokens

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]