mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-10 12:27:47 +00:00
Update to go SDK docs: 15029001030
This commit is contained in:
@@ -55,25 +55,25 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
|
||||
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
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)
|
||||
//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)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -112,25 +112,25 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
|
||||
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
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)
|
||||
//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)
|
||||
}
|
||||
```
|
||||
|
||||
@@ -173,7 +173,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"encoding/json"
|
||||
"encoding/json"
|
||||
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
@@ -181,24 +181,23 @@ import (
|
||||
func main() {
|
||||
jsonpatchoperation := []byte(`[{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(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
var jsonPatchOperation []beta.JsonPatchOperation
|
||||
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
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)
|
||||
//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)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user