Files
developer.sailpoint.com/docs/tools/sdk/go/Reference/Beta/Methods/OrgConfigAPI.md
2025-05-13 11:12:04 -04:00

5.6 KiB

id, title, pagination_label, sidebar_label, sidebar_class_name, keywords, slug, tags
id title pagination_label sidebar_label sidebar_class_name keywords slug tags
beta-org-config OrgConfig OrgConfig OrgConfig gosdk
go
Golang
sdk
OrgConfig
BetaOrgConfig
/tools/sdk/go/beta/methods/org-config
SDK
Software Development Kit
OrgConfig
BetaOrgConfig

OrgConfigAPI

Use this API to implement organization configuration functionality. Administrators can use this functionality to manage organization settings, such as time zones.

All URIs are relative to https://sailpoint.api.identitynow.com/beta

Method HTTP request Description
get-org-config Get /org-config Get Org configuration settings
get-valid-time-zones Get /org-config/valid-time-zones Get list of time zones
patch-org-config Patch /org-config Patch an Org configuration property

get-org-config

Get Org configuration settings Get org configuration with only external (org admin) accessible properties for the current org.

API Spec

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

OrgConfig

HTTP request headers

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

Example

package main

import (
	"context"
	"fmt"
	"os"
   
    
	sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {

  

	configuration := sailpoint.NewDefaultConfiguration()
	apiClient := sailpoint.NewAPIClient(configuration)
    resp, r, err := apiClient.Beta.OrgConfigAPI.GetOrgConfig(context.Background()).Execute()
	//resp, r, err := apiClient.Beta.OrgConfigAPI.GetOrgConfig(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrgConfigAPI.GetOrgConfig``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetOrgConfig`: OrgConfig
	fmt.Fprintf(os.Stdout, "Response from `OrgConfigAPI.GetOrgConfig`: %v\n", resp)
}

[Back to top]

get-valid-time-zones

Get list of time zones Get a list of valid time zones that can be set in org configurations.

API Spec

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]string

HTTP request headers

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

Example

package main

import (
	"context"
	"fmt"
	"os"
   
    
	sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {

  

	configuration := sailpoint.NewDefaultConfiguration()
	apiClient := sailpoint.NewAPIClient(configuration)
    resp, r, err := apiClient.Beta.OrgConfigAPI.GetValidTimeZones(context.Background()).Execute()
	//resp, r, err := apiClient.Beta.OrgConfigAPI.GetValidTimeZones(context.Background()).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrgConfigAPI.GetValidTimeZones``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetValidTimeZones`: []string
	fmt.Fprintf(os.Stdout, "Response from `OrgConfigAPI.GetValidTimeZones`: %v\n", resp)
}

[Back to top]

patch-org-config

Patch an Org configuration property Patch configuration of the current org using http://jsonpatch.com/ syntax. Commonly used for changing the time zone of an org.

API Spec

Path Parameters

Other Parameters

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

Name Type Description Notes
jsonPatchOperation []JsonPatchOperation A list of schema attribute update operations according to the JSON Patch standard.

Return type

OrgConfig

HTTP request headers

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

Example

package main

import (
	"context"
	"fmt"
	"os"
    "encoding/json"
    beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
	sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
    jsonPatchOperation := fmt.Sprintf(`[{op=replace, path=/timeZone, value=America/Toronto}]`) // []JsonPatchOperation | A list of schema attribute update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.

  
   var jsonPatchOperation beta.JsonPatchOperation
   if err := json.Unmarshal(data, &jsonPatchOperation); err != nil {
    fmt.Println("Error:", err)
    return
   }
  

	configuration := sailpoint.NewDefaultConfiguration()
	apiClient := sailpoint.NewAPIClient(configuration)
    resp, r, err := apiClient.Beta.OrgConfigAPI.PatchOrgConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
	//resp, r, err := apiClient.Beta.OrgConfigAPI.PatchOrgConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrgConfigAPI.PatchOrgConfig``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PatchOrgConfig`: OrgConfig
	fmt.Fprintf(os.Stdout, "Response from `OrgConfigAPI.PatchOrgConfig`: %v\n", resp)
}

[Back to top]