mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-08 20:37:46 +00:00
update go docs and examples
This commit is contained in:
@@ -30,6 +30,9 @@ Method | HTTP request | Description
|
||||
|
||||
|
||||
## get-public-identity-config
|
||||
:::caution deprecated
|
||||
This endpoint has been deprecated and may be replaced or removed in future versions of the API.
|
||||
:::
|
||||
Get Public Identity Config
|
||||
This gets details of public identity config.
|
||||
|
||||
@@ -62,15 +65,19 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
|
||||
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.Beta.PublicIdentitiesConfigAPI.GetPublicIdentityConfig(context.Background()).Execute()
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.Beta.PublicIdentitiesConfigAPI.GetPublicIdentityConfig(context.Background()).Execute()
|
||||
//resp, r, err := apiClient.Beta.PublicIdentitiesConfigAPI.GetPublicIdentityConfig(context.Background()).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PublicIdentitiesConfigAPI.GetPublicIdentityConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
@@ -83,6 +90,9 @@ func main() {
|
||||
[[Back to top]](#)
|
||||
|
||||
## update-public-identity-config
|
||||
:::caution deprecated
|
||||
This endpoint has been deprecated and may be replaced or removed in future versions of the API.
|
||||
:::
|
||||
Update Public Identity Config
|
||||
This updates the details of public identity config.
|
||||
|
||||
@@ -119,12 +129,13 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
|
||||
openapiclient "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
"encoding/json"
|
||||
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
|
||||
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
||||
)
|
||||
|
||||
func main() {
|
||||
publicIdentityConfig := fmt.Sprintf(`{
|
||||
data := []byte(`{
|
||||
"modified" : "2018-06-25T20:22:28.104Z",
|
||||
"attributes" : [ {
|
||||
"name" : "Country",
|
||||
@@ -138,11 +149,20 @@ func main() {
|
||||
"id" : "2c9180a46faadee4016fb4e018c20639",
|
||||
"type" : "IDENTITY"
|
||||
}
|
||||
}`) # PublicIdentityConfig |
|
||||
}`) // PublicIdentityConfig |
|
||||
|
||||
configuration := NewDefaultConfiguration()
|
||||
apiClient := NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.Beta.PublicIdentitiesConfigAPI.UpdatePublicIdentityConfig(context.Background()).PublicIdentityConfig(publicIdentityConfig).Execute()
|
||||
|
||||
var publicIdentityConfig beta.PublicIdentityConfig
|
||||
if err := json.Unmarshal(data, &publicIdentityConfig); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
configuration := sailpoint.NewDefaultConfiguration()
|
||||
apiClient := sailpoint.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.Beta.PublicIdentitiesConfigAPI.UpdatePublicIdentityConfig(context.Background()).PublicIdentityConfig(publicIdentityConfig).Execute()
|
||||
//resp, r, err := apiClient.Beta.PublicIdentitiesConfigAPI.UpdatePublicIdentityConfig(context.Background()).PublicIdentityConfig(publicIdentityConfig).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `PublicIdentitiesConfigAPI.UpdatePublicIdentityConfig``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
|
||||
Reference in New Issue
Block a user