mirror of
https://github.com/LukeHagar/developer.sailpoint.com.git
synced 2025-12-08 12:27:47 +00:00
15670 lines
811 KiB
YAML
15670 lines
811 KiB
YAML
- path: /access-profiles
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-profiles#create-access-profile
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
accessprofile := []byte(`{
|
|
"owner" : {
|
|
"name" : "support",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"entitlements" : [ {
|
|
"name" : "CN=entitlement.490efde5,OU=OrgCo,OU=ServiceDept,DC=HQAD,DC=local",
|
|
"id" : "2c91809773dee32014e13e122092014e",
|
|
"type" : "ENTITLEMENT"
|
|
}, {
|
|
"name" : "CN=entitlement.490efde5,OU=OrgCo,OU=ServiceDept,DC=HQAD,DC=local",
|
|
"id" : "2c91809773dee32014e13e122092014e",
|
|
"type" : "ENTITLEMENT"
|
|
} ],
|
|
"created" : "2021-03-01T22:32:58.104Z",
|
|
"description" : "Collection of entitlements to read/write the employee database",
|
|
"source" : {
|
|
"name" : "ODS-AD-SOURCE",
|
|
"id" : "2c91809773dee3610173fdb0b6061ef4",
|
|
"type" : "SOURCE"
|
|
},
|
|
"enabled" : true,
|
|
"revocationRequestConfig" : {
|
|
"approvalSchemes" : [ {
|
|
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
|
|
"approverType" : "GOVERNANCE_GROUP"
|
|
}, {
|
|
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
|
|
"approverType" : "GOVERNANCE_GROUP"
|
|
} ]
|
|
},
|
|
"segments" : [ "f7b1b8a3-5fed-4fd4-ad29-82014e137e19", "29cb6c06-1da8-43ea-8be4-b3125f248f2a" ],
|
|
"accessRequestConfig" : {
|
|
"commentsRequired" : true,
|
|
"reauthorizationRequired" : true,
|
|
"approvalSchemes" : [ {
|
|
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
|
|
"approverType" : "GOVERNANCE_GROUP"
|
|
}, {
|
|
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
|
|
"approverType" : "GOVERNANCE_GROUP"
|
|
} ],
|
|
"denialCommentsRequired" : true
|
|
},
|
|
"name" : "Employee-database-read-write",
|
|
"provisioningCriteria" : {
|
|
"children" : [ {
|
|
"children" : [ {
|
|
"children" : "children",
|
|
"attribute" : "email",
|
|
"operation" : "EQUALS",
|
|
"value" : "carlee.cert1c9f9b6fd@mailinator.com"
|
|
}, {
|
|
"children" : "children",
|
|
"attribute" : "email",
|
|
"operation" : "EQUALS",
|
|
"value" : "carlee.cert1c9f9b6fd@mailinator.com"
|
|
} ],
|
|
"attribute" : "email",
|
|
"operation" : "EQUALS",
|
|
"value" : "carlee.cert1c9f9b6fd@mailinator.com"
|
|
}, {
|
|
"children" : [ {
|
|
"children" : "children",
|
|
"attribute" : "email",
|
|
"operation" : "EQUALS",
|
|
"value" : "carlee.cert1c9f9b6fd@mailinator.com"
|
|
}, {
|
|
"children" : "children",
|
|
"attribute" : "email",
|
|
"operation" : "EQUALS",
|
|
"value" : "carlee.cert1c9f9b6fd@mailinator.com"
|
|
} ],
|
|
"attribute" : "email",
|
|
"operation" : "EQUALS",
|
|
"value" : "carlee.cert1c9f9b6fd@mailinator.com"
|
|
} ],
|
|
"attribute" : "email",
|
|
"operation" : "EQUALS",
|
|
"value" : "carlee.cert1c9f9b6fd@mailinator.com"
|
|
},
|
|
"modified" : "2021-03-02T20:22:28.104Z",
|
|
"id" : "2c91808a7190d06e01719938fcd20792",
|
|
"requestable" : true
|
|
}`) // AccessProfile |
|
|
|
|
|
|
var accessProfile v3.AccessProfile
|
|
if err := json.Unmarshal(accessprofile, &accessProfile); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessProfilesAPI.CreateAccessProfile(context.Background()).AccessProfile(accessProfile).Execute()
|
|
//resp, r, err := apiClient.V3.AccessProfilesAPI.CreateAccessProfile(context.Background()).AccessProfile(accessProfile).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessProfilesAPI.CreateAccessProfile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateAccessProfile`: AccessProfile
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessProfilesAPI.CreateAccessProfile`: %v\n", resp)
|
|
}
|
|
- path: /access-profiles/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-profiles#delete-access-profile
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808a7813090a017814121919ecca` // string | ID of the Access Profile to delete # string | ID of the Access Profile to delete
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.AccessProfilesAPI.DeleteAccessProfile(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.AccessProfilesAPI.DeleteAccessProfile(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessProfilesAPI.DeleteAccessProfile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /access-profiles/bulk-delete
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-profiles#delete-access-profiles-in-bulk
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
accessprofilebulkdeleterequest := []byte(`{
|
|
"accessProfileIds" : [ "2c9180847812e0b1017817051919ecca", "2c9180887812e0b201781e129f151816" ],
|
|
"bestEffortOnly" : true
|
|
}`) // AccessProfileBulkDeleteRequest |
|
|
|
|
|
|
var accessProfileBulkDeleteRequest v3.AccessProfileBulkDeleteRequest
|
|
if err := json.Unmarshal(accessprofilebulkdeleterequest, &accessProfileBulkDeleteRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessProfilesAPI.DeleteAccessProfilesInBulk(context.Background()).AccessProfileBulkDeleteRequest(accessProfileBulkDeleteRequest).Execute()
|
|
//resp, r, err := apiClient.V3.AccessProfilesAPI.DeleteAccessProfilesInBulk(context.Background()).AccessProfileBulkDeleteRequest(accessProfileBulkDeleteRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessProfilesAPI.DeleteAccessProfilesInBulk``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteAccessProfilesInBulk`: AccessProfileBulkDeleteResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessProfilesAPI.DeleteAccessProfilesInBulk`: %v\n", resp)
|
|
}
|
|
- path: /access-profiles/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-profiles#get-access-profile
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180837ca6693d017ca8d097500149` // string | ID of the Access Profile # string | ID of the Access Profile
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessProfilesAPI.GetAccessProfile(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.AccessProfilesAPI.GetAccessProfile(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessProfilesAPI.GetAccessProfile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAccessProfile`: AccessProfile
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessProfilesAPI.GetAccessProfile`: %v\n", resp)
|
|
}
|
|
- path: /access-profiles/{id}/entitlements
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-profiles#get-access-profile-entitlements
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808a7813090a017814121919ecca` // string | ID of the access profile containing the entitlements. # string | ID of the access profile containing the entitlements.
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `attribute eq "memberOf"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **attribute**: *eq, sw* **value**: *eq, sw* **created**: *gt, lt, ge, le* **modified**: *gt, lt, ge, le* **owner.id**: *eq, in* **source.id**: *eq, in* Filtering is not supported for access profiles and entitlements that have the '+' symbol in their names. (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **attribute**: *eq, sw* **value**: *eq, sw* **created**: *gt, lt, ge, le* **modified**: *gt, lt, ge, le* **owner.id**: *eq, in* **source.id**: *eq, in* Filtering is not supported for access profiles and entitlements that have the '+' symbol in their names. (optional)
|
|
sorters := `name,-modified` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, attribute, value, created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, attribute, value, created, modified** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessProfilesAPI.GetAccessProfileEntitlements(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.AccessProfilesAPI.GetAccessProfileEntitlements(context.Background(), id).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessProfilesAPI.GetAccessProfileEntitlements``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAccessProfileEntitlements`: []Entitlement
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessProfilesAPI.GetAccessProfileEntitlements`: %v\n", resp)
|
|
}
|
|
- path: /access-profiles
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-profiles#list-access-profiles
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
forSubadmin := `8c190e6787aa4ed9a90bd9d5344523fb` // string | Filters the returned list according to what is visible to the indicated ROLE_SUBADMIN or SOURCE_SUBADMIN identity. The value of the parameter is either an identity ID or the special value **me**, which is shorthand for the calling identity's ID. If you specify an identity that isn't a subadmin, the API returns a 400 Bad Request error. (optional) # string | Filters the returned list according to what is visible to the indicated ROLE_SUBADMIN or SOURCE_SUBADMIN identity. The value of the parameter is either an identity ID or the special value **me**, which is shorthand for the calling identity's ID. If you specify an identity that isn't a subadmin, the API returns a 400 Bad Request error. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `name eq "SailPoint Support"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **created**: *gt, ge, le* **modified**: *gt, lt, ge, le* **owner.id**: *eq, in* **requestable**: *eq* **source.id**: *eq, in* Supported composite operators are *and, or* Filtering is not supported for access profiles and entitlements that have the '+' symbol in their names. (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **created**: *gt, ge, le* **modified**: *gt, lt, ge, le* **owner.id**: *eq, in* **requestable**: *eq* **source.id**: *eq, in* Supported composite operators are *and, or* Filtering is not supported for access profiles and entitlements that have the '+' symbol in their names. (optional)
|
|
sorters := `name,-modified` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional)
|
|
forSegmentIds := `0b5c9f25-83c6-4762-9073-e38f7bb2ae26,2e8d8180-24bc-4d21-91c6-7affdb473b0d` // string | Filters access profiles to only those assigned to the segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error. (optional) # string | Filters access profiles to only those assigned to the segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error. (optional)
|
|
includeUnsegmented := false // bool | Indicates whether the response list should contain unsegmented access profiles. If `for-segment-ids` is absent or empty, specifying *include-unsegmented* as `false` results in an error. (optional) (default to true) # bool | Indicates whether the response list should contain unsegmented access profiles. If `for-segment-ids` is absent or empty, specifying *include-unsegmented* as `false` results in an error. (optional) (default to true)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessProfilesAPI.ListAccessProfiles(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.AccessProfilesAPI.ListAccessProfiles(context.Background()).ForSubadmin(forSubadmin).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).ForSegmentIds(forSegmentIds).IncludeUnsegmented(includeUnsegmented).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessProfilesAPI.ListAccessProfiles``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListAccessProfiles`: []AccessProfile
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessProfilesAPI.ListAccessProfiles`: %v\n", resp)
|
|
}
|
|
- path: /access-profiles/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-profiles#patch-access-profile
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808a7813090a017814121919ecca` // string | ID of the Access Profile to patch # string | ID of the Access Profile to patch
|
|
jsonpatchoperation := []byte(`[{op=add, path=/entitlements, value=[{id=2c9180857725c14301772a93bb77242d, type=ENTITLEMENT, name=AD User Group}]}]`) // []JsonPatchOperation |
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessProfilesAPI.PatchAccessProfile(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.AccessProfilesAPI.PatchAccessProfile(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessProfilesAPI.PatchAccessProfile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchAccessProfile`: AccessProfile
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessProfilesAPI.PatchAccessProfile`: %v\n", resp)
|
|
}
|
|
- path: /access-request-approvals/{approvalId}/approve
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-request-approvals#approve-access-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
approvalId := `2c91808b7294bea301729568c68c002e` // string | Approval ID. # string | Approval ID.
|
|
commentdto := []byte(`{
|
|
"created" : "2017-07-11T18:45:37.098Z",
|
|
"author" : {
|
|
"name" : "john.doe",
|
|
"id" : "2c9180847e25f377017e2ae8cae4650b",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"comment" : "This is a comment."
|
|
}`) // CommentDto | Reviewer's comment. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.ApproveAccessRequest(context.Background(), approvalId).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.ApproveAccessRequest(context.Background(), approvalId).CommentDto(commentDto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestApprovalsAPI.ApproveAccessRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ApproveAccessRequest`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestApprovalsAPI.ApproveAccessRequest`: %v\n", resp)
|
|
}
|
|
- path: /access-request-approvals/{approvalId}/forward
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-request-approvals#forward-access-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
approvalId := `2c91808b7294bea301729568c68c002e` // string | Approval ID. # string | Approval ID.
|
|
forwardapprovaldto := []byte(`{
|
|
"newOwnerId" : "2c91808568c529c60168cca6f90c1314",
|
|
"comment" : "2c91808568c529c60168cca6f90c1313"
|
|
}`) // ForwardApprovalDto | Information about the forwarded approval.
|
|
|
|
|
|
var forwardApprovalDto v3.ForwardApprovalDto
|
|
if err := json.Unmarshal(forwardapprovaldto, &forwardApprovalDto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.ForwardAccessRequest(context.Background(), approvalId).ForwardApprovalDto(forwardApprovalDto).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.ForwardAccessRequest(context.Background(), approvalId).ForwardApprovalDto(forwardApprovalDto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestApprovalsAPI.ForwardAccessRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ForwardAccessRequest`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestApprovalsAPI.ForwardAccessRequest`: %v\n", resp)
|
|
}
|
|
- path: /access-request-approvals/approval-summary
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-request-approvals#get-access-request-approval-summary
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
ownerId := `2c91808568c529c60168cca6f90c1313` // string | The ID of the owner or approver identity of the approvals. If present, the value returns approval summary for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN user can also fetch all the approvals in the org, when owner-id is not used. * Non ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional) # string | The ID of the owner or approver identity of the approvals. If present, the value returns approval summary for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN user can also fetch all the approvals in the org, when owner-id is not used. * Non ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional)
|
|
fromDate := `from-date=2020-03-19T19:59:11Z` // string | This is the date and time the results will be shown from. It must be in a valid ISO-8601 format. (optional) # string | This is the date and time the results will be shown from. It must be in a valid ISO-8601 format. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.GetAccessRequestApprovalSummary(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.GetAccessRequestApprovalSummary(context.Background()).OwnerId(ownerId).FromDate(fromDate).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestApprovalsAPI.GetAccessRequestApprovalSummary``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAccessRequestApprovalSummary`: ApprovalSummary
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestApprovalsAPI.GetAccessRequestApprovalSummary`: %v\n", resp)
|
|
}
|
|
- path: /access-request-approvals/completed
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-request-approvals#list-completed-approvals
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
ownerId := `2c91808568c529c60168cca6f90c1313` // string | If present, the value returns only completed approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional) # string | If present, the value returns only completed approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `id eq "2c91808568c529c60168cca6f90c1313"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **requestedFor.id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **modified**: *gt, lt, ge, le, eq, in, ne, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **requestedFor.id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **modified**: *gt, lt, ge, le, eq, in, ne, sw* (optional)
|
|
sorters := `modified` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.ListCompletedApprovals(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.ListCompletedApprovals(context.Background()).OwnerId(ownerId).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestApprovalsAPI.ListCompletedApprovals``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListCompletedApprovals`: []CompletedApproval
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestApprovalsAPI.ListCompletedApprovals`: %v\n", resp)
|
|
}
|
|
- path: /access-request-approvals/pending
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-request-approvals#list-pending-approvals
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
ownerId := `2c91808568c529c60168cca6f90c1313` // string | If present, the value returns only pending approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional) # string | If present, the value returns only pending approvals for the specified identity. * ORG_ADMIN users can call this with any identity ID value. * ORG_ADMIN users can also fetch all the approvals in the org, when owner-id is not used. * Non-ORG_ADMIN users can only specify *me* or pass their own identity ID value. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `id eq "2c91808568c529c60168cca6f90c1313"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **requestedFor.id**: *eq, in* **modified**: *gt, lt, ge, le, eq, in* **accessRequestId**: *eq, in* **created**: *gt, lt, ge, le, eq, in* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **requestedFor.id**: *eq, in* **modified**: *gt, lt, ge, le, eq, in* **accessRequestId**: *eq, in* **created**: *gt, lt, ge, le, eq, in* (optional)
|
|
sorters := `modified` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.ListPendingApprovals(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.ListPendingApprovals(context.Background()).OwnerId(ownerId).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestApprovalsAPI.ListPendingApprovals``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListPendingApprovals`: []PendingApproval
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestApprovalsAPI.ListPendingApprovals`: %v\n", resp)
|
|
}
|
|
- path: /access-request-approvals/{approvalId}/reject
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-request-approvals#reject-access-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
approvalId := `2c91808b7294bea301729568c68c002e` // string | Approval ID. # string | Approval ID.
|
|
commentdto := []byte(`{
|
|
"created" : "2017-07-11T18:45:37.098Z",
|
|
"author" : {
|
|
"name" : "john.doe",
|
|
"id" : "2c9180847e25f377017e2ae8cae4650b",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"comment" : "This is a comment."
|
|
}`) // CommentDto | Reviewer's comment.
|
|
|
|
|
|
var commentDto v3.CommentDto
|
|
if err := json.Unmarshal(commentdto, &commentDto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.RejectAccessRequest(context.Background(), approvalId).CommentDto(commentDto).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestApprovalsAPI.RejectAccessRequest(context.Background(), approvalId).CommentDto(commentDto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestApprovalsAPI.RejectAccessRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `RejectAccessRequest`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestApprovalsAPI.RejectAccessRequest`: %v\n", resp)
|
|
}
|
|
- path: /access-requests/cancel
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-requests#cancel-access-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
cancelaccessrequest := []byte(`{
|
|
"accountActivityId" : "2c9180835d2e5168015d32f890ca1581",
|
|
"comment" : "I requested this role by mistake."
|
|
}`) // CancelAccessRequest |
|
|
|
|
|
|
var cancelAccessRequest v3.CancelAccessRequest
|
|
if err := json.Unmarshal(cancelaccessrequest, &cancelAccessRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestsAPI.CancelAccessRequest(context.Background()).CancelAccessRequest(cancelAccessRequest).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestsAPI.CancelAccessRequest(context.Background()).CancelAccessRequest(cancelAccessRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestsAPI.CancelAccessRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CancelAccessRequest`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestsAPI.CancelAccessRequest`: %v\n", resp)
|
|
}
|
|
- path: /access-requests
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-requests#create-access-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
accessrequest := []byte(`{
|
|
"requestedFor" : "2c918084660f45d6016617daa9210584",
|
|
"clientMetadata" : {
|
|
"requestedAppId" : "2c91808f7892918f0178b78da4a305a1",
|
|
"requestedAppName" : "test-app"
|
|
},
|
|
"requestType" : "GRANT_ACCESS",
|
|
"requestedItems" : [ {
|
|
"clientMetadata" : {
|
|
"requestedAppName" : "test-app",
|
|
"requestedAppId" : "2c91808f7892918f0178b78da4a305a1"
|
|
},
|
|
"removeDate" : "2020-07-11T21:23:15Z",
|
|
"comment" : "Requesting access profile for John Doe",
|
|
"id" : "2c9180835d2e5168015d32f890ca1581",
|
|
"type" : "ACCESS_PROFILE",
|
|
"assignmentId" : "ee48a191c00d49bf9264eb0a4fc3a9fc",
|
|
"nativeIdentity" : "CN=User db3377de14bf,OU=YOURCONTAINER, DC=YOURDOMAIN"
|
|
}, {
|
|
"clientMetadata" : {
|
|
"requestedAppName" : "test-app",
|
|
"requestedAppId" : "2c91808f7892918f0178b78da4a305a1"
|
|
},
|
|
"removeDate" : "2020-07-11T21:23:15Z",
|
|
"comment" : "Requesting access profile for John Doe",
|
|
"id" : "2c9180835d2e5168015d32f890ca1581",
|
|
"type" : "ACCESS_PROFILE",
|
|
"assignmentId" : "ee48a191c00d49bf9264eb0a4fc3a9fc",
|
|
"nativeIdentity" : "CN=User db3377de14bf,OU=YOURCONTAINER, DC=YOURDOMAIN"
|
|
} ],
|
|
"requestedForWithRequestedItems" : [ {
|
|
"identityId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"requestedItems" : [ {
|
|
"clientMetadata" : {
|
|
"requestedAppName" : "test-app",
|
|
"requestedAppId" : "2c91808f7892918f0178b78da4a305a1"
|
|
},
|
|
"removeDate" : "2020-07-11T21:23:15Z",
|
|
"accountSelection" : [ {
|
|
"sourceId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"accounts" : [ {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
}, {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
} ]
|
|
}, {
|
|
"sourceId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"accounts" : [ {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
}, {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
} ]
|
|
} ],
|
|
"comment" : "Requesting access profile for John Doe",
|
|
"id" : "2c9180835d2e5168015d32f890ca1581",
|
|
"type" : "ACCESS_PROFILE"
|
|
}, {
|
|
"clientMetadata" : {
|
|
"requestedAppName" : "test-app",
|
|
"requestedAppId" : "2c91808f7892918f0178b78da4a305a1"
|
|
},
|
|
"removeDate" : "2020-07-11T21:23:15Z",
|
|
"accountSelection" : [ {
|
|
"sourceId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"accounts" : [ {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
}, {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
} ]
|
|
}, {
|
|
"sourceId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"accounts" : [ {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
}, {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
} ]
|
|
} ],
|
|
"comment" : "Requesting access profile for John Doe",
|
|
"id" : "2c9180835d2e5168015d32f890ca1581",
|
|
"type" : "ACCESS_PROFILE"
|
|
} ]
|
|
}, {
|
|
"identityId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"requestedItems" : [ {
|
|
"clientMetadata" : {
|
|
"requestedAppName" : "test-app",
|
|
"requestedAppId" : "2c91808f7892918f0178b78da4a305a1"
|
|
},
|
|
"removeDate" : "2020-07-11T21:23:15Z",
|
|
"accountSelection" : [ {
|
|
"sourceId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"accounts" : [ {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
}, {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
} ]
|
|
}, {
|
|
"sourceId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"accounts" : [ {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
}, {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
} ]
|
|
} ],
|
|
"comment" : "Requesting access profile for John Doe",
|
|
"id" : "2c9180835d2e5168015d32f890ca1581",
|
|
"type" : "ACCESS_PROFILE"
|
|
}, {
|
|
"clientMetadata" : {
|
|
"requestedAppName" : "test-app",
|
|
"requestedAppId" : "2c91808f7892918f0178b78da4a305a1"
|
|
},
|
|
"removeDate" : "2020-07-11T21:23:15Z",
|
|
"accountSelection" : [ {
|
|
"sourceId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"accounts" : [ {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
}, {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
} ]
|
|
}, {
|
|
"sourceId" : "cb89bc2f1ee6445fbea12224c526ba3a",
|
|
"accounts" : [ {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
}, {
|
|
"accountUuid" : "{fab7119e-004f-4822-9c33-b8d570d6c6a6}",
|
|
"nativeIdentity" : "CN=Glen 067da3248e914,OU=YOUROU,OU=org-data-service,DC=YOURDC,DC=local"
|
|
} ]
|
|
} ],
|
|
"comment" : "Requesting access profile for John Doe",
|
|
"id" : "2c9180835d2e5168015d32f890ca1581",
|
|
"type" : "ACCESS_PROFILE"
|
|
} ]
|
|
} ]
|
|
}`) // AccessRequest |
|
|
|
|
|
|
var accessRequest v3.AccessRequest
|
|
if err := json.Unmarshal(accessrequest, &accessRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestsAPI.CreateAccessRequest(context.Background()).AccessRequest(accessRequest).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestsAPI.CreateAccessRequest(context.Background()).AccessRequest(accessRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestsAPI.CreateAccessRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateAccessRequest`: AccessRequestResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestsAPI.CreateAccessRequest`: %v\n", resp)
|
|
}
|
|
- path: /access-request-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-requests#get-access-request-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestsAPI.GetAccessRequestConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestsAPI.GetAccessRequestConfig(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestsAPI.GetAccessRequestConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAccessRequestConfig`: AccessRequestConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestsAPI.GetAccessRequestConfig`: %v\n", resp)
|
|
}
|
|
- path: /access-request-status
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-requests#list-access-request-status
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
requestedFor := `2c9180877b2b6ea4017b2c545f971429` // string | Filter the results by the identity the requests were made for. *me* indicates the current user. Mutually exclusive with *regarding-identity*. (optional) # string | Filter the results by the identity the requests were made for. *me* indicates the current user. Mutually exclusive with *regarding-identity*. (optional)
|
|
requestedBy := `2c9180877b2b6ea4017b2c545f971429` // string | Filter the results by the identity who made the requests. *me* indicates the current user. Mutually exclusive with *regarding-identity*. (optional) # string | Filter the results by the identity who made the requests. *me* indicates the current user. Mutually exclusive with *regarding-identity*. (optional)
|
|
regardingIdentity := `2c9180877b2b6ea4017b2c545f971429` // string | Filter the results by the specified identity who is either the requester or target of the requests. *me* indicates the current user. Mutually exclusive with *requested-for* and *requested-by*. (optional) # string | Filter the results by the specified identity who is either the requester or target of the requests. *me* indicates the current user. Mutually exclusive with *requested-for* and *requested-by*. (optional)
|
|
assignedTo := `2c9180877b2b6ea4017b2c545f971429` // string | Filter the results by the specified identity who is the owner of the Identity Request Work Item. *me* indicates the current user. (optional) # string | Filter the results by the specified identity who is the owner of the Identity Request Work Item. *me* indicates the current user. (optional)
|
|
count := false // bool | If this is true, the *X-Total-Count* response header populates with the number of results that would be returned if limit and offset were ignored. (optional) (default to false) # bool | If this is true, the *X-Total-Count* response header populates with the number of results that would be returned if limit and offset were ignored. (optional) (default to false)
|
|
limit := 100 // int32 | Max number of results to return. (optional) (default to 250) # int32 | Max number of results to return. (optional) (default to 250)
|
|
offset := 10 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. Defaults to 0 if not specified. (optional) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. Defaults to 0 if not specified. (optional)
|
|
filters := `accountActivityItemId eq "2c918086771c86df0177401efcdf54c0"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **accessRequestId**: *eq, in, ge, gt, le, lt, ne, sw* **accountActivityItemId**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **created**: *eq, in, ge, gt, le, lt, ne, isnull, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **accessRequestId**: *eq, in, ge, gt, le, lt, ne, sw* **accountActivityItemId**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **created**: *eq, in, ge, gt, le, lt, ne, isnull, sw* (optional)
|
|
sorters := `created` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified, accountActivityItemId, name** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified, accountActivityItemId, name** (optional)
|
|
requestState := `request-state=EXECUTING` // string | Filter the results by the state of the request. The only valid value is *EXECUTING*. (optional) # string | Filter the results by the state of the request. The only valid value is *EXECUTING*. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestsAPI.ListAccessRequestStatus(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestsAPI.ListAccessRequestStatus(context.Background()).RequestedFor(requestedFor).RequestedBy(requestedBy).RegardingIdentity(regardingIdentity).AssignedTo(assignedTo).Count(count).Limit(limit).Offset(offset).Filters(filters).Sorters(sorters).RequestState(requestState).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestsAPI.ListAccessRequestStatus``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListAccessRequestStatus`: []RequestedItemStatus
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestsAPI.ListAccessRequestStatus`: %v\n", resp)
|
|
}
|
|
- path: /access-request-config
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/access-requests#set-access-request-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
accessrequestconfig := []byte(`{
|
|
"requestOnBehalfOfConfig" : {
|
|
"allowRequestOnBehalfOfEmployeeByManager" : true,
|
|
"allowRequestOnBehalfOfAnyoneByAnyone" : true
|
|
},
|
|
"approvalReminderAndEscalationConfig" : {
|
|
"fallbackApproverRef" : {
|
|
"name" : "Alison Ferguso",
|
|
"id" : "5168015d32f890ca15812c9180835d2e",
|
|
"type" : "IDENTITY",
|
|
"email" : "alison.ferguso@identitysoon.com"
|
|
},
|
|
"maxReminders" : 1,
|
|
"daysUntilEscalation" : 0,
|
|
"daysBetweenReminders" : 0
|
|
},
|
|
"autoApprovalEnabled" : true,
|
|
"entitlementRequestConfig" : {
|
|
"requestCommentsRequired" : false,
|
|
"deniedCommentsRequired" : false,
|
|
"allowEntitlementRequest" : true,
|
|
"grantRequestApprovalSchemes" : "entitlementOwner, sourceOwner, manager, workgroup:2c918084660f45d6016617daa9210584"
|
|
},
|
|
"reauthorizationEnabled" : true,
|
|
"approvalsMustBeExternal" : true
|
|
}`) // AccessRequestConfig |
|
|
|
|
|
|
var accessRequestConfig v3.AccessRequestConfig
|
|
if err := json.Unmarshal(accessrequestconfig, &accessRequestConfig); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccessRequestsAPI.SetAccessRequestConfig(context.Background()).AccessRequestConfig(accessRequestConfig).Execute()
|
|
//resp, r, err := apiClient.V3.AccessRequestsAPI.SetAccessRequestConfig(context.Background()).AccessRequestConfig(accessRequestConfig).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccessRequestsAPI.SetAccessRequestConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetAccessRequestConfig`: AccessRequestConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `AccessRequestsAPI.SetAccessRequestConfig`: %v\n", resp)
|
|
}
|
|
- path: /account-activities/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/account-activities#get-account-activity
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The account activity id # string | The account activity id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountActivitiesAPI.GetAccountActivity(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.AccountActivitiesAPI.GetAccountActivity(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountActivitiesAPI.GetAccountActivity``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAccountActivity`: AccountActivity
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountActivitiesAPI.GetAccountActivity`: %v\n", resp)
|
|
}
|
|
- path: /account-activities
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/account-activities#list-account-activities
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
requestedFor := `2c91808568c529c60168cca6f90c1313` // string | The identity that the activity was requested for. *me* indicates the current user. Mutually exclusive with *regarding-identity*. (optional) # string | The identity that the activity was requested for. *me* indicates the current user. Mutually exclusive with *regarding-identity*. (optional)
|
|
requestedBy := `2c91808568c529c60168cca6f90c1313` // string | The identity that requested the activity. *me* indicates the current user. Mutually exclusive with *regarding-identity*. (optional) # string | The identity that requested the activity. *me* indicates the current user. Mutually exclusive with *regarding-identity*. (optional)
|
|
regardingIdentity := `2c91808568c529c60168cca6f90c1313` // string | The specified identity will be either the requester or target of the account activity. *me* indicates the current user. Mutually exclusive with *requested-for* and *requested-by*. (optional) # string | The specified identity will be either the requester or target of the account activity. *me* indicates the current user. Mutually exclusive with *requested-for* and *requested-by*. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `type eq "Identity Refresh"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **type**: *eq, in, ge, le, lt, ne, isnull, sw* **created**: *gt, lt, ge, le, eq, in, ne, isnull, sw* **modified**: *gt, lt, ge, le, eq, in, ne, isnull, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **type**: *eq, in, ge, le, lt, ne, isnull, sw* **created**: *gt, lt, ge, le, eq, in, ne, isnull, sw* **modified**: *gt, lt, ge, le, eq, in, ne, isnull, sw* (optional)
|
|
sorters := `created` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **type, created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **type, created, modified** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountActivitiesAPI.ListAccountActivities(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.AccountActivitiesAPI.ListAccountActivities(context.Background()).RequestedFor(requestedFor).RequestedBy(requestedBy).RegardingIdentity(regardingIdentity).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountActivitiesAPI.ListAccountActivities``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListAccountActivities`: []AccountActivity
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountActivitiesAPI.ListAccountActivities`: %v\n", resp)
|
|
}
|
|
- path: /account-usages/{accountId}/summaries
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/account-usages#get-usages-by-account-id
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
accountId := `ef38f94347e94562b5bb8424a56397d8` // string | ID of IDN account # string | ID of IDN account
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
sorters := `-date` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **date** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **date** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountUsagesAPI.GetUsagesByAccountId(context.Background(), accountId).Execute()
|
|
//resp, r, err := apiClient.V3.AccountUsagesAPI.GetUsagesByAccountId(context.Background(), accountId).Limit(limit).Offset(offset).Count(count).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountUsagesAPI.GetUsagesByAccountId``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetUsagesByAccountId`: []AccountUsage
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountUsagesAPI.GetUsagesByAccountId`: %v\n", resp)
|
|
}
|
|
- path: /accounts
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#create-account
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
accountattributescreate := []byte(`{
|
|
"attributes" : {
|
|
"sourceId" : "34bfcbe116c9407464af37acbaf7a4dc",
|
|
"city" : "Austin",
|
|
"displayName" : "John Doe",
|
|
"userName" : "jdoe",
|
|
"sAMAccountName" : "jDoe",
|
|
"mail" : "john.doe@sailpoint.com"
|
|
}
|
|
}`) // AccountAttributesCreate |
|
|
|
|
|
|
var accountAttributesCreate v3.AccountAttributesCreate
|
|
if err := json.Unmarshal(accountattributescreate, &accountAttributesCreate); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.CreateAccount(context.Background()).AccountAttributesCreate(accountAttributesCreate).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.CreateAccount(context.Background()).AccountAttributesCreate(accountAttributesCreate).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.CreateAccount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateAccount`: AccountsAsyncResult
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.CreateAccount`: %v\n", resp)
|
|
}
|
|
- path: /accounts/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#delete-account
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Account ID. # string | Account ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.DeleteAccount(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.DeleteAccount(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.DeleteAccount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteAccount`: AccountsAsyncResult
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.DeleteAccount`: %v\n", resp)
|
|
}
|
|
- path: /accounts/{id}/disable
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#disable-account
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The account id # string | The account id
|
|
accounttogglerequest := []byte(`{
|
|
"forceProvisioning" : false,
|
|
"externalVerificationId" : "3f9180835d2e5168015d32f890ca1581"
|
|
}`) // AccountToggleRequest |
|
|
|
|
|
|
var accountToggleRequest v3.AccountToggleRequest
|
|
if err := json.Unmarshal(accounttogglerequest, &accountToggleRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.DisableAccount(context.Background(), id).AccountToggleRequest(accountToggleRequest).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.DisableAccount(context.Background(), id).AccountToggleRequest(accountToggleRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.DisableAccount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DisableAccount`: AccountsAsyncResult
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.DisableAccount`: %v\n", resp)
|
|
}
|
|
- path: /accounts/{id}/enable
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#enable-account
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The account id # string | The account id
|
|
accounttogglerequest := []byte(`{
|
|
"forceProvisioning" : false,
|
|
"externalVerificationId" : "3f9180835d2e5168015d32f890ca1581"
|
|
}`) // AccountToggleRequest |
|
|
|
|
|
|
var accountToggleRequest v3.AccountToggleRequest
|
|
if err := json.Unmarshal(accounttogglerequest, &accountToggleRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.EnableAccount(context.Background(), id).AccountToggleRequest(accountToggleRequest).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.EnableAccount(context.Background(), id).AccountToggleRequest(accountToggleRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.EnableAccount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `EnableAccount`: AccountsAsyncResult
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.EnableAccount`: %v\n", resp)
|
|
}
|
|
- path: /accounts/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#get-account
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Account ID. # string | Account ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.GetAccount(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.GetAccount(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.GetAccount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAccount`: Account
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.GetAccount`: %v\n", resp)
|
|
}
|
|
- path: /accounts/{id}/entitlements
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#get-account-entitlements
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The account id # string | The account id
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.GetAccountEntitlements(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.GetAccountEntitlements(context.Background(), id).Limit(limit).Offset(offset).Count(count).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.GetAccountEntitlements``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAccountEntitlements`: []Entitlement
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.GetAccountEntitlements`: %v\n", resp)
|
|
}
|
|
- path: /accounts
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#list-accounts
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
detailLevel := `FULL` // string | This value determines whether the API provides `SLIM` or increased level of detail (`FULL`) for each account in the returned list. `FULL` is the default behavior. (optional) # string | This value determines whether the API provides `SLIM` or increased level of detail (`FULL`) for each account in the returned list. `FULL` is the default behavior. (optional)
|
|
filters := `identityId eq "2c9180858082150f0180893dbaf44201"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in, sw* **identityId**: *eq, in, sw* **name**: *eq, in, sw* **nativeIdentity**: *eq, in, sw* **hasEntitlements**: *eq* **sourceId**: *eq, in, sw* **uncorrelated**: *eq* **entitlements**: *eq* **origin**: *eq, in* **manuallyCorrelated**: *eq* **identity.name**: *eq, in, sw* **identity.correlated**: *eq* **identity.identityState**: *eq, in* **source.displayableName**: *eq, in* **source.authoritative**: *eq* **source.connectionType**: *eq, in* **recommendation.method**: *eq, in, isnull* **created**: *eq, ge, gt, le, lt* **modified**: *eq, ge, gt, le, lt* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in, sw* **identityId**: *eq, in, sw* **name**: *eq, in, sw* **nativeIdentity**: *eq, in, sw* **hasEntitlements**: *eq* **sourceId**: *eq, in, sw* **uncorrelated**: *eq* **entitlements**: *eq* **origin**: *eq, in* **manuallyCorrelated**: *eq* **identity.name**: *eq, in, sw* **identity.correlated**: *eq* **identity.identityState**: *eq, in* **source.displayableName**: *eq, in* **source.authoritative**: *eq* **source.connectionType**: *eq, in* **recommendation.method**: *eq, in, isnull* **created**: *eq, ge, gt, le, lt* **modified**: *eq, ge, gt, le, lt* (optional)
|
|
sorters := `id,name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, created, modified, sourceId, identityId, nativeIdentity, uuid, manuallyCorrelated, entitlements, origin, identity.name, identity.identityState, identity.correlated, source.displayableName, source.authoritative, source.connectionType** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, created, modified, sourceId, identityId, nativeIdentity, uuid, manuallyCorrelated, entitlements, origin, identity.name, identity.identityState, identity.correlated, source.displayableName, source.authoritative, source.connectionType** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.ListAccounts(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.ListAccounts(context.Background()).Limit(limit).Offset(offset).Count(count).DetailLevel(detailLevel).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.ListAccounts``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListAccounts`: []Account
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.ListAccounts`: %v\n", resp)
|
|
}
|
|
- path: /accounts/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#put-account
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Account ID. # string | Account ID.
|
|
accountattributes := []byte(`{
|
|
"attributes" : {
|
|
"city" : "Austin",
|
|
"displayName" : "John Doe",
|
|
"userName" : "jdoe",
|
|
"sAMAccountName" : "jDoe",
|
|
"mail" : "john.doe@sailpoint.com"
|
|
}
|
|
}`) // AccountAttributes |
|
|
|
|
|
|
var accountAttributes v3.AccountAttributes
|
|
if err := json.Unmarshal(accountattributes, &accountAttributes); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.PutAccount(context.Background(), id).AccountAttributes(accountAttributes).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.PutAccount(context.Background(), id).AccountAttributes(accountAttributes).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.PutAccount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutAccount`: AccountsAsyncResult
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.PutAccount`: %v\n", resp)
|
|
}
|
|
- path: /accounts/{id}/reload
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#submit-reload-account
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The account id # string | The account id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.SubmitReloadAccount(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.SubmitReloadAccount(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.SubmitReloadAccount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SubmitReloadAccount`: AccountsAsyncResult
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.SubmitReloadAccount`: %v\n", resp)
|
|
}
|
|
- path: /accounts/{id}/unlock
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#unlock-account
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The account ID. # string | The account ID.
|
|
accountunlockrequest := []byte(`{
|
|
"forceProvisioning" : false,
|
|
"externalVerificationId" : "3f9180835d2e5168015d32f890ca1581",
|
|
"unlockIDNAccount" : false
|
|
}`) // AccountUnlockRequest |
|
|
|
|
|
|
var accountUnlockRequest v3.AccountUnlockRequest
|
|
if err := json.Unmarshal(accountunlockrequest, &accountUnlockRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.UnlockAccount(context.Background(), id).AccountUnlockRequest(accountUnlockRequest).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.UnlockAccount(context.Background(), id).AccountUnlockRequest(accountUnlockRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.UnlockAccount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UnlockAccount`: AccountsAsyncResult
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.UnlockAccount`: %v\n", resp)
|
|
}
|
|
- path: /accounts/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/accounts#update-account
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Account ID. # string | Account ID.
|
|
requestbody := []byte(`[{op=remove, path=/identityId}]`) // []map[string]interface{} | A list of account update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.
|
|
|
|
|
|
var requestBody []v3.RequestBody
|
|
if err := json.Unmarshal(requestbody, &requestBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AccountsAPI.UpdateAccount(context.Background(), id).RequestBody(requestBody).Execute()
|
|
//resp, r, err := apiClient.V3.AccountsAPI.UpdateAccount(context.Background(), id).RequestBody(requestBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.UpdateAccount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateAccount`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.UpdateAccount`: %v\n", resp)
|
|
}
|
|
- path: /discovered-applications
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/application-discovery#get-discovered-applications
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
detail := `FULL` // string | Determines whether slim, or increased level of detail is provided for each discovered application in the returned list. SLIM is the default behavior. (optional) # string | Determines whether slim, or increased level of detail is provided for each discovered application in the returned list. SLIM is the default behavior. (optional)
|
|
filter := `name eq "Okta" and description co "Okta" and discoverySource in ("csv", "Okta Saas")` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **name**: *eq, sw, co* **description**: *eq, sw, co* **createdAtStart**: *eq, le, ge* **createdAtEnd**: *eq, le, ge* **discoveredAtStart**: *eq, le, ge* **discoveredAtEnd**: *eq, le, ge* **discoverySource**: *eq, in* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **name**: *eq, sw, co* **description**: *eq, sw, co* **createdAtStart**: *eq, le, ge* **createdAtEnd**: *eq, le, ge* **discoveredAtStart**: *eq, le, ge* **discoveredAtEnd**: *eq, le, ge* **discoverySource**: *eq, in* (optional)
|
|
sorters := `name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, description, discoveredAt, discoverySource** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, description, discoveredAt, discoverySource** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ApplicationDiscoveryAPI.GetDiscoveredApplications(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ApplicationDiscoveryAPI.GetDiscoveredApplications(context.Background()).Limit(limit).Offset(offset).Detail(detail).Filter(filter).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationDiscoveryAPI.GetDiscoveredApplications``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetDiscoveredApplications`: []GetDiscoveredApplications200ResponseInner
|
|
fmt.Fprintf(os.Stdout, "Response from `ApplicationDiscoveryAPI.GetDiscoveredApplications`: %v\n", resp)
|
|
}
|
|
- path: /manual-discover-applications-template
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/application-discovery#get-manual-discover-applications-csv-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ApplicationDiscoveryAPI.GetManualDiscoverApplicationsCsvTemplate(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ApplicationDiscoveryAPI.GetManualDiscoverApplicationsCsvTemplate(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationDiscoveryAPI.GetManualDiscoverApplicationsCsvTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetManualDiscoverApplicationsCsvTemplate`: ManualDiscoverApplicationsTemplate
|
|
fmt.Fprintf(os.Stdout, "Response from `ApplicationDiscoveryAPI.GetManualDiscoverApplicationsCsvTemplate`: %v\n", resp)
|
|
}
|
|
- path: /manual-discover-applications
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/application-discovery#send-manual-discover-applications-csv-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
file := BINARY_DATA_HERE // *os.File | The CSV file to upload containing `application_name` and `description` columns. Each row represents an application to be discovered. # *os.File | The CSV file to upload containing `application_name` and `description` columns. Each row represents an application to be discovered.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ApplicationDiscoveryAPI.SendManualDiscoverApplicationsCsvTemplate(context.Background()).File(file).Execute()
|
|
//r, err := apiClient.V3.ApplicationDiscoveryAPI.SendManualDiscoverApplicationsCsvTemplate(context.Background()).File(file).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ApplicationDiscoveryAPI.SendManualDiscoverApplicationsCsvTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /auth-users/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/auth-users#get-auth-user
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Identity ID # string | Identity ID
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AuthUsersAPI.GetAuthUser(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.AuthUsersAPI.GetAuthUser(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AuthUsersAPI.GetAuthUser``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAuthUser`: AuthUser
|
|
fmt.Fprintf(os.Stdout, "Response from `AuthUsersAPI.GetAuthUser`: %v\n", resp)
|
|
}
|
|
- path: /auth-users/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/auth-users#patch-auth-user
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Identity ID # string | Identity ID
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/capabilities, value=[ORG_ADMIN]}]`) // []JsonPatchOperation | A list of auth user update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.AuthUsersAPI.PatchAuthUser(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.AuthUsersAPI.PatchAuthUser(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `AuthUsersAPI.PatchAuthUser``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchAuthUser`: AuthUser
|
|
fmt.Fprintf(os.Stdout, "Response from `AuthUsersAPI.PatchAuthUser`: %v\n", resp)
|
|
}
|
|
- path: /brandings
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/branding#create-branding-item
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
name := `name_example` // string | name of branding item # string | name of branding item
|
|
productName := `productName_example` // string | product name # string | product name
|
|
actionButtonColor := `actionButtonColor_example` // string | hex value of color for action button (optional) # string | hex value of color for action button (optional)
|
|
activeLinkColor := `activeLinkColor_example` // string | hex value of color for link (optional) # string | hex value of color for link (optional)
|
|
navigationColor := `navigationColor_example` // string | hex value of color for navigation bar (optional) # string | hex value of color for navigation bar (optional)
|
|
emailFromAddress := `emailFromAddress_example` // string | email from address (optional) # string | email from address (optional)
|
|
loginInformationalMessage := `loginInformationalMessage_example` // string | login information message (optional) # string | login information message (optional)
|
|
fileStandard := BINARY_DATA_HERE // *os.File | png file with logo (optional) # *os.File | png file with logo (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.BrandingAPI.CreateBrandingItem(context.Background()).Name(name).ProductName(productName).Execute()
|
|
//resp, r, err := apiClient.V3.BrandingAPI.CreateBrandingItem(context.Background()).Name(name).ProductName(productName).ActionButtonColor(actionButtonColor).ActiveLinkColor(activeLinkColor).NavigationColor(navigationColor).EmailFromAddress(emailFromAddress).LoginInformationalMessage(loginInformationalMessage).FileStandard(fileStandard).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `BrandingAPI.CreateBrandingItem``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateBrandingItem`: BrandingItem
|
|
fmt.Fprintf(os.Stdout, "Response from `BrandingAPI.CreateBrandingItem`: %v\n", resp)
|
|
}
|
|
- path: /brandings/{name}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/branding#delete-branding
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
name := `default` // string | The name of the branding item to be deleted # string | The name of the branding item to be deleted
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.BrandingAPI.DeleteBranding(context.Background(), name).Execute()
|
|
//r, err := apiClient.V3.BrandingAPI.DeleteBranding(context.Background(), name).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `BrandingAPI.DeleteBranding``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /brandings/{name}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/branding#get-branding
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
name := `default` // string | The name of the branding item to be retrieved # string | The name of the branding item to be retrieved
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.BrandingAPI.GetBranding(context.Background(), name).Execute()
|
|
//resp, r, err := apiClient.V3.BrandingAPI.GetBranding(context.Background(), name).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `BrandingAPI.GetBranding``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetBranding`: BrandingItem
|
|
fmt.Fprintf(os.Stdout, "Response from `BrandingAPI.GetBranding`: %v\n", resp)
|
|
}
|
|
- path: /brandings
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/branding#get-branding-list
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.BrandingAPI.GetBrandingList(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.BrandingAPI.GetBrandingList(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `BrandingAPI.GetBrandingList``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetBrandingList`: []BrandingItem
|
|
fmt.Fprintf(os.Stdout, "Response from `BrandingAPI.GetBrandingList`: %v\n", resp)
|
|
}
|
|
- path: /brandings/{name}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/branding#set-branding-item
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
name := `default` // string | The name of the branding item to be retrieved # string | The name of the branding item to be retrieved
|
|
name2 := `name_example` // string | name of branding item # string | name of branding item
|
|
productName := `productName_example` // string | product name # string | product name
|
|
actionButtonColor := `actionButtonColor_example` // string | hex value of color for action button (optional) # string | hex value of color for action button (optional)
|
|
activeLinkColor := `activeLinkColor_example` // string | hex value of color for link (optional) # string | hex value of color for link (optional)
|
|
navigationColor := `navigationColor_example` // string | hex value of color for navigation bar (optional) # string | hex value of color for navigation bar (optional)
|
|
emailFromAddress := `emailFromAddress_example` // string | email from address (optional) # string | email from address (optional)
|
|
loginInformationalMessage := `loginInformationalMessage_example` // string | login information message (optional) # string | login information message (optional)
|
|
fileStandard := BINARY_DATA_HERE // *os.File | png file with logo (optional) # *os.File | png file with logo (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.BrandingAPI.SetBrandingItem(context.Background(), name).Name2(name2).ProductName(productName).Execute()
|
|
//resp, r, err := apiClient.V3.BrandingAPI.SetBrandingItem(context.Background(), name).Name2(name2).ProductName(productName).ActionButtonColor(actionButtonColor).ActiveLinkColor(activeLinkColor).NavigationColor(navigationColor).EmailFromAddress(emailFromAddress).LoginInformationalMessage(loginInformationalMessage).FileStandard(fileStandard).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `BrandingAPI.SetBrandingItem``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetBrandingItem`: BrandingItem
|
|
fmt.Fprintf(os.Stdout, "Response from `BrandingAPI.SetBrandingItem`: %v\n", resp)
|
|
}
|
|
- path: /campaign-filters
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaign-filters#create-campaign-filter
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
campaignfilterdetails := []byte(`{
|
|
"owner" : "SailPoint Support",
|
|
"mode" : "INCLUSION",
|
|
"isSystemFilter" : false,
|
|
"name" : "Identity Attribute Campaign Filter",
|
|
"description" : "Campaign filter to certify data based on an identity attribute's specified property.",
|
|
"id" : "5ec18cef39020d6fd7a60ad3970aba61",
|
|
"criteriaList" : [ {
|
|
"type" : "IDENTITY_ATTRIBUTE",
|
|
"property" : "displayName",
|
|
"value" : "support",
|
|
"operation" : "CONTAINS",
|
|
"negateResult" : false,
|
|
"shortCircuit" : false,
|
|
"recordChildMatches" : false,
|
|
"suppressMatchedItems" : false
|
|
} ]
|
|
}`) // CampaignFilterDetails |
|
|
|
|
|
|
var campaignFilterDetails v3.CampaignFilterDetails
|
|
if err := json.Unmarshal(campaignfilterdetails, &campaignFilterDetails); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignFiltersAPI.CreateCampaignFilter(context.Background()).CampaignFilterDetails(campaignFilterDetails).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignFiltersAPI.CreateCampaignFilter(context.Background()).CampaignFilterDetails(campaignFilterDetails).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignFiltersAPI.CreateCampaignFilter``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateCampaignFilter`: CampaignFilterDetails
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignFiltersAPI.CreateCampaignFilter`: %v\n", resp)
|
|
}
|
|
- path: /campaign-filters/delete
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaign-filters#delete-campaign-filters
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
requestbody := []byte(``) // []string | A json list of IDs of campaign filters to delete.
|
|
|
|
|
|
var requestBody []v3.RequestBody
|
|
if err := json.Unmarshal(requestbody, &requestBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.CertificationCampaignFiltersAPI.DeleteCampaignFilters(context.Background()).RequestBody(requestBody).Execute()
|
|
//r, err := apiClient.V3.CertificationCampaignFiltersAPI.DeleteCampaignFilters(context.Background()).RequestBody(requestBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignFiltersAPI.DeleteCampaignFilters``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /campaign-filters/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaign-filters#get-campaign-filter-by-id
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `e9f9a1397b842fd5a65842087040d3ac` // string | The ID of the campaign filter to be retrieved. # string | The ID of the campaign filter to be retrieved.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignFiltersAPI.GetCampaignFilterById(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignFiltersAPI.GetCampaignFilterById(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignFiltersAPI.GetCampaignFilterById``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCampaignFilterById`: CampaignFilterDetails
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignFiltersAPI.GetCampaignFilterById`: %v\n", resp)
|
|
}
|
|
- path: /campaign-filters
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaign-filters#list-campaign-filters
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
start := 0 // int32 | Start/Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Start/Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
includeSystemFilters := true // bool | If this is true, the API includes system filters in the count and results. Otherwise it excludes them. If no value is provided, the default is true. (optional) (default to true) # bool | If this is true, the API includes system filters in the count and results. Otherwise it excludes them. If no value is provided, the default is true. (optional) (default to true)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignFiltersAPI.ListCampaignFilters(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignFiltersAPI.ListCampaignFilters(context.Background()).Limit(limit).Start(start).IncludeSystemFilters(includeSystemFilters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignFiltersAPI.ListCampaignFilters``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListCampaignFilters`: ListCampaignFilters200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignFiltersAPI.ListCampaignFilters`: %v\n", resp)
|
|
}
|
|
- path: /campaign-filters/{id}
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaign-filters#update-campaign-filter
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
filterId := `e9f9a1397b842fd5a65842087040d3ac` // string | The ID of the campaign filter being modified. # string | The ID of the campaign filter being modified.
|
|
campaignfilterdetails := []byte(`{
|
|
"owner" : "SailPoint Support",
|
|
"mode" : "INCLUSION",
|
|
"isSystemFilter" : false,
|
|
"name" : "Identity Attribute Campaign Filter",
|
|
"description" : "Campaign filter to certify data based on an identity attribute's specified property.",
|
|
"id" : "5ec18cef39020d6fd7a60ad3970aba61",
|
|
"criteriaList" : [ {
|
|
"type" : "IDENTITY_ATTRIBUTE",
|
|
"property" : "displayName",
|
|
"value" : "support",
|
|
"operation" : "CONTAINS",
|
|
"negateResult" : false,
|
|
"shortCircuit" : false,
|
|
"recordChildMatches" : false,
|
|
"suppressMatchedItems" : false
|
|
} ]
|
|
}`) // CampaignFilterDetails | A campaign filter details with updated field values.
|
|
|
|
|
|
var campaignFilterDetails v3.CampaignFilterDetails
|
|
if err := json.Unmarshal(campaignfilterdetails, &campaignFilterDetails); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignFiltersAPI.UpdateCampaignFilter(context.Background(), filterId).CampaignFilterDetails(campaignFilterDetails).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignFiltersAPI.UpdateCampaignFilter(context.Background(), filterId).CampaignFilterDetails(campaignFilterDetails).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignFiltersAPI.UpdateCampaignFilter``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateCampaignFilter`: CampaignFilterDetails
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignFiltersAPI.UpdateCampaignFilter`: %v\n", resp)
|
|
}
|
|
- path: /campaigns/{id}/complete
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#complete-campaign
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Campaign ID. # string | Campaign ID.
|
|
campaigncompleteoptions := []byte(`{
|
|
"autoCompleteAction" : "REVOKE"
|
|
}`) // CampaignCompleteOptions | Optional. Default behavior is for the campaign to auto-approve upon completion, unless autoCompleteAction=REVOKE (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.CompleteCampaign(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.CompleteCampaign(context.Background(), id).CampaignCompleteOptions(campaignCompleteOptions).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.CompleteCampaign``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CompleteCampaign`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.CompleteCampaign`: %v\n", resp)
|
|
}
|
|
- path: /campaigns
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#create-campaign
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
campaign := []byte(`{
|
|
"totalCertifications" : 100,
|
|
"sourcesWithOrphanEntitlements" : [ {
|
|
"name" : "Source with orphan entitlements",
|
|
"id" : "2c90ad2a70ace7d50170acf22ca90010",
|
|
"type" : "SOURCE"
|
|
}, {
|
|
"name" : "Source with orphan entitlements",
|
|
"id" : "2c90ad2a70ace7d50170acf22ca90010",
|
|
"type" : "SOURCE"
|
|
} ],
|
|
"recommendationsEnabled" : true,
|
|
"sunsetCommentsRequired" : true,
|
|
"created" : "2020-03-03T22:15:13.611Z",
|
|
"machineAccountCampaignInfo" : {
|
|
"reviewerType" : "ACCOUNT_OWNER",
|
|
"sourceIds" : [ "0fbe863c063c4c88a35fd7f17e8a3df5" ]
|
|
},
|
|
"description" : "Everyone needs to be reviewed by their manager",
|
|
"type" : "MANAGER",
|
|
"sourceOwnerCampaignInfo" : {
|
|
"sourceIds" : [ "0fbe863c063c4c88a35fd7f17e8a3df5" ]
|
|
},
|
|
"emailNotificationEnabled" : false,
|
|
"alerts" : [ {
|
|
"level" : "ERROR",
|
|
"localizations" : [ {
|
|
"localeOrigin" : "DEFAULT",
|
|
"text" : "The request was syntactically correct but its content is semantically invalid.",
|
|
"locale" : "en-US"
|
|
}, {
|
|
"localeOrigin" : "DEFAULT",
|
|
"text" : "The request was syntactically correct but its content is semantically invalid.",
|
|
"locale" : "en-US"
|
|
} ]
|
|
}, {
|
|
"level" : "ERROR",
|
|
"localizations" : [ {
|
|
"localeOrigin" : "DEFAULT",
|
|
"text" : "The request was syntactically correct but its content is semantically invalid.",
|
|
"locale" : "en-US"
|
|
}, {
|
|
"localeOrigin" : "DEFAULT",
|
|
"text" : "The request was syntactically correct but its content is semantically invalid.",
|
|
"locale" : "en-US"
|
|
} ]
|
|
} ],
|
|
"filter" : {
|
|
"name" : "Test Filter",
|
|
"id" : "0fbe863c063c4c88a35fd7f17e8a3df5",
|
|
"type" : "CAMPAIGN_FILTER"
|
|
},
|
|
"searchCampaignInfo" : {
|
|
"identityIds" : [ "0fbe863c063c4c88a35fd7f17e8a3df5" ],
|
|
"query" : "Search Campaign query description",
|
|
"description" : "Search Campaign description",
|
|
"reviewer" : {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"type" : "ACCESS",
|
|
"accessConstraints" : [ {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
}, {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
}, {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
}, {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
}, {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
} ]
|
|
},
|
|
"autoRevokeAllowed" : false,
|
|
"name" : "Manager Campaign",
|
|
"mandatoryCommentRequirement" : "NO_DECISIONS",
|
|
"modified" : "2020-03-03T22:20:12.674Z",
|
|
"roleCompositionCampaignInfo" : {
|
|
"remediatorRef" : {
|
|
"name" : "Role Admin",
|
|
"id" : "2c90ad2a70ace7d50170acf22ca90010",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"roleIds" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"query" : "Search Query",
|
|
"description" : "Role Composition Description",
|
|
"reviewer" : {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
}
|
|
},
|
|
"completedCertifications" : 10,
|
|
"id" : "2c9079b270a266a60170a2779fcb0007",
|
|
"deadline" : "2020-03-15T10:00:01.456Z",
|
|
"status" : "ACTIVE",
|
|
"correlatedStatus" : "CORRELATED"
|
|
}`) // Campaign |
|
|
|
|
|
|
var campaign v3.Campaign
|
|
if err := json.Unmarshal(campaign, &campaign); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.CreateCampaign(context.Background()).Campaign(campaign).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.CreateCampaign(context.Background()).Campaign(campaign).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.CreateCampaign``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateCampaign`: Campaign
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.CreateCampaign`: %v\n", resp)
|
|
}
|
|
- path: /campaign-templates
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#create-campaign-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
"time"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
campaigntemplate := []byte(`{
|
|
"ownerRef" : {
|
|
"name" : "Mister Manager",
|
|
"id" : "2c918086676d3e0601677611dbde220f",
|
|
"type" : "IDENTITY",
|
|
"email" : "mr.manager@example.com"
|
|
},
|
|
"deadlineDuration" : "P2W",
|
|
"created" : "2020-03-05T22:44:00.364Z",
|
|
"scheduled" : false,
|
|
"name" : "Manager Campaign Template",
|
|
"description" : "Template for the annual manager campaign.",
|
|
"modified" : "2020-03-05T22:52:09.969Z",
|
|
"campaign" : {
|
|
"totalCertifications" : 100,
|
|
"sourcesWithOrphanEntitlements" : [ {
|
|
"name" : "Source with orphan entitlements",
|
|
"id" : "2c90ad2a70ace7d50170acf22ca90010",
|
|
"type" : "SOURCE"
|
|
}, {
|
|
"name" : "Source with orphan entitlements",
|
|
"id" : "2c90ad2a70ace7d50170acf22ca90010",
|
|
"type" : "SOURCE"
|
|
} ],
|
|
"recommendationsEnabled" : true,
|
|
"sunsetCommentsRequired" : true,
|
|
"created" : "2020-03-03T22:15:13.611Z",
|
|
"machineAccountCampaignInfo" : {
|
|
"reviewerType" : "ACCOUNT_OWNER",
|
|
"sourceIds" : [ "0fbe863c063c4c88a35fd7f17e8a3df5" ]
|
|
},
|
|
"description" : "Everyone needs to be reviewed by their manager",
|
|
"type" : "MANAGER",
|
|
"sourceOwnerCampaignInfo" : {
|
|
"sourceIds" : [ "0fbe863c063c4c88a35fd7f17e8a3df5" ]
|
|
},
|
|
"emailNotificationEnabled" : false,
|
|
"alerts" : [ {
|
|
"level" : "ERROR",
|
|
"localizations" : [ {
|
|
"localeOrigin" : "DEFAULT",
|
|
"text" : "The request was syntactically correct but its content is semantically invalid.",
|
|
"locale" : "en-US"
|
|
}, {
|
|
"localeOrigin" : "DEFAULT",
|
|
"text" : "The request was syntactically correct but its content is semantically invalid.",
|
|
"locale" : "en-US"
|
|
} ]
|
|
}, {
|
|
"level" : "ERROR",
|
|
"localizations" : [ {
|
|
"localeOrigin" : "DEFAULT",
|
|
"text" : "The request was syntactically correct but its content is semantically invalid.",
|
|
"locale" : "en-US"
|
|
}, {
|
|
"localeOrigin" : "DEFAULT",
|
|
"text" : "The request was syntactically correct but its content is semantically invalid.",
|
|
"locale" : "en-US"
|
|
} ]
|
|
} ],
|
|
"filter" : {
|
|
"name" : "Test Filter",
|
|
"id" : "0fbe863c063c4c88a35fd7f17e8a3df5",
|
|
"type" : "CAMPAIGN_FILTER"
|
|
},
|
|
"searchCampaignInfo" : {
|
|
"identityIds" : [ "0fbe863c063c4c88a35fd7f17e8a3df5" ],
|
|
"query" : "Search Campaign query description",
|
|
"description" : "Search Campaign description",
|
|
"reviewer" : {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"type" : "ACCESS",
|
|
"accessConstraints" : [ {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
}, {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
}, {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
}, {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
}, {
|
|
"ids" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"type" : "ENTITLEMENT",
|
|
"operator" : "SELECTED"
|
|
} ]
|
|
},
|
|
"autoRevokeAllowed" : false,
|
|
"name" : "Manager Campaign",
|
|
"mandatoryCommentRequirement" : "NO_DECISIONS",
|
|
"modified" : "2020-03-03T22:20:12.674Z",
|
|
"roleCompositionCampaignInfo" : {
|
|
"remediatorRef" : {
|
|
"name" : "Role Admin",
|
|
"id" : "2c90ad2a70ace7d50170acf22ca90010",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"roleIds" : [ "2c90ad2a70ace7d50170acf22ca90010" ],
|
|
"query" : "Search Query",
|
|
"description" : "Role Composition Description",
|
|
"reviewer" : {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
}
|
|
},
|
|
"completedCertifications" : 10,
|
|
"id" : "2c9079b270a266a60170a2779fcb0007",
|
|
"deadline" : "2020-03-15T10:00:01.456Z",
|
|
"status" : "ACTIVE",
|
|
"correlatedStatus" : "CORRELATED"
|
|
},
|
|
"id" : "2c9079b270a266a60170a277bb960008"
|
|
}`) // CampaignTemplate |
|
|
|
|
|
|
var campaignTemplate v3.CampaignTemplate
|
|
if err := json.Unmarshal(campaigntemplate, &campaignTemplate); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.CreateCampaignTemplate(context.Background()).CampaignTemplate(campaignTemplate).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.CreateCampaignTemplate(context.Background()).CampaignTemplate(campaignTemplate).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.CreateCampaignTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateCampaignTemplate`: CampaignTemplate
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.CreateCampaignTemplate`: %v\n", resp)
|
|
}
|
|
- path: /campaign-templates/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#delete-campaign-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180835d191a86015d28455b4a2329` // string | ID of the campaign template being deleted. # string | ID of the campaign template being deleted.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.CertificationCampaignsAPI.DeleteCampaignTemplate(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.CertificationCampaignsAPI.DeleteCampaignTemplate(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.DeleteCampaignTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /campaign-templates/{id}/schedule
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#delete-campaign-template-schedule
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `04bedce387bd47b2ae1f86eb0bb36dee` // string | ID of the campaign template whose schedule is being deleted. # string | ID of the campaign template whose schedule is being deleted.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.CertificationCampaignsAPI.DeleteCampaignTemplateSchedule(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.CertificationCampaignsAPI.DeleteCampaignTemplateSchedule(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.DeleteCampaignTemplateSchedule``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /campaigns/delete
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#delete-campaigns
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
campaignsdeleterequest := []byte(`{
|
|
"ids" : [ "2c9180887335cee10173490db1776c26", "2c9180836a712436016a7125a90c0021" ]
|
|
}`) // CampaignsDeleteRequest | IDs of the campaigns to delete.
|
|
|
|
|
|
var campaignsDeleteRequest v3.CampaignsDeleteRequest
|
|
if err := json.Unmarshal(campaignsdeleterequest, &campaignsDeleteRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.DeleteCampaigns(context.Background()).CampaignsDeleteRequest(campaignsDeleteRequest).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.DeleteCampaigns(context.Background()).CampaignsDeleteRequest(campaignsDeleteRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.DeleteCampaigns``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteCampaigns`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.DeleteCampaigns`: %v\n", resp)
|
|
}
|
|
- path: /campaigns
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#get-active-campaigns
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
detail := `FULL` // string | Determines whether slim, or increased level of detail is provided for each campaign in the returned list. Slim is the default behavior. (optional) # string | Determines whether slim, or increased level of detail is provided for each campaign in the returned list. Slim is the default behavior. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `name eq "Manager Campaign"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **status**: *eq, in* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **status**: *eq, in* (optional)
|
|
sorters := `name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetActiveCampaigns(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetActiveCampaigns(context.Background()).Detail(detail).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.GetActiveCampaigns``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetActiveCampaigns`: []GetActiveCampaigns200ResponseInner
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.GetActiveCampaigns`: %v\n", resp)
|
|
}
|
|
- path: /campaigns/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#get-campaign
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808571bcfcf80171c23e4b4221fc` // string | ID of the campaign to be retrieved. # string | ID of the campaign to be retrieved.
|
|
detail := `FULL` // string | Determines whether slim, or increased level of detail is provided for each campaign in the returned list. Slim is the default behavior. (optional) # string | Determines whether slim, or increased level of detail is provided for each campaign in the returned list. Slim is the default behavior. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaign(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaign(context.Background(), id).Detail(detail).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.GetCampaign``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCampaign`: GetCampaign200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.GetCampaign`: %v\n", resp)
|
|
}
|
|
- path: /campaigns/{id}/reports
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#get-campaign-reports
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808571bcfcf80171c23e4b4221fc` // string | ID of the campaign whose reports are being fetched. # string | ID of the campaign whose reports are being fetched.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignReports(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignReports(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.GetCampaignReports``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCampaignReports`: []CampaignReport
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.GetCampaignReports`: %v\n", resp)
|
|
}
|
|
- path: /campaigns/reports-configuration
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#get-campaign-reports-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignReportsConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignReportsConfig(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.GetCampaignReportsConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCampaignReportsConfig`: CampaignReportsConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.GetCampaignReportsConfig`: %v\n", resp)
|
|
}
|
|
- path: /campaign-templates/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#get-campaign-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180835d191a86015d28455b4a2329` // string | Requested campaign template's ID. # string | Requested campaign template's ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignTemplate(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignTemplate(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.GetCampaignTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCampaignTemplate`: CampaignTemplate
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.GetCampaignTemplate`: %v\n", resp)
|
|
}
|
|
- path: /campaign-templates/{id}/schedule
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#get-campaign-template-schedule
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `04bedce387bd47b2ae1f86eb0bb36dee` // string | ID of the campaign template whose schedule is being fetched. # string | ID of the campaign template whose schedule is being fetched.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignTemplateSchedule(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignTemplateSchedule(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.GetCampaignTemplateSchedule``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCampaignTemplateSchedule`: Schedule
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.GetCampaignTemplateSchedule`: %v\n", resp)
|
|
}
|
|
- path: /campaign-templates
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#get-campaign-templates
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
sorters := `name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional)
|
|
filters := `name eq "manager template"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **name**: *eq, ge, gt, in, le, lt, ne, sw* **id**: *eq, ge, gt, in, le, lt, ne, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **name**: *eq, ge, gt, in, le, lt, ne, sw* **id**: *eq, ge, gt, in, le, lt, ne, sw* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignTemplates(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.GetCampaignTemplates(context.Background()).Limit(limit).Offset(offset).Count(count).Sorters(sorters).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.GetCampaignTemplates``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCampaignTemplates`: []CampaignTemplate
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.GetCampaignTemplates`: %v\n", resp)
|
|
}
|
|
- path: /campaigns/{id}/reassign
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#move
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The certification campaign ID # string | The certification campaign ID
|
|
adminreviewreassign := []byte(`{
|
|
"certificationIds" : [ "af3859464779471211bb8424a563abc1", "af3859464779471211bb8424a563abc2", "af3859464779471211bb8424a563abc3" ],
|
|
"reason" : "reassigned for some reason",
|
|
"reassignTo" : {
|
|
"id" : "ef38f94347e94562b5bb8424a56397d8",
|
|
"type" : "IDENTITY"
|
|
}
|
|
}`) // AdminReviewReassign |
|
|
|
|
|
|
var adminReviewReassign v3.AdminReviewReassign
|
|
if err := json.Unmarshal(adminreviewreassign, &adminReviewReassign); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.Move(context.Background(), id).AdminReviewReassign(adminReviewReassign).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.Move(context.Background(), id).AdminReviewReassign(adminReviewReassign).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.Move``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `Move`: CertificationTask
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.Move`: %v\n", resp)
|
|
}
|
|
- path: /campaign-templates/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#patch-campaign-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180835d191a86015d28455b4a2329` // string | ID of the campaign template being modified. # string | ID of the campaign template being modified.
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/description, value=Updated description!}, {op=replace, path=/campaign/filter/id, value=ff80818155fe8c080155fe8d925b0316}]`) // []JsonPatchOperation | A list of campaign update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * deadlineDuration * campaign (all fields that are allowed during create)
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.PatchCampaignTemplate(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.PatchCampaignTemplate(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.PatchCampaignTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchCampaignTemplate`: CampaignTemplate
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.PatchCampaignTemplate`: %v\n", resp)
|
|
}
|
|
- path: /campaigns/reports-configuration
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#set-campaign-reports-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
campaignreportsconfig := []byte(`{
|
|
"identityAttributeColumns" : [ "firstname", "lastname" ]
|
|
}`) // CampaignReportsConfig | Campaign report configuration.
|
|
|
|
|
|
var campaignReportsConfig v3.CampaignReportsConfig
|
|
if err := json.Unmarshal(campaignreportsconfig, &campaignReportsConfig); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.SetCampaignReportsConfig(context.Background()).CampaignReportsConfig(campaignReportsConfig).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.SetCampaignReportsConfig(context.Background()).CampaignReportsConfig(campaignReportsConfig).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.SetCampaignReportsConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetCampaignReportsConfig`: CampaignReportsConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.SetCampaignReportsConfig`: %v\n", resp)
|
|
}
|
|
- path: /campaign-templates/{id}/schedule
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#set-campaign-template-schedule
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `04bedce387bd47b2ae1f86eb0bb36dee` // string | ID of the campaign template being scheduled. # string | ID of the campaign template being scheduled.
|
|
schedule := []byte(`{
|
|
"hours" : {
|
|
"values" : [ "1" ],
|
|
"interval" : 2,
|
|
"type" : "LIST"
|
|
},
|
|
"months" : {
|
|
"values" : [ "1" ],
|
|
"interval" : 2,
|
|
"type" : "LIST"
|
|
},
|
|
"timeZoneId" : "CST",
|
|
"days" : {
|
|
"values" : [ "1" ],
|
|
"interval" : 2,
|
|
"type" : "LIST"
|
|
},
|
|
"expiration" : "2000-01-23T04:56:07.000+00:00",
|
|
"type" : "WEEKLY"
|
|
}`) // Schedule | (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.CertificationCampaignsAPI.SetCampaignTemplateSchedule(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.CertificationCampaignsAPI.SetCampaignTemplateSchedule(context.Background(), id).Schedule(schedule).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.SetCampaignTemplateSchedule``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /campaigns/{id}/activate
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#start-campaign
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Campaign ID. # string | Campaign ID.
|
|
activatecampaignoptions := []byte(`{
|
|
"timeZone" : "-05:00"
|
|
}`) // ActivateCampaignOptions | Optional. If no timezone is specified, the standard UTC timezone is used (i.e. UTC+00:00). Although this can take any timezone, the intended value is the caller's timezone. The activation time calculated from the given timezone may cause the campaign deadline time to be modified, but it will remain within the original date. The timezone must be in a valid ISO 8601 format. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.StartCampaign(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.StartCampaign(context.Background(), id).ActivateCampaignOptions(activateCampaignOptions).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.StartCampaign``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartCampaign`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.StartCampaign`: %v\n", resp)
|
|
}
|
|
- path: /campaigns/{id}/run-remediation-scan
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#start-campaign-remediation-scan
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808571bcfcf80171c23e4b4221fc` // string | ID of the campaign the remediation scan is being run for. # string | ID of the campaign the remediation scan is being run for.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.StartCampaignRemediationScan(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.StartCampaignRemediationScan(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.StartCampaignRemediationScan``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartCampaignRemediationScan`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.StartCampaignRemediationScan`: %v\n", resp)
|
|
}
|
|
- path: /campaigns/{id}/run-report/{type}
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#start-campaign-report
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808571bcfcf80171c23e4b4221fc` // string | ID of the campaign the report is being run for. # string | ID of the campaign the report is being run for.
|
|
type_ := // ReportType | Type of the report to run. # ReportType | Type of the report to run.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.StartCampaignReport(context.Background(), id, type_).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.StartCampaignReport(context.Background(), id, type_).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.StartCampaignReport``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartCampaignReport`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.StartCampaignReport`: %v\n", resp)
|
|
}
|
|
- path: /campaign-templates/{id}/generate
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#start-generate-campaign-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180835d191a86015d28455b4a2329` // string | ID of the campaign template to use for generation. # string | ID of the campaign template to use for generation.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.StartGenerateCampaignTemplate(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.StartGenerateCampaignTemplate(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.StartGenerateCampaignTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartGenerateCampaignTemplate`: CampaignReference
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.StartGenerateCampaignTemplate`: %v\n", resp)
|
|
}
|
|
- path: /campaigns/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-campaigns#update-campaign
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808571bcfcf80171c23e4b4221fc` // string | ID of the campaign template being modified. # string | ID of the campaign template being modified.
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/name, value=This field has been updated!}, {op=copy, from=/name, path=/description}]`) // []JsonPatchOperation | A list of campaign update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The fields that can be patched differ based on the status of the campaign. When the campaign is in the *STAGED* status, you can patch these fields: * name * description * recommendationsEnabled * deadline * emailNotificationEnabled * autoRevokeAllowed When the campaign is in the *ACTIVE* status, you can patch these fields: * deadline
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationCampaignsAPI.UpdateCampaign(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationCampaignsAPI.UpdateCampaign(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationCampaignsAPI.UpdateCampaign``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateCampaign`: SlimCampaign
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationCampaignsAPI.UpdateCampaign`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/access-summaries/{type}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-summaries#get-identity-access-summaries
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The identity campaign certification ID # string | The identity campaign certification ID
|
|
type_ := `ACCESS_PROFILE` // string | The type of access review item to retrieve summaries for # string | The type of access review item to retrieve summaries for
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `access.id eq "ef38f94347e94562b5bb8424a56397d8"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **completed**: *eq, ne* **access.id**: *eq, in* **access.name**: *eq, sw* **entitlement.sourceName**: *eq, sw* **accessProfile.sourceName**: *eq, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **completed**: *eq, ne* **access.id**: *eq, in* **access.name**: *eq, sw* **entitlement.sourceName**: *eq, sw* **accessProfile.sourceName**: *eq, sw* (optional)
|
|
sorters := `access.name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **access.name** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **access.name** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationSummariesAPI.GetIdentityAccessSummaries(context.Background(), id, type_).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationSummariesAPI.GetIdentityAccessSummaries(context.Background(), id, type_).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationSummariesAPI.GetIdentityAccessSummaries``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetIdentityAccessSummaries`: []AccessSummary
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationSummariesAPI.GetIdentityAccessSummaries`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/decision-summary
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-summaries#get-identity-decision-summary
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The certification ID # string | The certification ID
|
|
filters := `identitySummary.id eq "ef38f94347e94562b5bb8424a56397d8"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **identitySummary.id**: *eq, in* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **identitySummary.id**: *eq, in* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationSummariesAPI.GetIdentityDecisionSummary(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationSummariesAPI.GetIdentityDecisionSummary(context.Background(), id).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationSummariesAPI.GetIdentityDecisionSummary``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetIdentityDecisionSummary`: IdentityCertDecisionSummary
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationSummariesAPI.GetIdentityDecisionSummary`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/identity-summaries
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-summaries#get-identity-summaries
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The identity campaign certification ID # string | The identity campaign certification ID
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `id eq "ef38f94347e94562b5bb8424a56397d8"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **completed**: *eq, ne* **name**: *eq, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **completed**: *eq, ne* **name**: *eq, sw* (optional)
|
|
sorters := `name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationSummariesAPI.GetIdentitySummaries(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationSummariesAPI.GetIdentitySummaries(context.Background(), id).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationSummariesAPI.GetIdentitySummaries``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetIdentitySummaries`: []CertificationIdentitySummary
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationSummariesAPI.GetIdentitySummaries`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/identity-summaries/{identitySummaryId}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certification-summaries#get-identity-summary
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The identity campaign certification ID # string | The identity campaign certification ID
|
|
identitySummaryId := `2c91808772a504f50172a9540e501ba8` // string | The identity summary ID # string | The identity summary ID
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationSummariesAPI.GetIdentitySummary(context.Background(), id, identitySummaryId).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationSummariesAPI.GetIdentitySummary(context.Background(), id, identitySummaryId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationSummariesAPI.GetIdentitySummary``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetIdentitySummary`: CertificationIdentitySummary
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationSummariesAPI.GetIdentitySummary`: %v\n", resp)
|
|
}
|
|
- path: /certification-tasks/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#get-certification-task
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `63b32151-26c0-42f4-9299-8898dc1c9daa` // string | The task ID # string | The task ID
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.GetCertificationTask(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.GetCertificationTask(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.GetCertificationTask``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCertificationTask`: CertificationTask
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.GetCertificationTask`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#get-identity-certification
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The certification id # string | The certification id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.GetIdentityCertification(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.GetIdentityCertification(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.GetIdentityCertification``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetIdentityCertification`: IdentityCertificationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.GetIdentityCertification`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{certificationId}/access-review-items/{itemId}/permissions
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#get-identity-certification-item-permissions
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
certificationId := `ef38f94347e94562b5bb8424a56397d8` // string | The certification ID # string | The certification ID
|
|
itemId := `2c91808671bcbab40171bd945d961227` // string | The certification item ID # string | The certification item ID
|
|
filters := `target eq "SYS.OBJAUTH2"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **target**: *eq, sw* **rights**: *ca* Supported composite operators: *and, or* All field values (second filter operands) are case-insensitive for this API. Only a single *and* or *or* composite filter operator may be used. It must also be used between a target filter and a rights filter, not between 2 filters for the same field. For example, the following is valid: `?filters=rights+ca+(%22CREATE%22)+and+target+eq+%22SYS.OBJAUTH2%22` The following is invalid: 1?filters=rights+ca+(%22CREATE%22)+and+rights+ca+(%SELECT%22)1 (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **target**: *eq, sw* **rights**: *ca* Supported composite operators: *and, or* All field values (second filter operands) are case-insensitive for this API. Only a single *and* or *or* composite filter operator may be used. It must also be used between a target filter and a rights filter, not between 2 filters for the same field. For example, the following is valid: `?filters=rights+ca+(%22CREATE%22)+and+target+eq+%22SYS.OBJAUTH2%22` The following is invalid: 1?filters=rights+ca+(%22CREATE%22)+and+rights+ca+(%SELECT%22)1 (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.GetIdentityCertificationItemPermissions(context.Background(), certificationId, itemId).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.GetIdentityCertificationItemPermissions(context.Background(), certificationId, itemId).Filters(filters).Limit(limit).Offset(offset).Count(count).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.GetIdentityCertificationItemPermissions``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetIdentityCertificationItemPermissions`: []PermissionDto
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.GetIdentityCertificationItemPermissions`: %v\n", resp)
|
|
}
|
|
- path: /certification-tasks
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#get-pending-certification-tasks
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
reviewerIdentity := `Ada.1de82e55078344` // string | The ID of reviewer identity. *me* indicates the current user. (optional) # string | The ID of reviewer identity. *me* indicates the current user. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `type eq "ADMIN_REASSIGN"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **targetId**: *eq, in* **type**: *eq, in* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **targetId**: *eq, in* **type**: *eq, in* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.GetPendingCertificationTasks(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.GetPendingCertificationTasks(context.Background()).ReviewerIdentity(reviewerIdentity).Limit(limit).Offset(offset).Count(count).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.GetPendingCertificationTasks``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetPendingCertificationTasks`: []CertificationTask
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.GetPendingCertificationTasks`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/reviewers
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#list-certification-reviewers
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The certification ID # string | The certification ID
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `name eq "Bob"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **email**: *eq, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **email**: *eq, sw* (optional)
|
|
sorters := `name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, email** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, email** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.ListCertificationReviewers(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.ListCertificationReviewers(context.Background(), id).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.ListCertificationReviewers``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListCertificationReviewers`: []IdentityReferenceWithNameAndEmail
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.ListCertificationReviewers`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/access-review-items
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#list-identity-access-review-items
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The identity campaign certification ID # string | The identity campaign certification ID
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `id eq "ef38f94347e94562b5bb8424a56397d8"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **type**: *eq* **access.type**: *eq* **completed**: *eq, ne* **identitySummary.id**: *eq, in* **identitySummary.name**: *eq, sw* **access.id**: *eq, in* **access.name**: *eq, sw* **entitlement.sourceName**: *eq, sw* **accessProfile.sourceName**: *eq, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **type**: *eq* **access.type**: *eq* **completed**: *eq, ne* **identitySummary.id**: *eq, in* **identitySummary.name**: *eq, sw* **access.id**: *eq, in* **access.name**: *eq, sw* **entitlement.sourceName**: *eq, sw* **accessProfile.sourceName**: *eq, sw* (optional)
|
|
sorters := `access.name,-accessProfile.sourceName` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **identitySummary.name, access.name, access.type, entitlement.sourceName, accessProfile.sourceName** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **identitySummary.name, access.name, access.type, entitlement.sourceName, accessProfile.sourceName** (optional)
|
|
entitlements := `identityEntitlement` // string | Filter results to view access review items that pertain to any of the specified comma-separated entitlement IDs. An error will occur if this param is used with **access-profiles** or **roles** as only one of these query params can be used at a time. (optional) # string | Filter results to view access review items that pertain to any of the specified comma-separated entitlement IDs. An error will occur if this param is used with **access-profiles** or **roles** as only one of these query params can be used at a time. (optional)
|
|
accessProfiles := `accessProfile1` // string | Filter results to view access review items that pertain to any of the specified comma-separated access-profle IDs. An error will occur if this param is used with **entitlements** or **roles** as only one of these query params can be used at a time. (optional) # string | Filter results to view access review items that pertain to any of the specified comma-separated access-profle IDs. An error will occur if this param is used with **entitlements** or **roles** as only one of these query params can be used at a time. (optional)
|
|
roles := `userRole` // string | Filter results to view access review items that pertain to any of the specified comma-separated role IDs. An error will occur if this param is used with **entitlements** or **access-profiles** as only one of these query params can be used at a time. (optional) # string | Filter results to view access review items that pertain to any of the specified comma-separated role IDs. An error will occur if this param is used with **entitlements** or **access-profiles** as only one of these query params can be used at a time. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.ListIdentityAccessReviewItems(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.ListIdentityAccessReviewItems(context.Background(), id).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Entitlements(entitlements).AccessProfiles(accessProfiles).Roles(roles).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.ListIdentityAccessReviewItems``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListIdentityAccessReviewItems`: []AccessReviewItem
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.ListIdentityAccessReviewItems`: %v\n", resp)
|
|
}
|
|
- path: /certifications
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#list-identity-certifications
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
reviewerIdentity := `me` // string | Reviewer's identity. *me* indicates the current user. (optional) # string | Reviewer's identity. *me* indicates the current user. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `id eq "ef38f94347e94562b5bb8424a56397d8"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **campaign.id**: *eq, in* **phase**: *eq* **completed**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **campaign.id**: *eq, in* **phase**: *eq* **completed**: *eq* (optional)
|
|
sorters := `name,due` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, due, signed** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, due, signed** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.ListIdentityCertifications(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.ListIdentityCertifications(context.Background()).ReviewerIdentity(reviewerIdentity).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.ListIdentityCertifications``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListIdentityCertifications`: []IdentityCertificationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.ListIdentityCertifications`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/decide
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#make-identity-decision
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the identity campaign certification on which to make decisions # string | The ID of the identity campaign certification on which to make decisions
|
|
reviewdecision := []byte(`[{id=ef38f94347e94562b5bb8424a56396b5, decision=APPROVE, bulk=true, comments=This user still needs access to this source.}, {id=ef38f94347e94562b5bb8424a56397d8, decision=APPROVE, bulk=true, comments=This user still needs access to this source too.}]`) // []ReviewDecision | A non-empty array of decisions to be made.
|
|
|
|
|
|
var reviewDecision []v3.ReviewDecision
|
|
if err := json.Unmarshal(reviewdecision, &reviewDecision); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.MakeIdentityDecision(context.Background(), id).ReviewDecision(reviewDecision).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.MakeIdentityDecision(context.Background(), id).ReviewDecision(reviewDecision).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.MakeIdentityDecision``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `MakeIdentityDecision`: IdentityCertificationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.MakeIdentityDecision`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/reassign
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#reassign-identity-certifications
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The identity campaign certification ID # string | The identity campaign certification ID
|
|
reviewreassign := []byte(`{
|
|
"reason" : "reassigned for some reason",
|
|
"reassignTo" : "ef38f94347e94562b5bb8424a56397d8",
|
|
"reassign" : [ {
|
|
"id" : "ef38f94347e94562b5bb8424a56397d8",
|
|
"type" : "ITEM"
|
|
}, {
|
|
"id" : "ef38f94347e94562b5bb8424a56397d8",
|
|
"type" : "ITEM"
|
|
} ]
|
|
}`) // ReviewReassign |
|
|
|
|
|
|
var reviewReassign v3.ReviewReassign
|
|
if err := json.Unmarshal(reviewreassign, &reviewReassign); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.ReassignIdentityCertifications(context.Background(), id).ReviewReassign(reviewReassign).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.ReassignIdentityCertifications(context.Background(), id).ReviewReassign(reviewReassign).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.ReassignIdentityCertifications``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ReassignIdentityCertifications`: IdentityCertificationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.ReassignIdentityCertifications`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/sign-off
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#sign-off-identity-certification
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The identity campaign certification ID # string | The identity campaign certification ID
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.SignOffIdentityCertification(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.SignOffIdentityCertification(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.SignOffIdentityCertification``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SignOffIdentityCertification`: IdentityCertificationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.SignOffIdentityCertification`: %v\n", resp)
|
|
}
|
|
- path: /certifications/{id}/reassign-async
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/certifications#submit-reassign-certs-async
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The identity campaign certification ID # string | The identity campaign certification ID
|
|
reviewreassign := []byte(`{
|
|
"reason" : "reassigned for some reason",
|
|
"reassignTo" : "ef38f94347e94562b5bb8424a56397d8",
|
|
"reassign" : [ {
|
|
"id" : "ef38f94347e94562b5bb8424a56397d8",
|
|
"type" : "ITEM"
|
|
}, {
|
|
"id" : "ef38f94347e94562b5bb8424a56397d8",
|
|
"type" : "ITEM"
|
|
} ]
|
|
}`) // ReviewReassign |
|
|
|
|
|
|
var reviewReassign v3.ReviewReassign
|
|
if err := json.Unmarshal(reviewreassign, &reviewReassign); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.CertificationsAPI.SubmitReassignCertsAsync(context.Background(), id).ReviewReassign(reviewReassign).Execute()
|
|
//resp, r, err := apiClient.V3.CertificationsAPI.SubmitReassignCertsAsync(context.Background(), id).ReviewReassign(reviewReassign).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `CertificationsAPI.SubmitReassignCertsAsync``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SubmitReassignCertsAsync`: CertificationTask
|
|
fmt.Fprintf(os.Stdout, "Response from `CertificationsAPI.SubmitReassignCertsAsync`: %v\n", resp)
|
|
}
|
|
- path: /configuration-hub/object-mappings/{sourceOrg}
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/configuration-hub#create-object-mapping
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceOrg := `source-org` // string | The name of the source org. # string | The name of the source org.
|
|
objectmappingrequest := []byte(`{
|
|
"targetValue" : "My New Governance Group Name",
|
|
"jsonPath" : "$.name",
|
|
"sourceValue" : "My Governance Group Name",
|
|
"enabled" : false,
|
|
"objectType" : "IDENTITY"
|
|
}`) // ObjectMappingRequest | The object mapping request body.
|
|
|
|
|
|
var objectMappingRequest v3.ObjectMappingRequest
|
|
if err := json.Unmarshal(objectmappingrequest, &objectMappingRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConfigurationHubAPI.CreateObjectMapping(context.Background(), sourceOrg).ObjectMappingRequest(objectMappingRequest).Execute()
|
|
//resp, r, err := apiClient.V3.ConfigurationHubAPI.CreateObjectMapping(context.Background(), sourceOrg).ObjectMappingRequest(objectMappingRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationHubAPI.CreateObjectMapping``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateObjectMapping`: ObjectMappingResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `ConfigurationHubAPI.CreateObjectMapping`: %v\n", resp)
|
|
}
|
|
- path: /configuration-hub/object-mappings/{sourceOrg}/bulk-create
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/configuration-hub#create-object-mappings
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceOrg := `source-org` // string | The name of the source org. # string | The name of the source org.
|
|
objectmappingbulkcreaterequest := []byte(`{
|
|
"newObjectsMappings" : [ {
|
|
"targetValue" : "My New Governance Group Name",
|
|
"jsonPath" : "$.name",
|
|
"sourceValue" : "My Governance Group Name",
|
|
"enabled" : false,
|
|
"objectType" : "IDENTITY"
|
|
}, {
|
|
"targetValue" : "My New Governance Group Name",
|
|
"jsonPath" : "$.name",
|
|
"sourceValue" : "My Governance Group Name",
|
|
"enabled" : false,
|
|
"objectType" : "IDENTITY"
|
|
} ]
|
|
}`) // ObjectMappingBulkCreateRequest | The bulk create object mapping request body.
|
|
|
|
|
|
var objectMappingBulkCreateRequest v3.ObjectMappingBulkCreateRequest
|
|
if err := json.Unmarshal(objectmappingbulkcreaterequest, &objectMappingBulkCreateRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConfigurationHubAPI.CreateObjectMappings(context.Background(), sourceOrg).ObjectMappingBulkCreateRequest(objectMappingBulkCreateRequest).Execute()
|
|
//resp, r, err := apiClient.V3.ConfigurationHubAPI.CreateObjectMappings(context.Background(), sourceOrg).ObjectMappingBulkCreateRequest(objectMappingBulkCreateRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationHubAPI.CreateObjectMappings``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateObjectMappings`: ObjectMappingBulkCreateResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `ConfigurationHubAPI.CreateObjectMappings`: %v\n", resp)
|
|
}
|
|
- path: /configuration-hub/backups/uploads
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/configuration-hub#create-uploaded-configuration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
data := BINARY_DATA_HERE // *os.File | JSON file containing the objects to be imported. # *os.File | JSON file containing the objects to be imported.
|
|
name := `name_example` // string | Name that will be assigned to the uploaded configuration file. # string | Name that will be assigned to the uploaded configuration file.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConfigurationHubAPI.CreateUploadedConfiguration(context.Background()).Data(data).Name(name).Execute()
|
|
//resp, r, err := apiClient.V3.ConfigurationHubAPI.CreateUploadedConfiguration(context.Background()).Data(data).Name(name).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationHubAPI.CreateUploadedConfiguration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateUploadedConfiguration`: BackupResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `ConfigurationHubAPI.CreateUploadedConfiguration`: %v\n", resp)
|
|
}
|
|
- path: /configuration-hub/object-mappings/{sourceOrg}/{objectMappingId}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/configuration-hub#delete-object-mapping
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceOrg := `source-org` // string | The name of the source org. # string | The name of the source org.
|
|
objectMappingId := `3d6e0144-963f-4bd6-8d8d-d77b4e507ce4` // string | The id of the object mapping to be deleted. # string | The id of the object mapping to be deleted.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ConfigurationHubAPI.DeleteObjectMapping(context.Background(), sourceOrg, objectMappingId).Execute()
|
|
//r, err := apiClient.V3.ConfigurationHubAPI.DeleteObjectMapping(context.Background(), sourceOrg, objectMappingId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationHubAPI.DeleteObjectMapping``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /configuration-hub/backups/uploads/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/configuration-hub#delete-uploaded-configuration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `3d0fe04b-57df-4a46-a83b-8f04b0f9d10b` // string | The id of the uploaded configuration. # string | The id of the uploaded configuration.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ConfigurationHubAPI.DeleteUploadedConfiguration(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.ConfigurationHubAPI.DeleteUploadedConfiguration(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationHubAPI.DeleteUploadedConfiguration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /configuration-hub/object-mappings/{sourceOrg}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/configuration-hub#get-object-mappings
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceOrg := `source-org` // string | The name of the source org. # string | The name of the source org.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConfigurationHubAPI.GetObjectMappings(context.Background(), sourceOrg).Execute()
|
|
//resp, r, err := apiClient.V3.ConfigurationHubAPI.GetObjectMappings(context.Background(), sourceOrg).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationHubAPI.GetObjectMappings``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetObjectMappings`: []ObjectMappingResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `ConfigurationHubAPI.GetObjectMappings`: %v\n", resp)
|
|
}
|
|
- path: /configuration-hub/backups/uploads/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/configuration-hub#get-uploaded-configuration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `3d0fe04b-57df-4a46-a83b-8f04b0f9d10b` // string | The id of the uploaded configuration. # string | The id of the uploaded configuration.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConfigurationHubAPI.GetUploadedConfiguration(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.ConfigurationHubAPI.GetUploadedConfiguration(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationHubAPI.GetUploadedConfiguration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetUploadedConfiguration`: BackupResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `ConfigurationHubAPI.GetUploadedConfiguration`: %v\n", resp)
|
|
}
|
|
- path: /configuration-hub/backups/uploads
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/configuration-hub#list-uploaded-configurations
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
filters := `status eq "COMPLETE"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **status**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **status**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConfigurationHubAPI.ListUploadedConfigurations(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ConfigurationHubAPI.ListUploadedConfigurations(context.Background()).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationHubAPI.ListUploadedConfigurations``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListUploadedConfigurations`: []BackupResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `ConfigurationHubAPI.ListUploadedConfigurations`: %v\n", resp)
|
|
}
|
|
- path: /configuration-hub/object-mappings/{sourceOrg}/bulk-patch
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/configuration-hub#update-object-mappings
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceOrg := `source-org` // string | The name of the source org. # string | The name of the source org.
|
|
objectmappingbulkpatchrequest := []byte(`{
|
|
"patches" : {
|
|
"603b1a61-d03d-4ed1-864f-a508fbd1995d" : [ {
|
|
"op" : "replace",
|
|
"path" : "/enabled",
|
|
"value" : true
|
|
} ],
|
|
"00bece34-f50d-4227-8878-76f620b5a971" : [ {
|
|
"op" : "replace",
|
|
"path" : "/targetValue",
|
|
"value" : "New Target Value"
|
|
} ]
|
|
}
|
|
}`) // ObjectMappingBulkPatchRequest | The object mapping request body.
|
|
|
|
|
|
var objectMappingBulkPatchRequest v3.ObjectMappingBulkPatchRequest
|
|
if err := json.Unmarshal(objectmappingbulkpatchrequest, &objectMappingBulkPatchRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConfigurationHubAPI.UpdateObjectMappings(context.Background(), sourceOrg).ObjectMappingBulkPatchRequest(objectMappingBulkPatchRequest).Execute()
|
|
//resp, r, err := apiClient.V3.ConfigurationHubAPI.UpdateObjectMappings(context.Background(), sourceOrg).ObjectMappingBulkPatchRequest(objectMappingBulkPatchRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConfigurationHubAPI.UpdateObjectMappings``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateObjectMappings`: ObjectMappingBulkPatchResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `ConfigurationHubAPI.UpdateObjectMappings`: %v\n", resp)
|
|
}
|
|
- path: /connectors
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#create-custom-connector
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
v3createconnectordto := []byte(`{
|
|
"name" : "custom connector",
|
|
"directConnect" : true,
|
|
"className" : "sailpoint.connector.OpenConnectorAdapter",
|
|
"type" : "custom connector type",
|
|
"status" : "RELEASED"
|
|
}`) // V3CreateConnectorDto |
|
|
|
|
|
|
var v3CreateConnectorDto v3.V3CreateConnectorDto
|
|
if err := json.Unmarshal(v3createconnectordto, &v3CreateConnectorDto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.CreateCustomConnector(context.Background()).V3CreateConnectorDto(v3CreateConnectorDto).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.CreateCustomConnector(context.Background()).V3CreateConnectorDto(v3CreateConnectorDto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.CreateCustomConnector``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateCustomConnector`: V3ConnectorDto
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.CreateCustomConnector`: %v\n", resp)
|
|
}
|
|
- path: /connectors/{scriptName}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#delete-custom-connector
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation. # string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ConnectorsAPI.DeleteCustomConnector(context.Background(), scriptName).Execute()
|
|
//r, err := apiClient.V3.ConnectorsAPI.DeleteCustomConnector(context.Background(), scriptName).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.DeleteCustomConnector``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /connectors/{scriptName}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#get-connector
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation. # string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation.
|
|
locale := `de` // string | The locale to apply to the config. If no viable locale is given, it will default to \"en\" (optional) # string | The locale to apply to the config. If no viable locale is given, it will default to \"en\" (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.GetConnector(context.Background(), scriptName).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.GetConnector(context.Background(), scriptName).Locale(locale).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.GetConnector``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetConnector`: ConnectorDetail
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.GetConnector`: %v\n", resp)
|
|
}
|
|
- path: /connectors
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#get-connector-list
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
filters := `directConnect eq "true"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **name**: *sw, co* **type**: *sw, co, eq* **directConnect**: *eq* **category**: *eq* **features**: *ca* **labels**: *ca* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **name**: *sw, co* **type**: *sw, co, eq* **directConnect**: *eq* **category**: *eq* **features**: *ca* **labels**: *ca* (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
locale := `de` // string | The locale to apply to the config. If no viable locale is given, it will default to \"en\" (optional) # string | The locale to apply to the config. If no viable locale is given, it will default to \"en\" (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.GetConnectorList(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.GetConnectorList(context.Background()).Filters(filters).Limit(limit).Offset(offset).Count(count).Locale(locale).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.GetConnectorList``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetConnectorList`: []V3ConnectorDto
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.GetConnectorList`: %v\n", resp)
|
|
}
|
|
- path: /connectors/{scriptName}/source-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#get-connector-source-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation. # string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.GetConnectorSourceConfig(context.Background(), scriptName).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.GetConnectorSourceConfig(context.Background(), scriptName).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.GetConnectorSourceConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetConnectorSourceConfig`: string
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.GetConnectorSourceConfig`: %v\n", resp)
|
|
}
|
|
- path: /connectors/{scriptName}/source-template
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#get-connector-source-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation. # string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.GetConnectorSourceTemplate(context.Background(), scriptName).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.GetConnectorSourceTemplate(context.Background(), scriptName).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.GetConnectorSourceTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetConnectorSourceTemplate`: string
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.GetConnectorSourceTemplate`: %v\n", resp)
|
|
}
|
|
- path: /connectors/{scriptName}/translations/{locale}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#get-connector-translations
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the connector. Scriptname is the unique id generated at connector creation. # string | The scriptName value of the connector. Scriptname is the unique id generated at connector creation.
|
|
locale := `de` // string | The locale to apply to the config. If no viable locale is given, it will default to \"en\" # string | The locale to apply to the config. If no viable locale is given, it will default to \"en\"
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.GetConnectorTranslations(context.Background(), scriptName, locale).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.GetConnectorTranslations(context.Background(), scriptName, locale).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.GetConnectorTranslations``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetConnectorTranslations`: string
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.GetConnectorTranslations`: %v\n", resp)
|
|
}
|
|
- path: /connectors/{scriptName}/source-config
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#put-connector-source-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation. # string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation.
|
|
file := BINARY_DATA_HERE // *os.File | connector source config xml file # *os.File | connector source config xml file
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.PutConnectorSourceConfig(context.Background(), scriptName).File(file).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.PutConnectorSourceConfig(context.Background(), scriptName).File(file).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.PutConnectorSourceConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutConnectorSourceConfig`: UpdateDetail
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.PutConnectorSourceConfig`: %v\n", resp)
|
|
}
|
|
- path: /connectors/{scriptName}/source-template
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#put-connector-source-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation. # string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation.
|
|
file := BINARY_DATA_HERE // *os.File | connector source template xml file # *os.File | connector source template xml file
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.PutConnectorSourceTemplate(context.Background(), scriptName).File(file).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.PutConnectorSourceTemplate(context.Background(), scriptName).File(file).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.PutConnectorSourceTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutConnectorSourceTemplate`: UpdateDetail
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.PutConnectorSourceTemplate`: %v\n", resp)
|
|
}
|
|
- path: /connectors/{scriptName}/translations/{locale}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#put-connector-translations
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the connector. Scriptname is the unique id generated at connector creation. # string | The scriptName value of the connector. Scriptname is the unique id generated at connector creation.
|
|
locale := `de` // string | The locale to apply to the config. If no viable locale is given, it will default to \"en\" # string | The locale to apply to the config. If no viable locale is given, it will default to \"en\"
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.PutConnectorTranslations(context.Background(), scriptName, locale).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.PutConnectorTranslations(context.Background(), scriptName, locale).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.PutConnectorTranslations``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutConnectorTranslations`: UpdateDetail
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.PutConnectorTranslations`: %v\n", resp)
|
|
}
|
|
- path: /connectors/{scriptName}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/connectors#update-connector
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation. # string | The scriptName value of the connector. ScriptName is the unique id generated at connector creation.
|
|
jsonpatchoperation := []byte(``) // []JsonPatchOperation | A list of connector detail update operations
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ConnectorsAPI.UpdateConnector(context.Background(), scriptName).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.ConnectorsAPI.UpdateConnector(context.Background(), scriptName).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ConnectorsAPI.UpdateConnector``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateConnector`: ConnectorDetail
|
|
fmt.Fprintf(os.Stdout, "Response from `ConnectorsAPI.UpdateConnector`: %v\n", resp)
|
|
}
|
|
- path: /auth-org/network-config
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/global-tenant-security-settings#create-auth-org-network-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
networkconfiguration := []byte(`{
|
|
"range" : [ "1.3.7.2", "255.255.255.252/30" ],
|
|
"whitelisted" : true,
|
|
"geolocation" : [ "CA", "FR", "HT" ]
|
|
}`) // NetworkConfiguration | Network configuration creation request body. The following constraints ensure the request body conforms to certain logical guidelines, which are: 1. Each string element in the range array must be a valid ip address or ip subnet mask. 2. Each string element in the geolocation array must be 2 characters, and they can only be uppercase letters.
|
|
|
|
|
|
var networkConfiguration v3.NetworkConfiguration
|
|
if err := json.Unmarshal(networkconfiguration, &networkConfiguration); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.CreateAuthOrgNetworkConfig(context.Background()).NetworkConfiguration(networkConfiguration).Execute()
|
|
//resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.CreateAuthOrgNetworkConfig(context.Background()).NetworkConfiguration(networkConfiguration).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `GlobalTenantSecuritySettingsAPI.CreateAuthOrgNetworkConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateAuthOrgNetworkConfig`: NetworkConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `GlobalTenantSecuritySettingsAPI.CreateAuthOrgNetworkConfig`: %v\n", resp)
|
|
}
|
|
- path: /auth-org/lockout-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/global-tenant-security-settings#get-auth-org-lockout-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.GetAuthOrgLockoutConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.GetAuthOrgLockoutConfig(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `GlobalTenantSecuritySettingsAPI.GetAuthOrgLockoutConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAuthOrgLockoutConfig`: LockoutConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `GlobalTenantSecuritySettingsAPI.GetAuthOrgLockoutConfig`: %v\n", resp)
|
|
}
|
|
- path: /auth-org/network-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/global-tenant-security-settings#get-auth-org-network-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.GetAuthOrgNetworkConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.GetAuthOrgNetworkConfig(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `GlobalTenantSecuritySettingsAPI.GetAuthOrgNetworkConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAuthOrgNetworkConfig`: NetworkConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `GlobalTenantSecuritySettingsAPI.GetAuthOrgNetworkConfig`: %v\n", resp)
|
|
}
|
|
- path: /auth-org/service-provider-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/global-tenant-security-settings#get-auth-org-service-provider-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.GetAuthOrgServiceProviderConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.GetAuthOrgServiceProviderConfig(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `GlobalTenantSecuritySettingsAPI.GetAuthOrgServiceProviderConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAuthOrgServiceProviderConfig`: ServiceProviderConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `GlobalTenantSecuritySettingsAPI.GetAuthOrgServiceProviderConfig`: %v\n", resp)
|
|
}
|
|
- path: /auth-org/session-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/global-tenant-security-settings#get-auth-org-session-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.GetAuthOrgSessionConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.GetAuthOrgSessionConfig(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `GlobalTenantSecuritySettingsAPI.GetAuthOrgSessionConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetAuthOrgSessionConfig`: SessionConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `GlobalTenantSecuritySettingsAPI.GetAuthOrgSessionConfig`: %v\n", resp)
|
|
}
|
|
- path: /auth-org/lockout-config
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/global-tenant-security-settings#patch-auth-org-lockout-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/maximumAttempts, value=7,}, {op=add, path=/lockoutDuration, value=35}]`) // []JsonPatchOperation | A list of auth org lockout configuration update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Ensures that the patched Lockout Config conforms to certain logical guidelines, which are: `1. maximumAttempts >= 1 && maximumAttempts <= 15 2. lockoutDuration >= 5 && lockoutDuration <= 60 3. lockoutWindow >= 5 && lockoutDuration <= 60`
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.PatchAuthOrgLockoutConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.PatchAuthOrgLockoutConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `GlobalTenantSecuritySettingsAPI.PatchAuthOrgLockoutConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchAuthOrgLockoutConfig`: LockoutConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `GlobalTenantSecuritySettingsAPI.PatchAuthOrgLockoutConfig`: %v\n", resp)
|
|
}
|
|
- path: /auth-org/network-config
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/global-tenant-security-settings#patch-auth-org-network-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/whitelisted, value=false,}, {op=add, path=/geolocation, value=[AF, HN, ES]}]`) // []JsonPatchOperation | A list of auth org network configuration update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Ensures that the patched Network Config conforms to certain logical guidelines, which are: 1. Each string element in the range array must be a valid ip address or ip subnet mask. 2. Each string element in the geolocation array must be 2 characters, and they can only be uppercase letters.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.PatchAuthOrgNetworkConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.PatchAuthOrgNetworkConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `GlobalTenantSecuritySettingsAPI.PatchAuthOrgNetworkConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchAuthOrgNetworkConfig`: NetworkConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `GlobalTenantSecuritySettingsAPI.PatchAuthOrgNetworkConfig`: %v\n", resp)
|
|
}
|
|
- path: /auth-org/service-provider-config
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/global-tenant-security-settings#patch-auth-org-service-provider-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/enabled, value=true,}, {op=add, path=/federationProtocolDetails/0/jitConfiguration, value={enabled=true, sourceId=2c9180857377ed2901739c12a2da5ac8, sourceAttributeMappings={firstName=okta.firstName, lastName=okta.lastName, email=okta.email, employeeNumber=okta.employeeNumber}}}]`) // []JsonPatchOperation | A list of auth org service provider configuration update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Note: /federationProtocolDetails/0 is IdpDetails /federationProtocolDetails/1 is SpDetails Ensures that the patched ServiceProviderConfig conforms to certain logical guidelines, which are: 1. Do not add or remove any elements in the federation protocol details in the service provider configuration. 2. Do not modify, add, or delete the service provider details element in the federation protocol details. 3. If this is the first time the patched ServiceProviderConfig enables Remote IDP sign-in, it must also include IDPDetails. 4. If the patch enables Remote IDP sign in, the entityID in the IDPDetails cannot be null. IDPDetails must include an entityID. 5. Any JIT configuration update must be valid. Just in time configuration update must be valid when enabled. This includes: - A Source ID - Source attribute mappings - Source attribute maps have all the required key values (firstName, lastName, email)
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.PatchAuthOrgServiceProviderConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.PatchAuthOrgServiceProviderConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `GlobalTenantSecuritySettingsAPI.PatchAuthOrgServiceProviderConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchAuthOrgServiceProviderConfig`: ServiceProviderConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `GlobalTenantSecuritySettingsAPI.PatchAuthOrgServiceProviderConfig`: %v\n", resp)
|
|
}
|
|
- path: /auth-org/session-config
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/global-tenant-security-settings#patch-auth-org-session-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/rememberMe, value=true,}, {op=add, path=/maxSessionTime, value=480}]`) // []JsonPatchOperation | A list of auth org session configuration update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Ensures that the patched Session Config conforms to certain logical guidelines, which are: `1. maxSessionTime >= 1 && maxSessionTime <= 10080 (1 week) 2. maxIdleTime >= 1 && maxIdleTime <= 1440 (1 day) 3. maxSessionTime must have a greater duration than maxIdleTime.`
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.PatchAuthOrgSessionConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.GlobalTenantSecuritySettingsAPI.PatchAuthOrgSessionConfig(context.Background()).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `GlobalTenantSecuritySettingsAPI.PatchAuthOrgSessionConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchAuthOrgSessionConfig`: SessionConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `GlobalTenantSecuritySettingsAPI.PatchAuthOrgSessionConfig`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#create-identity-profile
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityprofile := []byte(`{
|
|
"owner" : {
|
|
"name" : "William Wilson",
|
|
"id" : "2c9180835d191a86015d28455b4b232a",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"identityExceptionReportReference" : {
|
|
"reportName" : "My annual report",
|
|
"taskResultId" : "2b838de9-db9b-abcf-e646-d4f274ad4238"
|
|
},
|
|
"authoritativeSource" : {
|
|
"name" : "HR Active Directory",
|
|
"id" : "2c9180835d191a86015d28455b4b232a",
|
|
"type" : "SOURCE"
|
|
},
|
|
"hasTimeBasedAttr" : true,
|
|
"created" : "2015-05-28T14:07:17Z",
|
|
"description" : "My custom flat file profile",
|
|
"identityRefreshRequired" : true,
|
|
"identityCount" : 8,
|
|
"priority" : 10,
|
|
"identityAttributeConfig" : {
|
|
"attributeTransforms" : [ {
|
|
"transformDefinition" : {
|
|
"attributes" : {
|
|
"attributeName" : "e-mail",
|
|
"sourceName" : "MySource",
|
|
"sourceId" : "2c9180877a826e68017a8c0b03da1a53"
|
|
},
|
|
"type" : "accountAttribute"
|
|
},
|
|
"identityAttributeName" : "email"
|
|
}, {
|
|
"transformDefinition" : {
|
|
"attributes" : {
|
|
"attributeName" : "e-mail",
|
|
"sourceName" : "MySource",
|
|
"sourceId" : "2c9180877a826e68017a8c0b03da1a53"
|
|
},
|
|
"type" : "accountAttribute"
|
|
},
|
|
"identityAttributeName" : "email"
|
|
} ],
|
|
"enabled" : true
|
|
},
|
|
"name" : "aName",
|
|
"modified" : "2015-05-28T14:07:17Z",
|
|
"id" : "id12345"
|
|
}`) // IdentityProfile |
|
|
|
|
|
|
var identityProfile v3.IdentityProfile
|
|
if err := json.Unmarshal(identityprofile, &identityProfile); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.CreateIdentityProfile(context.Background()).IdentityProfile(identityProfile).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.CreateIdentityProfile(context.Background()).IdentityProfile(identityProfile).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.CreateIdentityProfile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateIdentityProfile`: IdentityProfile
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.CreateIdentityProfile`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#delete-identity-profile
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `ef38f94347e94562b5bb8424a56397d8` // string | Identity profile ID. # string | Identity profile ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.DeleteIdentityProfile(context.Background(), identityProfileId).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.DeleteIdentityProfile(context.Background(), identityProfileId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.DeleteIdentityProfile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteIdentityProfile`: TaskResultSimplified
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.DeleteIdentityProfile`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/bulk-delete
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#delete-identity-profiles
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
requestbody := []byte(``) // []string | Identity Profile bulk delete request body.
|
|
|
|
|
|
var requestBody []v3.RequestBody
|
|
if err := json.Unmarshal(requestbody, &requestBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.DeleteIdentityProfiles(context.Background()).RequestBody(requestBody).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.DeleteIdentityProfiles(context.Background()).RequestBody(requestBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.DeleteIdentityProfiles``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteIdentityProfiles`: TaskResultSimplified
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.DeleteIdentityProfiles`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/export
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#export-identity-profiles
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `id eq "ef38f94347e94562b5bb8424a56397d8"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, ne* **name**: *eq, ne* **priority**: *eq, ne* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, ne* **name**: *eq, ne* **priority**: *eq, ne* (optional)
|
|
sorters := `id,name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, priority** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, priority** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.ExportIdentityProfiles(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.ExportIdentityProfiles(context.Background()).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.ExportIdentityProfiles``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ExportIdentityProfiles`: []IdentityProfileExportedObject
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.ExportIdentityProfiles`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}/default-identity-attribute-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#get-default-identity-attribute-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `2b838de9-db9b-abcf-e646-d4f274ad4238` // string | The Identity Profile ID. # string | The Identity Profile ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.GetDefaultIdentityAttributeConfig(context.Background(), identityProfileId).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.GetDefaultIdentityAttributeConfig(context.Background(), identityProfileId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.GetDefaultIdentityAttributeConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetDefaultIdentityAttributeConfig`: IdentityAttributeConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.GetDefaultIdentityAttributeConfig`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#get-identity-profile
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `2b838de9-db9b-abcf-e646-d4f274ad4238` // string | Identity profile ID. # string | Identity profile ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.GetIdentityProfile(context.Background(), identityProfileId).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.GetIdentityProfile(context.Background(), identityProfileId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.GetIdentityProfile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetIdentityProfile`: IdentityProfile
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.GetIdentityProfile`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/import
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#import-identity-profiles
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityprofileexportedobject := []byte(``) // []IdentityProfileExportedObject | Previously exported Identity Profiles.
|
|
|
|
|
|
var identityProfileExportedObject []v3.IdentityProfileExportedObject
|
|
if err := json.Unmarshal(identityprofileexportedobject, &identityProfileExportedObject); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.ImportIdentityProfiles(context.Background()).IdentityProfileExportedObject(identityProfileExportedObject).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.ImportIdentityProfiles(context.Background()).IdentityProfileExportedObject(identityProfileExportedObject).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.ImportIdentityProfiles``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ImportIdentityProfiles`: ObjectImportResult
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.ImportIdentityProfiles`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#list-identity-profiles
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `id eq "ef38f94347e94562b5bb8424a56397d8"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, ne, ge, gt, in, le, sw* **name**: *eq, ne, ge, gt, in, le, sw* **priority**: *eq, ne* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, ne, ge, gt, in, le, sw* **name**: *eq, ne, ge, gt, in, le, sw* **priority**: *eq, ne* (optional)
|
|
sorters := `id,name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, priority, created, modified, owner.id, owner.name** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, priority, created, modified, owner.id, owner.name** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.ListIdentityProfiles(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.ListIdentityProfiles(context.Background()).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.ListIdentityProfiles``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListIdentityProfiles`: []IdentityProfile
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.ListIdentityProfiles`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/identity-preview
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#show-identity-preview
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identitypreviewrequest := []byte(`{
|
|
"identityId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
|
|
"identityAttributeConfig" : {
|
|
"attributeTransforms" : [ {
|
|
"transformDefinition" : {
|
|
"attributes" : {
|
|
"attributeName" : "e-mail",
|
|
"sourceName" : "MySource",
|
|
"sourceId" : "2c9180877a826e68017a8c0b03da1a53"
|
|
},
|
|
"type" : "accountAttribute"
|
|
},
|
|
"identityAttributeName" : "email"
|
|
}, {
|
|
"transformDefinition" : {
|
|
"attributes" : {
|
|
"attributeName" : "e-mail",
|
|
"sourceName" : "MySource",
|
|
"sourceId" : "2c9180877a826e68017a8c0b03da1a53"
|
|
},
|
|
"type" : "accountAttribute"
|
|
},
|
|
"identityAttributeName" : "email"
|
|
} ],
|
|
"enabled" : true
|
|
}
|
|
}`) // IdentityPreviewRequest | Identity Preview request body.
|
|
|
|
|
|
var identityPreviewRequest v3.IdentityPreviewRequest
|
|
if err := json.Unmarshal(identitypreviewrequest, &identityPreviewRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.ShowIdentityPreview(context.Background()).IdentityPreviewRequest(identityPreviewRequest).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.ShowIdentityPreview(context.Background()).IdentityPreviewRequest(identityPreviewRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.ShowIdentityPreview``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ShowIdentityPreview`: IdentityPreviewResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.ShowIdentityPreview`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}/process-identities
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#sync-identity-profile
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `ef38f94347e94562b5bb8424a56397d8` // string | The Identity Profile ID to be processed # string | The Identity Profile ID to be processed
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.SyncIdentityProfile(context.Background(), identityProfileId).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.SyncIdentityProfile(context.Background(), identityProfileId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.SyncIdentityProfile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SyncIdentityProfile`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.SyncIdentityProfile`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/identity-profiles#update-identity-profile
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `ef38f94347e94562b5bb8424a56397d8` // string | Identity profile ID. # string | Identity profile ID.
|
|
jsonpatchoperation := []byte(`[{op=add, path=/identityAttributeConfig/attributeTransforms/0, value={identityAttributeName=location, transformDefinition={type=accountAttribute, attributes={sourceName=Employees, attributeName=location, sourceId=2c91808878b7d63b0178c66ffcdc4ce4}}}}]`) // []JsonPatchOperation | List of identity profile update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.IdentityProfilesAPI.UpdateIdentityProfile(context.Background(), identityProfileId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.IdentityProfilesAPI.UpdateIdentityProfile(context.Background(), identityProfileId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `IdentityProfilesAPI.UpdateIdentityProfile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateIdentityProfile`: IdentityProfile
|
|
fmt.Fprintf(os.Stdout, "Response from `IdentityProfilesAPI.UpdateIdentityProfile`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}/lifecycle-states
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/lifecycle-states#create-lifecycle-state
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `2b838de9-db9b-abcf-e646-d4f274ad4238` // string | Identity profile ID. # string | Identity profile ID.
|
|
lifecyclestate := []byte(`{
|
|
"accessProfileIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ],
|
|
"emailNotificationOption" : {
|
|
"notifyManagers" : true,
|
|
"notifySpecificUsers" : true,
|
|
"emailAddressList" : [ "test@test.com", "test2@test.com" ],
|
|
"notifyAllAdmins" : true
|
|
},
|
|
"created" : "2015-05-28T14:07:17Z",
|
|
"name" : "aName",
|
|
"modified" : "2015-05-28T14:07:17Z",
|
|
"description" : "Lifecycle description",
|
|
"accountActions" : [ {
|
|
"action" : "ENABLE",
|
|
"sourceIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ]
|
|
}, {
|
|
"action" : "ENABLE",
|
|
"sourceIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ]
|
|
} ],
|
|
"id" : "id12345",
|
|
"identityCount" : 42,
|
|
"technicalName" : "Technical Name",
|
|
"identityState" : "identityState",
|
|
"enabled" : true
|
|
}`) // LifecycleState | Lifecycle state to be created.
|
|
|
|
|
|
var lifecycleState v3.LifecycleState
|
|
if err := json.Unmarshal(lifecyclestate, &lifecycleState); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.LifecycleStatesAPI.CreateLifecycleState(context.Background(), identityProfileId).LifecycleState(lifecycleState).Execute()
|
|
//resp, r, err := apiClient.V3.LifecycleStatesAPI.CreateLifecycleState(context.Background(), identityProfileId).LifecycleState(lifecycleState).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `LifecycleStatesAPI.CreateLifecycleState``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateLifecycleState`: LifecycleState
|
|
fmt.Fprintf(os.Stdout, "Response from `LifecycleStatesAPI.CreateLifecycleState`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}/lifecycle-states/{lifecycle-state-id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/lifecycle-states#delete-lifecycle-state
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `2b838de9-db9b-abcf-e646-d4f274ad4238` // string | Identity profile ID. # string | Identity profile ID.
|
|
lifecycleStateId := `ef38f94347e94562b5bb8424a56397d8` // string | Lifecycle state ID. # string | Lifecycle state ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.LifecycleStatesAPI.DeleteLifecycleState(context.Background(), identityProfileId, lifecycleStateId).Execute()
|
|
//resp, r, err := apiClient.V3.LifecycleStatesAPI.DeleteLifecycleState(context.Background(), identityProfileId, lifecycleStateId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `LifecycleStatesAPI.DeleteLifecycleState``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteLifecycleState`: LifecyclestateDeleted
|
|
fmt.Fprintf(os.Stdout, "Response from `LifecycleStatesAPI.DeleteLifecycleState`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}/lifecycle-states/{lifecycle-state-id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/lifecycle-states#get-lifecycle-state
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `2b838de9-db9b-abcf-e646-d4f274ad4238` // string | Identity profile ID. # string | Identity profile ID.
|
|
lifecycleStateId := `ef38f94347e94562b5bb8424a56397d8` // string | Lifecycle state ID. # string | Lifecycle state ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.LifecycleStatesAPI.GetLifecycleState(context.Background(), identityProfileId, lifecycleStateId).Execute()
|
|
//resp, r, err := apiClient.V3.LifecycleStatesAPI.GetLifecycleState(context.Background(), identityProfileId, lifecycleStateId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `LifecycleStatesAPI.GetLifecycleState``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetLifecycleState`: LifecycleState
|
|
fmt.Fprintf(os.Stdout, "Response from `LifecycleStatesAPI.GetLifecycleState`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}/lifecycle-states
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/lifecycle-states#get-lifecycle-states
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `2b838de9-db9b-abcf-e646-d4f274ad4238` // string | Identity profile ID. # string | Identity profile ID.
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
sorters := `created,modified` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.LifecycleStatesAPI.GetLifecycleStates(context.Background(), identityProfileId).Execute()
|
|
//resp, r, err := apiClient.V3.LifecycleStatesAPI.GetLifecycleStates(context.Background(), identityProfileId).Limit(limit).Offset(offset).Count(count).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `LifecycleStatesAPI.GetLifecycleStates``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetLifecycleStates`: []LifecycleState
|
|
fmt.Fprintf(os.Stdout, "Response from `LifecycleStatesAPI.GetLifecycleStates`: %v\n", resp)
|
|
}
|
|
- path: /identities/{identity-id}/set-lifecycle-state
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/lifecycle-states#set-lifecycle-state
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityId := `2c9180857893f1290178944561990364` // string | ID of the identity to update. # string | ID of the identity to update.
|
|
setlifecyclestaterequest := []byte(``) // SetLifecycleStateRequest |
|
|
|
|
|
|
var setLifecycleStateRequest v3.SetLifecycleStateRequest
|
|
if err := json.Unmarshal(setlifecyclestaterequest, &setLifecycleStateRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.LifecycleStatesAPI.SetLifecycleState(context.Background(), identityId).SetLifecycleStateRequest(setLifecycleStateRequest).Execute()
|
|
//resp, r, err := apiClient.V3.LifecycleStatesAPI.SetLifecycleState(context.Background(), identityId).SetLifecycleStateRequest(setLifecycleStateRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `LifecycleStatesAPI.SetLifecycleState``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetLifecycleState`: SetLifecycleState200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `LifecycleStatesAPI.SetLifecycleState`: %v\n", resp)
|
|
}
|
|
- path: /identity-profiles/{identity-profile-id}/lifecycle-states/{lifecycle-state-id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/lifecycle-states#update-lifecycle-states
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityProfileId := `2b838de9-db9b-abcf-e646-d4f274ad4238` // string | Identity profile ID. # string | Identity profile ID.
|
|
lifecycleStateId := `ef38f94347e94562b5bb8424a56397d8` // string | Lifecycle state ID. # string | Lifecycle state ID.
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/description, value=Updated description!}, {op=replace, path=/accessProfileIds, value=[2c918087742bab150174407a80f3125e, 2c918087742bab150174407a80f3124f]}, {op=replace, path=/accountActions, value=[{action=ENABLE, sourceIds=[2c9180846a2f82fb016a481c1b1560c5, 2c9180846a2f82fb016a481c1b1560cc]}, {action=DISABLE, sourceIds=[2c91808869a0c9980169a207258513fb]}]}, {op=replace, path=/emailNotificationOption, value={notifyManagers=true, notifyAllAdmins=false, notifySpecificUsers=false, emailAddressList=[]}}]`) // []JsonPatchOperation | A list of lifecycle state update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields can be updated: * enabled * description * accountActions * accessProfileIds * emailNotificationOption
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.LifecycleStatesAPI.UpdateLifecycleStates(context.Background(), identityProfileId, lifecycleStateId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.LifecycleStatesAPI.UpdateLifecycleStates(context.Background(), identityProfileId, lifecycleStateId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `LifecycleStatesAPI.UpdateLifecycleStates``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateLifecycleStates`: LifecycleState
|
|
fmt.Fprintf(os.Stdout, "Response from `LifecycleStatesAPI.UpdateLifecycleStates`: %v\n", resp)
|
|
}
|
|
- path: /mfa/{method}/delete
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-configuration#delete-mfa-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
method := `okta-verify` // string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'. # string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAConfigurationAPI.DeleteMFAConfig(context.Background(), method).Execute()
|
|
//resp, r, err := apiClient.V3.MFAConfigurationAPI.DeleteMFAConfig(context.Background(), method).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.DeleteMFAConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteMFAConfig`: MfaOktaConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAConfigurationAPI.DeleteMFAConfig`: %v\n", resp)
|
|
}
|
|
- path: /mfa/duo-web/config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-configuration#get-mfa-duo-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFADuoConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFADuoConfig(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.GetMFADuoConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetMFADuoConfig`: MfaDuoConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAConfigurationAPI.GetMFADuoConfig`: %v\n", resp)
|
|
}
|
|
- path: /mfa/kba/config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-configuration#get-mfa-kba-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
allLanguages := allLanguages=true // bool | Indicator whether the question text should be returned in all configured languages * If true, the question text is returned in all languages that it is configured in. * If false, the question text is returned in the user locale if available, else for the default locale. * If not passed, it behaves the same way as passing this parameter as false (optional) # bool | Indicator whether the question text should be returned in all configured languages * If true, the question text is returned in all languages that it is configured in. * If false, the question text is returned in the user locale if available, else for the default locale. * If not passed, it behaves the same way as passing this parameter as false (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAKbaConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAKbaConfig(context.Background()).AllLanguages(allLanguages).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.GetMFAKbaConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetMFAKbaConfig`: []KbaQuestion
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAConfigurationAPI.GetMFAKbaConfig`: %v\n", resp)
|
|
}
|
|
- path: /mfa/okta-verify/config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-configuration#get-mfa-okta-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAOktaConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.MFAConfigurationAPI.GetMFAOktaConfig(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.GetMFAOktaConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetMFAOktaConfig`: MfaOktaConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAConfigurationAPI.GetMFAOktaConfig`: %v\n", resp)
|
|
}
|
|
- path: /mfa/duo-web/config
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-configuration#set-mfa-duo-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
mfaduoconfig := []byte(`{
|
|
"accessKey" : "qw123Y3QlA5UqocYpdU3rEkzrK2D497y",
|
|
"host" : "example.com",
|
|
"configProperties" : {
|
|
"skey" : "qwERttyZx1CdlQye2Vwtbsjr3HKddy4BAiCXjc5x",
|
|
"ikey" : "Q123WE45R6TY7890ZXCV"
|
|
},
|
|
"mfaMethod" : "duo-web",
|
|
"enabled" : true,
|
|
"identityAttribute" : "email"
|
|
}`) // MfaDuoConfig |
|
|
|
|
|
|
var mfaDuoConfig v3.MfaDuoConfig
|
|
if err := json.Unmarshal(mfaduoconfig, &mfaDuoConfig); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFADuoConfig(context.Background()).MfaDuoConfig(mfaDuoConfig).Execute()
|
|
//resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFADuoConfig(context.Background()).MfaDuoConfig(mfaDuoConfig).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.SetMFADuoConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetMFADuoConfig`: MfaDuoConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAConfigurationAPI.SetMFADuoConfig`: %v\n", resp)
|
|
}
|
|
- path: /mfa/kba/config/answers
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-configuration#set-mfakba-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
kbaanswerrequestitem := []byte(`[{id=173423, answer=822cd15d6c15aa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a0859a2fea34}, {id=c54fee53-2d63-4fc5-9259-3e93b9994135, answer=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08}]`) // []KbaAnswerRequestItem |
|
|
|
|
|
|
var kbaAnswerRequestItem []v3.KbaAnswerRequestItem
|
|
if err := json.Unmarshal(kbaanswerrequestitem, &kbaAnswerRequestItem); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAKBAConfig(context.Background()).KbaAnswerRequestItem(kbaAnswerRequestItem).Execute()
|
|
//resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAKBAConfig(context.Background()).KbaAnswerRequestItem(kbaAnswerRequestItem).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.SetMFAKBAConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetMFAKBAConfig`: []KbaAnswerResponseItem
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAConfigurationAPI.SetMFAKBAConfig`: %v\n", resp)
|
|
}
|
|
- path: /mfa/okta-verify/config
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-configuration#set-mfa-okta-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
mfaoktaconfig := []byte(`{
|
|
"accessKey" : "qw123Y3QlA5UqocYpdU3rEkzrK2D497y",
|
|
"host" : "example.com",
|
|
"mfaMethod" : "okta-verify",
|
|
"enabled" : true,
|
|
"identityAttribute" : "email"
|
|
}`) // MfaOktaConfig |
|
|
|
|
|
|
var mfaOktaConfig v3.MfaOktaConfig
|
|
if err := json.Unmarshal(mfaoktaconfig, &mfaOktaConfig); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAOktaConfig(context.Background()).MfaOktaConfig(mfaOktaConfig).Execute()
|
|
//resp, r, err := apiClient.V3.MFAConfigurationAPI.SetMFAOktaConfig(context.Background()).MfaOktaConfig(mfaOktaConfig).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.SetMFAOktaConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetMFAOktaConfig`: MfaOktaConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAConfigurationAPI.SetMFAOktaConfig`: %v\n", resp)
|
|
}
|
|
- path: /mfa/{method}/test
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-configuration#test-mfa-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
method := `okta-verify` // string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'. # string | The name of the MFA method. The currently supported method names are 'okta-verify' and 'duo-web'.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAConfigurationAPI.TestMFAConfig(context.Background(), method).Execute()
|
|
//resp, r, err := apiClient.V3.MFAConfigurationAPI.TestMFAConfig(context.Background(), method).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAConfigurationAPI.TestMFAConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `TestMFAConfig`: MfaConfigTestResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAConfigurationAPI.TestMFAConfig`: %v\n", resp)
|
|
}
|
|
- path: /mfa/token/send
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-controller#create-send-token
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sendtokenrequest := []byte(`{
|
|
"userAlias" : "will.albin",
|
|
"deliveryType" : "EMAIL_WORK"
|
|
}`) // SendTokenRequest |
|
|
|
|
|
|
var sendTokenRequest v3.SendTokenRequest
|
|
if err := json.Unmarshal(sendtokenrequest, &sendTokenRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAControllerAPI.CreateSendToken(context.Background()).SendTokenRequest(sendTokenRequest).Execute()
|
|
//resp, r, err := apiClient.V3.MFAControllerAPI.CreateSendToken(context.Background()).SendTokenRequest(sendTokenRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAControllerAPI.CreateSendToken``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateSendToken`: SendTokenResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAControllerAPI.CreateSendToken`: %v\n", resp)
|
|
}
|
|
- path: /mfa/{method}/poll
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-controller#ping-verification-status
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
method := `okta-verify` // string | The name of the MFA method. The currently supported method names are 'okta-verify', 'duo-web', 'kba','token', 'rsa' # string | The name of the MFA method. The currently supported method names are 'okta-verify', 'duo-web', 'kba','token', 'rsa'
|
|
verificationpollrequest := []byte(`{
|
|
"requestId" : "089899f13a8f4da7824996191587bab9"
|
|
}`) // VerificationPollRequest |
|
|
|
|
|
|
var verificationPollRequest v3.VerificationPollRequest
|
|
if err := json.Unmarshal(verificationpollrequest, &verificationPollRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAControllerAPI.PingVerificationStatus(context.Background(), method).VerificationPollRequest(verificationPollRequest).Execute()
|
|
//resp, r, err := apiClient.V3.MFAControllerAPI.PingVerificationStatus(context.Background(), method).VerificationPollRequest(verificationPollRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAControllerAPI.PingVerificationStatus``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PingVerificationStatus`: VerificationResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAControllerAPI.PingVerificationStatus`: %v\n", resp)
|
|
}
|
|
- path: /mfa/duo-web/verify
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-controller#send-duo-verify-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
duoverificationrequest := []byte(`{
|
|
"signedResponse" : "AUTH|d2lsbC5hbGJpbnxESTZNMFpHSThKQVRWTVpZN0M5VXwxNzAxMjUzMDg5|f1f5f8ced5b340f3d303b05d0efa0e43b6a8f970:APP|d2lsbC5hbGJpbnxESTZNMFpHSThKQVRWTVpZN0M5VXwxNzAxMjU2NjE5|cb44cf44353f5127edcae31b1da0355f87357db2",
|
|
"userId" : "2c9180947f0ef465017f215cbcfd004b"
|
|
}`) // DuoVerificationRequest |
|
|
|
|
|
|
var duoVerificationRequest v3.DuoVerificationRequest
|
|
if err := json.Unmarshal(duoverificationrequest, &duoVerificationRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAControllerAPI.SendDuoVerifyRequest(context.Background()).DuoVerificationRequest(duoVerificationRequest).Execute()
|
|
//resp, r, err := apiClient.V3.MFAControllerAPI.SendDuoVerifyRequest(context.Background()).DuoVerificationRequest(duoVerificationRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAControllerAPI.SendDuoVerifyRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SendDuoVerifyRequest`: VerificationResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAControllerAPI.SendDuoVerifyRequest`: %v\n", resp)
|
|
}
|
|
- path: /mfa/kba/authenticate
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-controller#send-kba-answers
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
kbaanswerrequestitem := []byte(`[{id=173423, answer=822cd15d6c15aa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a0859a2fea34}, {id=c54fee53-2d63-4fc5-9259-3e93b9994135, answer=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08}]`) // []KbaAnswerRequestItem |
|
|
|
|
|
|
var kbaAnswerRequestItem []v3.KbaAnswerRequestItem
|
|
if err := json.Unmarshal(kbaanswerrequestitem, &kbaAnswerRequestItem); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAControllerAPI.SendKbaAnswers(context.Background()).KbaAnswerRequestItem(kbaAnswerRequestItem).Execute()
|
|
//resp, r, err := apiClient.V3.MFAControllerAPI.SendKbaAnswers(context.Background()).KbaAnswerRequestItem(kbaAnswerRequestItem).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAControllerAPI.SendKbaAnswers``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SendKbaAnswers`: KbaAuthResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAControllerAPI.SendKbaAnswers`: %v\n", resp)
|
|
}
|
|
- path: /mfa/okta-verify/verify
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-controller#send-okta-verify-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
oktaverificationrequest := []byte(`{
|
|
"userId" : "example@mail.com"
|
|
}`) // OktaVerificationRequest |
|
|
|
|
|
|
var oktaVerificationRequest v3.OktaVerificationRequest
|
|
if err := json.Unmarshal(oktaverificationrequest, &oktaVerificationRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAControllerAPI.SendOktaVerifyRequest(context.Background()).OktaVerificationRequest(oktaVerificationRequest).Execute()
|
|
//resp, r, err := apiClient.V3.MFAControllerAPI.SendOktaVerifyRequest(context.Background()).OktaVerificationRequest(oktaVerificationRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAControllerAPI.SendOktaVerifyRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SendOktaVerifyRequest`: VerificationResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAControllerAPI.SendOktaVerifyRequest`: %v\n", resp)
|
|
}
|
|
- path: /mfa/token/authenticate
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/mfa-controller#send-token-auth-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
tokenauthrequest := []byte(`{
|
|
"userAlias" : "will.albin",
|
|
"deliveryType" : "EMAIL_WORK",
|
|
"token" : "12345"
|
|
}`) // TokenAuthRequest |
|
|
|
|
|
|
var tokenAuthRequest v3.TokenAuthRequest
|
|
if err := json.Unmarshal(tokenauthrequest, &tokenAuthRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.MFAControllerAPI.SendTokenAuthRequest(context.Background()).TokenAuthRequest(tokenAuthRequest).Execute()
|
|
//resp, r, err := apiClient.V3.MFAControllerAPI.SendTokenAuthRequest(context.Background()).TokenAuthRequest(tokenAuthRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `MFAControllerAPI.SendTokenAuthRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SendTokenAuthRequest`: TokenAuthResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `MFAControllerAPI.SendTokenAuthRequest`: %v\n", resp)
|
|
}
|
|
- path: /managed-clients
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clients#create-managed-client
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
managedclientrequest := []byte(`{
|
|
"name" : "aName",
|
|
"description" : "A short description of the ManagedClient",
|
|
"clusterId" : "aClusterId",
|
|
"type" : "VA"
|
|
}`) // ManagedClientRequest |
|
|
|
|
|
|
var managedClientRequest v3.ManagedClientRequest
|
|
if err := json.Unmarshal(managedclientrequest, &managedClientRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClientsAPI.CreateManagedClient(context.Background()).ManagedClientRequest(managedClientRequest).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClientsAPI.CreateManagedClient(context.Background()).ManagedClientRequest(managedClientRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.CreateManagedClient``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateManagedClient`: ManagedClient
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClientsAPI.CreateManagedClient`: %v\n", resp)
|
|
}
|
|
- path: /managed-clients/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clients#delete-managed-client
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `4440278c-0ce2-41ee-a0a9-f5cfd5e8d3b7` // string | Managed client ID. # string | Managed client ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ManagedClientsAPI.DeleteManagedClient(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.ManagedClientsAPI.DeleteManagedClient(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.DeleteManagedClient``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /managed-clients/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clients#get-managed-client
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `4440278c-0ce2-41ee-a0a9-f5cfd5e8d3b7` // string | Managed client ID. # string | Managed client ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClient(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClient(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.GetManagedClient``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetManagedClient`: ManagedClient
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClientsAPI.GetManagedClient`: %v\n", resp)
|
|
}
|
|
- path: /managed-clients/{id}/status
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clients#get-managed-client-status
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `aClientId` // string | Managed client ID to get status for. # string | Managed client ID to get status for.
|
|
type_ := // ManagedClientType | Managed client type to get status for. # ManagedClientType | Managed client type to get status for.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClientStatus(context.Background(), id).Type_(type_).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClientStatus(context.Background(), id).Type_(type_).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.GetManagedClientStatus``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetManagedClientStatus`: ManagedClientStatus
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClientsAPI.GetManagedClientStatus`: %v\n", resp)
|
|
}
|
|
- path: /managed-clients
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clients#get-managed-clients
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `name eq "client name"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* **name**: *eq* **clientId**: *eq* **clusterId**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* **name**: *eq* **clientId**: *eq* **clusterId**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClients(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClientsAPI.GetManagedClients(context.Background()).Offset(offset).Limit(limit).Count(count).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.GetManagedClients``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetManagedClients`: []ManagedClient
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClientsAPI.GetManagedClients`: %v\n", resp)
|
|
}
|
|
- path: /managed-clients/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clients#update-managed-client
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `4440278c-0ce2-41ee-a0a9-f5cfd5e8d3b7` // string | Managed client ID. # string | Managed client ID.
|
|
jsonpatchoperation := []byte(``) // []JsonPatchOperation | JSONPatch payload used to update the object.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClientsAPI.UpdateManagedClient(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClientsAPI.UpdateManagedClient(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClientsAPI.UpdateManagedClient``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateManagedClient`: ManagedClient
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClientsAPI.UpdateManagedClient`: %v\n", resp)
|
|
}
|
|
- path: /managed-clusters
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clusters#create-managed-cluster
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
managedclusterrequest := []byte(`{
|
|
"configuration" : {
|
|
"clusterExternalId" : "externalId",
|
|
"ccgVersion" : "77.0.0"
|
|
},
|
|
"name" : "Managed Cluster Name",
|
|
"description" : "A short description of the managed cluster.",
|
|
"type" : "idn"
|
|
}`) // ManagedClusterRequest |
|
|
|
|
|
|
var managedClusterRequest v3.ManagedClusterRequest
|
|
if err := json.Unmarshal(managedclusterrequest, &managedClusterRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClustersAPI.CreateManagedCluster(context.Background()).ManagedClusterRequest(managedClusterRequest).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClustersAPI.CreateManagedCluster(context.Background()).ManagedClusterRequest(managedClusterRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.CreateManagedCluster``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateManagedCluster`: ManagedCluster
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.CreateManagedCluster`: %v\n", resp)
|
|
}
|
|
- path: /managed-clusters/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clusters#delete-managed-cluster
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180897de347a2017de8859e8c5039` // string | Managed cluster ID. # string | Managed cluster ID.
|
|
removeClients := false // bool | Flag to determine the need to delete a cluster with clients. (optional) (default to false) # bool | Flag to determine the need to delete a cluster with clients. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ManagedClustersAPI.DeleteManagedCluster(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.ManagedClustersAPI.DeleteManagedCluster(context.Background(), id).RemoveClients(removeClients).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.DeleteManagedCluster``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /managed-clusters/{id}/log-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clusters#get-client-log-configuration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2b838de9-db9b-abcf-e646-d4f274ad4238` // string | ID of managed cluster to get log configuration for. # string | ID of managed cluster to get log configuration for.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClustersAPI.GetClientLogConfiguration(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClustersAPI.GetClientLogConfiguration(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.GetClientLogConfiguration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetClientLogConfiguration`: ClientLogConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.GetClientLogConfiguration`: %v\n", resp)
|
|
}
|
|
- path: /managed-clusters/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clusters#get-managed-cluster
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180897de347a2017de8859e8c5039` // string | Managed cluster ID. # string | Managed cluster ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClustersAPI.GetManagedCluster(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClustersAPI.GetManagedCluster(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.GetManagedCluster``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetManagedCluster`: ManagedCluster
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.GetManagedCluster`: %v\n", resp)
|
|
}
|
|
- path: /managed-clusters
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clusters#get-managed-clusters
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `operational eq "operation"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **operational**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **operational**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClustersAPI.GetManagedClusters(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClustersAPI.GetManagedClusters(context.Background()).Offset(offset).Limit(limit).Count(count).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.GetManagedClusters``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetManagedClusters`: []ManagedCluster
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.GetManagedClusters`: %v\n", resp)
|
|
}
|
|
- path: /managed-clusters/{id}/log-config
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clusters#put-client-log-configuration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2b838de9-db9b-abcf-e646-d4f274ad4238` // string | ID of the managed cluster to update the log configuration for. # string | ID of the managed cluster to update the log configuration for.
|
|
putclientlogconfigurationrequest := []byte(``) // PutClientLogConfigurationRequest | Client log configuration for the given managed cluster.
|
|
|
|
|
|
var putClientLogConfigurationRequest v3.PutClientLogConfigurationRequest
|
|
if err := json.Unmarshal(putclientlogconfigurationrequest, &putClientLogConfigurationRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClustersAPI.PutClientLogConfiguration(context.Background(), id).PutClientLogConfigurationRequest(putClientLogConfigurationRequest).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClustersAPI.PutClientLogConfiguration(context.Background(), id).PutClientLogConfigurationRequest(putClientLogConfigurationRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.PutClientLogConfiguration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutClientLogConfiguration`: ClientLogConfiguration
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.PutClientLogConfiguration`: %v\n", resp)
|
|
}
|
|
- path: /managed-clusters/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/managed-clusters#update-managed-cluster
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180897de347a2017de8859e8c5039` // string | Managed cluster ID. # string | Managed cluster ID.
|
|
jsonpatchoperation := []byte(``) // []JsonPatchOperation | JSONPatch payload used to update the object.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ManagedClustersAPI.UpdateManagedCluster(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.ManagedClustersAPI.UpdateManagedCluster(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ManagedClustersAPI.UpdateManagedCluster``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateManagedCluster`: ManagedCluster
|
|
fmt.Fprintf(os.Stdout, "Response from `ManagedClustersAPI.UpdateManagedCluster`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-approvals/{id}/approve
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#approve-non-employee-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `e136567de87e4d029e60b3c3c55db56d` // string | Non-Employee approval item id (UUID) # string | Non-Employee approval item id (UUID)
|
|
nonemployeeapprovaldecision := []byte(`{
|
|
"comment" : "Approved by manager"
|
|
}`) // NonEmployeeApprovalDecision |
|
|
|
|
|
|
var nonEmployeeApprovalDecision v3.NonEmployeeApprovalDecision
|
|
if err := json.Unmarshal(nonemployeeapprovaldecision, &nonEmployeeApprovalDecision); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ApproveNonEmployeeRequest(context.Background(), id).NonEmployeeApprovalDecision(nonEmployeeApprovalDecision).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ApproveNonEmployeeRequest(context.Background(), id).NonEmployeeApprovalDecision(nonEmployeeApprovalDecision).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.ApproveNonEmployeeRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ApproveNonEmployeeRequest`: NonEmployeeApprovalItem
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.ApproveNonEmployeeRequest`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-records
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#create-non-employee-record
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
"time"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
nonemployeerequestbody := []byte(`{
|
|
"sourceId" : "2c91808568c529c60168cca6f90c1313",
|
|
"firstName" : "William",
|
|
"lastName" : "Smith",
|
|
"manager" : "jane.doe",
|
|
"data" : {
|
|
"description" : "Auditing"
|
|
},
|
|
"accountName" : "william.smith",
|
|
"phone" : "5125555555",
|
|
"endDate" : "2021-03-25T00:00:00-05:00",
|
|
"email" : "william.smith@example.com",
|
|
"startDate" : "2020-03-24T00:00:00-05:00"
|
|
}`) // NonEmployeeRequestBody | Non-Employee record creation request body.
|
|
|
|
|
|
var nonEmployeeRequestBody v3.NonEmployeeRequestBody
|
|
if err := json.Unmarshal(nonemployeerequestbody, &nonEmployeeRequestBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.CreateNonEmployeeRecord(context.Background()).NonEmployeeRequestBody(nonEmployeeRequestBody).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.CreateNonEmployeeRecord(context.Background()).NonEmployeeRequestBody(nonEmployeeRequestBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.CreateNonEmployeeRecord``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateNonEmployeeRecord`: NonEmployeeRecord
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.CreateNonEmployeeRecord`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-requests
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#create-non-employee-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
"time"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
nonemployeerequestbody := []byte(`{
|
|
"sourceId" : "2c91808568c529c60168cca6f90c1313",
|
|
"firstName" : "William",
|
|
"lastName" : "Smith",
|
|
"manager" : "jane.doe",
|
|
"data" : {
|
|
"description" : "Auditing"
|
|
},
|
|
"accountName" : "william.smith",
|
|
"phone" : "5125555555",
|
|
"endDate" : "2021-03-25T00:00:00-05:00",
|
|
"email" : "william.smith@example.com",
|
|
"startDate" : "2020-03-24T00:00:00-05:00"
|
|
}`) // NonEmployeeRequestBody | Non-Employee creation request body
|
|
|
|
|
|
var nonEmployeeRequestBody v3.NonEmployeeRequestBody
|
|
if err := json.Unmarshal(nonemployeerequestbody, &nonEmployeeRequestBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.CreateNonEmployeeRequest(context.Background()).NonEmployeeRequestBody(nonEmployeeRequestBody).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.CreateNonEmployeeRequest(context.Background()).NonEmployeeRequestBody(nonEmployeeRequestBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.CreateNonEmployeeRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateNonEmployeeRequest`: NonEmployeeRequest
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.CreateNonEmployeeRequest`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#create-non-employee-source
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
nonemployeesourcerequestbody := []byte(`{
|
|
"owner" : {
|
|
"id" : "2c91808570313110017040b06f344ec9"
|
|
},
|
|
"managementWorkgroup" : "123299",
|
|
"accountManagers" : [ {
|
|
"id" : "2c91808570313110017040b06f344ec9"
|
|
}, {
|
|
"id" : "2c91808570313110017040b06f344ec9"
|
|
}, {
|
|
"id" : "2c91808570313110017040b06f344ec9"
|
|
}, {
|
|
"id" : "2c91808570313110017040b06f344ec9"
|
|
}, {
|
|
"id" : "2c91808570313110017040b06f344ec9"
|
|
} ],
|
|
"name" : "Retail",
|
|
"description" : "Source description",
|
|
"approvers" : [ {
|
|
"id" : "2c91808570313110017040b06f344ec9"
|
|
}, {
|
|
"id" : "2c91808570313110017040b06f344ec9"
|
|
}, {
|
|
"id" : "2c91808570313110017040b06f344ec9"
|
|
} ]
|
|
}`) // NonEmployeeSourceRequestBody | Non-Employee source creation request body.
|
|
|
|
|
|
var nonEmployeeSourceRequestBody v3.NonEmployeeSourceRequestBody
|
|
if err := json.Unmarshal(nonemployeesourcerequestbody, &nonEmployeeSourceRequestBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.CreateNonEmployeeSource(context.Background()).NonEmployeeSourceRequestBody(nonEmployeeSourceRequestBody).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.CreateNonEmployeeSource(context.Background()).NonEmployeeSourceRequestBody(nonEmployeeSourceRequestBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.CreateNonEmployeeSource``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateNonEmployeeSource`: NonEmployeeSourceWithCloudExternalId
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.CreateNonEmployeeSource`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources/{sourceId}/schema-attributes
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#create-non-employee-source-schema-attributes
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `ef38f94347e94562b5bb8424a56397d8` // string | The Source id # string | The Source id
|
|
nonemployeeschemaattributebody := []byte(`{
|
|
"helpText" : "The unique identifier for the account",
|
|
"label" : "Account Name",
|
|
"placeholder" : "Enter a unique user name for this account.",
|
|
"type" : "TEXT",
|
|
"technicalName" : "account.name",
|
|
"required" : true
|
|
}`) // NonEmployeeSchemaAttributeBody |
|
|
|
|
|
|
var nonEmployeeSchemaAttributeBody v3.NonEmployeeSchemaAttributeBody
|
|
if err := json.Unmarshal(nonemployeeschemaattributebody, &nonEmployeeSchemaAttributeBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.CreateNonEmployeeSourceSchemaAttributes(context.Background(), sourceId).NonEmployeeSchemaAttributeBody(nonEmployeeSchemaAttributeBody).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.CreateNonEmployeeSourceSchemaAttributes(context.Background(), sourceId).NonEmployeeSchemaAttributeBody(nonEmployeeSchemaAttributeBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.CreateNonEmployeeSourceSchemaAttributes``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateNonEmployeeSourceSchemaAttributes`: NonEmployeeSchemaAttribute
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.CreateNonEmployeeSourceSchemaAttributes`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-records/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#delete-non-employee-record
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Non-Employee record id (UUID) # string | Non-Employee record id (UUID)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeRecord(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeRecord(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeRecord``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /non-employee-records/bulk-delete
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#delete-non-employee-records-in-bulk
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
deletenonemployeerecordsinbulkrequest := []byte(``) // DeleteNonEmployeeRecordsInBulkRequest | Non-Employee bulk delete request body.
|
|
|
|
|
|
var deleteNonEmployeeRecordsInBulkRequest v3.DeleteNonEmployeeRecordsInBulkRequest
|
|
if err := json.Unmarshal(deletenonemployeerecordsinbulkrequest, &deleteNonEmployeeRecordsInBulkRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeRecordsInBulk(context.Background()).DeleteNonEmployeeRecordsInBulkRequest(deleteNonEmployeeRecordsInBulkRequest).Execute()
|
|
//r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeRecordsInBulk(context.Background()).DeleteNonEmployeeRecordsInBulkRequest(deleteNonEmployeeRecordsInBulkRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeRecordsInBulk``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /non-employee-requests/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#delete-non-employee-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ac110005-7156-1150-8171-5b292e3e0084` // string | Non-Employee request id in the UUID format # string | Non-Employee request id in the UUID format
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeRequest(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeRequest(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /non-employee-sources/{sourceId}/schema-attributes/{attributeId}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#delete-non-employee-schema-attribute
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
attributeId := `ef38f94347e94562b5bb8424a56397d8` // string | The Schema Attribute Id (UUID) # string | The Schema Attribute Id (UUID)
|
|
sourceId := `ef38f94347e94562b5bb8424a56397d8` // string | The Source id # string | The Source id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeSchemaAttribute(context.Background(), attributeId, sourceId).Execute()
|
|
//r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeSchemaAttribute(context.Background(), attributeId, sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeSchemaAttribute``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /non-employee-sources/{sourceId}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#delete-non-employee-source
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `e136567de87e4d029e60b3c3c55db56d` // string | Source Id # string | Source Id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeSource(context.Background(), sourceId).Execute()
|
|
//r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeSource(context.Background(), sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeSource``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /non-employee-sources/{sourceId}/schema-attributes
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#delete-non-employee-source-schema-attributes
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `ef38f94347e94562b5bb8424a56397d8` // string | The Source id # string | The Source id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeSourceSchemaAttributes(context.Background(), sourceId).Execute()
|
|
//r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeSourceSchemaAttributes(context.Background(), sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.DeleteNonEmployeeSourceSchemaAttributes``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /non-employee-sources/{id}/non-employees/download
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#export-non-employee-records
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `e136567de87e4d029e60b3c3c55db56d` // string | Source Id (UUID) # string | Source Id (UUID)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ExportNonEmployeeRecords(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ExportNonEmployeeRecords(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.ExportNonEmployeeRecords``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /non-employee-sources/{id}/schema-attributes-template/download
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#export-non-employee-source-schema-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Source Id (UUID) # string | Source Id (UUID)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ExportNonEmployeeSourceSchemaTemplate(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ExportNonEmployeeSourceSchemaTemplate(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.ExportNonEmployeeSourceSchemaTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /non-employee-approvals/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#get-non-employee-approval
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `e136567de87e4d029e60b3c3c55db56d` // string | Non-Employee approval item id (UUID) # string | Non-Employee approval item id (UUID)
|
|
includeDetail := true // bool | The object nonEmployeeRequest will not be included detail when set to false. *Default value is true* (optional) # bool | The object nonEmployeeRequest will not be included detail when set to false. *Default value is true* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeApproval(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeApproval(context.Background(), id).IncludeDetail(includeDetail).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.GetNonEmployeeApproval``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetNonEmployeeApproval`: NonEmployeeApprovalItemDetail
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.GetNonEmployeeApproval`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-approvals/summary/{requested-for}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#get-non-employee-approval-summary
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
requestedFor := `2c91808280430dfb0180431a59440460` // string | The identity (UUID) of the approver for whom for whom the summary is being retrieved. Use \"me\" instead to indicate the current user. # string | The identity (UUID) of the approver for whom for whom the summary is being retrieved. Use \"me\" instead to indicate the current user.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeApprovalSummary(context.Background(), requestedFor).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeApprovalSummary(context.Background(), requestedFor).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.GetNonEmployeeApprovalSummary``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetNonEmployeeApprovalSummary`: NonEmployeeApprovalSummary
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.GetNonEmployeeApprovalSummary`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources/{id}/non-employee-bulk-upload/status
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#get-non-employee-bulk-upload-status
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `e136567de87e4d029e60b3c3c55db56d` // string | Source ID (UUID) # string | Source ID (UUID)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeBulkUploadStatus(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeBulkUploadStatus(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.GetNonEmployeeBulkUploadStatus``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetNonEmployeeBulkUploadStatus`: NonEmployeeBulkUploadStatus
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.GetNonEmployeeBulkUploadStatus`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-records/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#get-non-employee-record
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Non-Employee record id (UUID) # string | Non-Employee record id (UUID)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeRecord(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeRecord(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.GetNonEmployeeRecord``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetNonEmployeeRecord`: NonEmployeeRecord
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.GetNonEmployeeRecord`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-requests/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#get-non-employee-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ac110005-7156-1150-8171-5b292e3e0084` // string | Non-Employee request id (UUID) # string | Non-Employee request id (UUID)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeRequest(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeRequest(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.GetNonEmployeeRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetNonEmployeeRequest`: NonEmployeeRequest
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.GetNonEmployeeRequest`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-requests/summary/{requested-for}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#get-non-employee-request-summary
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
requestedFor := `2c91808280430dfb0180431a59440460` // string | The identity (UUID) of the non-employee account manager for whom the summary is being retrieved. Use \"me\" instead to indicate the current user. # string | The identity (UUID) of the non-employee account manager for whom the summary is being retrieved. Use \"me\" instead to indicate the current user.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeRequestSummary(context.Background(), requestedFor).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeRequestSummary(context.Background(), requestedFor).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.GetNonEmployeeRequestSummary``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetNonEmployeeRequestSummary`: NonEmployeeRequestSummary
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.GetNonEmployeeRequestSummary`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources/{sourceId}/schema-attributes/{attributeId}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#get-non-employee-schema-attribute
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
attributeId := `ef38f94347e94562b5bb8424a56397d8` // string | The Schema Attribute Id (UUID) # string | The Schema Attribute Id (UUID)
|
|
sourceId := `ef38f94347e94562b5bb8424a56397d8` // string | The Source id # string | The Source id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeSchemaAttribute(context.Background(), attributeId, sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeSchemaAttribute(context.Background(), attributeId, sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.GetNonEmployeeSchemaAttribute``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetNonEmployeeSchemaAttribute`: NonEmployeeSchemaAttribute
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.GetNonEmployeeSchemaAttribute`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources/{sourceId}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#get-non-employee-source
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c91808b7c28b350017c2a2ec5790aa1` // string | Source Id # string | Source Id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeSource(context.Background(), sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeSource(context.Background(), sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.GetNonEmployeeSource``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetNonEmployeeSource`: NonEmployeeSource
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.GetNonEmployeeSource`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources/{sourceId}/schema-attributes
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#get-non-employee-source-schema-attributes
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `ef38f94347e94562b5bb8424a56397d8` // string | The Source id # string | The Source id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeSourceSchemaAttributes(context.Background(), sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.GetNonEmployeeSourceSchemaAttributes(context.Background(), sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.GetNonEmployeeSourceSchemaAttributes``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetNonEmployeeSourceSchemaAttributes`: []NonEmployeeSchemaAttribute
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.GetNonEmployeeSourceSchemaAttributes`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources/{id}/non-employee-bulk-upload
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#import-non-employee-records-in-bulk
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `e136567de87e4d029e60b3c3c55db56d` // string | Source Id (UUID) # string | Source Id (UUID)
|
|
data := BINARY_DATA_HERE // *os.File | # *os.File |
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ImportNonEmployeeRecordsInBulk(context.Background(), id).Data(data).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ImportNonEmployeeRecordsInBulk(context.Background(), id).Data(data).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.ImportNonEmployeeRecordsInBulk``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ImportNonEmployeeRecordsInBulk`: NonEmployeeBulkUploadJob
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.ImportNonEmployeeRecordsInBulk`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-approvals
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#list-non-employee-approvals
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
requestedFor := `2c91808280430dfb0180431a59440460` // string | The identity for whom the request was made. *me* indicates the current user. (optional) # string | The identity for whom the request was made. *me* indicates the current user. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `approvalStatus eq "Pending"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **approvalStatus**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **approvalStatus**: *eq* (optional)
|
|
sorters := `created` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, modified** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ListNonEmployeeApprovals(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ListNonEmployeeApprovals(context.Background()).RequestedFor(requestedFor).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.ListNonEmployeeApprovals``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListNonEmployeeApprovals`: []NonEmployeeApprovalItem
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.ListNonEmployeeApprovals`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-records
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#list-non-employee-records
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
sorters := `accountName,sourceId` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, accountName, sourceId, manager, firstName, lastName, email, phone, startDate, endDate, created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, accountName, sourceId, manager, firstName, lastName, email, phone, startDate, endDate, created, modified** (optional)
|
|
filters := `sourceId eq "2c91808568c529c60168cca6f90c1313"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **sourceId**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **sourceId**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ListNonEmployeeRecords(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ListNonEmployeeRecords(context.Background()).Limit(limit).Offset(offset).Count(count).Sorters(sorters).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.ListNonEmployeeRecords``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListNonEmployeeRecords`: []NonEmployeeRecord
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.ListNonEmployeeRecords`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-requests
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#list-non-employee-requests
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
requestedFor := `e136567de87e4d029e60b3c3c55db56d` // string | The identity for whom the request was made. *me* indicates the current user. # string | The identity for whom the request was made. *me* indicates the current user.
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
sorters := `created,approvalStatus` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, approvalStatus, firstName, lastName, email, phone, accountName, startDate, endDate** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created, approvalStatus, firstName, lastName, email, phone, accountName, startDate, endDate** (optional)
|
|
filters := `sourceId eq "2c91808568c529c60168cca6f90c1313"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **sourceId**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **sourceId**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ListNonEmployeeRequests(context.Background()).RequestedFor(requestedFor).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ListNonEmployeeRequests(context.Background()).RequestedFor(requestedFor).Limit(limit).Offset(offset).Count(count).Sorters(sorters).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.ListNonEmployeeRequests``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListNonEmployeeRequests`: []NonEmployeeRequest
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.ListNonEmployeeRequests`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#list-non-employee-sources
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
requestedFor := `me` // string | Identity the request was made for. Use 'me' to indicate the current user. (optional) # string | Identity the request was made for. Use 'me' to indicate the current user. (optional)
|
|
nonEmployeeCount := true // bool | Flag that determines whether the API will return a non-employee count associated with the source. (optional) (default to false) # bool | Flag that determines whether the API will return a non-employee count associated with the source. (optional) (default to false)
|
|
sorters := `name,created` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, sourceId** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, sourceId** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ListNonEmployeeSources(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.ListNonEmployeeSources(context.Background()).Limit(limit).Offset(offset).Count(count).RequestedFor(requestedFor).NonEmployeeCount(nonEmployeeCount).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.ListNonEmployeeSources``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListNonEmployeeSources`: []NonEmployeeSourceWithNECount
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.ListNonEmployeeSources`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-records/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#patch-non-employee-record
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Non-employee record id (UUID) # string | Non-employee record id (UUID)
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/endDate, value=2019-08-23T18:40:35.772Z}]`) // []JsonPatchOperation | A list of non-employee update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Attributes are restricted by user type. Owner of source can update end date. Organization admins can update all available fields.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.PatchNonEmployeeRecord(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.PatchNonEmployeeRecord(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.PatchNonEmployeeRecord``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchNonEmployeeRecord`: NonEmployeeRecord
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.PatchNonEmployeeRecord`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources/{sourceId}/schema-attributes/{attributeId}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#patch-non-employee-schema-attribute
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
attributeId := `ef38f94347e94562b5bb8424a56397d8` // string | The Schema Attribute Id (UUID) # string | The Schema Attribute Id (UUID)
|
|
sourceId := `ef38f94347e94562b5bb8424a56397d8` // string | The Source id # string | The Source id
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/label, value={new attribute label=null}}]`) // []JsonPatchOperation | A list of schema attribute update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following properties are allowed for update ':' 'label', 'helpText', 'placeholder', 'required'.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.PatchNonEmployeeSchemaAttribute(context.Background(), attributeId, sourceId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.PatchNonEmployeeSchemaAttribute(context.Background(), attributeId, sourceId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.PatchNonEmployeeSchemaAttribute``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchNonEmployeeSchemaAttribute`: NonEmployeeSchemaAttribute
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.PatchNonEmployeeSchemaAttribute`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-sources/{sourceId}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#patch-non-employee-source
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `e136567de87e4d029e60b3c3c55db56d` // string | Source Id # string | Source Id
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/name, value={new name=null}}, {op=replace, path=/approvers, value=[2c91809f703bb37a017040a2fe8748c7, 48b1f463c9e8427db5a5071bd81914b8]}]`) // []JsonPatchOperation | A list of non-employee source update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.PatchNonEmployeeSource(context.Background(), sourceId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.PatchNonEmployeeSource(context.Background(), sourceId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.PatchNonEmployeeSource``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchNonEmployeeSource`: NonEmployeeSource
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.PatchNonEmployeeSource`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-approvals/{id}/reject
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#reject-non-employee-request
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `e136567de87e4d029e60b3c3c55db56d` // string | Non-Employee approval item id (UUID) # string | Non-Employee approval item id (UUID)
|
|
nonemployeerejectapprovaldecision := []byte(`{
|
|
"comment" : "approved"
|
|
}`) // NonEmployeeRejectApprovalDecision |
|
|
|
|
|
|
var nonEmployeeRejectApprovalDecision v3.NonEmployeeRejectApprovalDecision
|
|
if err := json.Unmarshal(nonemployeerejectapprovaldecision, &nonEmployeeRejectApprovalDecision); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.RejectNonEmployeeRequest(context.Background(), id).NonEmployeeRejectApprovalDecision(nonEmployeeRejectApprovalDecision).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.RejectNonEmployeeRequest(context.Background(), id).NonEmployeeRejectApprovalDecision(nonEmployeeRejectApprovalDecision).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.RejectNonEmployeeRequest``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `RejectNonEmployeeRequest`: NonEmployeeApprovalItem
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.RejectNonEmployeeRequest`: %v\n", resp)
|
|
}
|
|
- path: /non-employee-records/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/non-employee-lifecycle-management#update-non-employee-record
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
"time"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | Non-employee record id (UUID) # string | Non-employee record id (UUID)
|
|
nonemployeerequestbody := []byte(`{
|
|
"sourceId" : "2c91808568c529c60168cca6f90c1313",
|
|
"firstName" : "William",
|
|
"lastName" : "Smith",
|
|
"manager" : "jane.doe",
|
|
"data" : {
|
|
"description" : "Auditing"
|
|
},
|
|
"accountName" : "william.smith",
|
|
"phone" : "5125555555",
|
|
"endDate" : "2021-03-25T00:00:00-05:00",
|
|
"email" : "william.smith@example.com",
|
|
"startDate" : "2020-03-24T00:00:00-05:00"
|
|
}`) // NonEmployeeRequestBody | Non-employee record creation request body. Attributes are restricted by user type. Owner of source can update end date. Organization admins can update all available fields.
|
|
|
|
|
|
var nonEmployeeRequestBody v3.NonEmployeeRequestBody
|
|
if err := json.Unmarshal(nonemployeerequestbody, &nonEmployeeRequestBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.UpdateNonEmployeeRecord(context.Background(), id).NonEmployeeRequestBody(nonEmployeeRequestBody).Execute()
|
|
//resp, r, err := apiClient.V3.NonEmployeeLifecycleManagementAPI.UpdateNonEmployeeRecord(context.Background(), id).NonEmployeeRequestBody(nonEmployeeRequestBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `NonEmployeeLifecycleManagementAPI.UpdateNonEmployeeRecord``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateNonEmployeeRecord`: NonEmployeeRecord
|
|
fmt.Fprintf(os.Stdout, "Response from `NonEmployeeLifecycleManagementAPI.UpdateNonEmployeeRecord`: %v\n", resp)
|
|
}
|
|
- path: /oauth-clients
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/o-auth-clients#create-oauth-client
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
createoauthclientrequest := []byte(`{
|
|
"internal" : false,
|
|
"businessName" : "Acme-Solar",
|
|
"description" : "An API client used for the authorization_code, refresh_token, and client_credentials flows",
|
|
"refreshTokenValiditySeconds" : 86400,
|
|
"type" : "CONFIDENTIAL",
|
|
"redirectUris" : [ "http://localhost:12345" ],
|
|
"enabled" : true,
|
|
"accessType" : "OFFLINE",
|
|
"grantTypes" : [ "AUTHORIZATION_CODE", "CLIENT_CREDENTIALS", "REFRESH_TOKEN" ],
|
|
"strongAuthSupported" : false,
|
|
"homepageUrl" : "http://localhost:12345",
|
|
"accessTokenValiditySeconds" : 750,
|
|
"scope" : [ "demo:api-client-scope:first", "demo:api-client-scope:second" ],
|
|
"name" : "Demo API Client",
|
|
"claimsSupported" : false
|
|
}`) // CreateOAuthClientRequest |
|
|
|
|
|
|
var createOAuthClientRequest v3.CreateOAuthClientRequest
|
|
if err := json.Unmarshal(createoauthclientrequest, &createOAuthClientRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.OAuthClientsAPI.CreateOauthClient(context.Background()).CreateOAuthClientRequest(createOAuthClientRequest).Execute()
|
|
//resp, r, err := apiClient.V3.OAuthClientsAPI.CreateOauthClient(context.Background()).CreateOAuthClientRequest(createOAuthClientRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsAPI.CreateOauthClient``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateOauthClient`: CreateOAuthClientResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `OAuthClientsAPI.CreateOauthClient`: %v\n", resp)
|
|
}
|
|
- path: /oauth-clients/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/o-auth-clients#delete-oauth-client
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The OAuth client id # string | The OAuth client id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.OAuthClientsAPI.DeleteOauthClient(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.OAuthClientsAPI.DeleteOauthClient(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsAPI.DeleteOauthClient``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /oauth-clients/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/o-auth-clients#get-oauth-client
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The OAuth client id # string | The OAuth client id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.OAuthClientsAPI.GetOauthClient(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.OAuthClientsAPI.GetOauthClient(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsAPI.GetOauthClient``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetOauthClient`: GetOAuthClientResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `OAuthClientsAPI.GetOauthClient`: %v\n", resp)
|
|
}
|
|
- path: /oauth-clients
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/o-auth-clients#list-oauth-clients
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
filters := `lastUsed le 2023-02-05T10:59:27.214Z` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **lastUsed**: *le, isnull* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **lastUsed**: *le, isnull* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.OAuthClientsAPI.ListOauthClients(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.OAuthClientsAPI.ListOauthClients(context.Background()).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsAPI.ListOauthClients``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListOauthClients`: []GetOAuthClientResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `OAuthClientsAPI.ListOauthClients`: %v\n", resp)
|
|
}
|
|
- path: /oauth-clients/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/o-auth-clients#patch-oauth-client
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The OAuth client id # string | The OAuth client id
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/strongAuthSupported, value=true}, {op=replace, path=/businessName, value=acme-solar}]`) // []JsonPatchOperation | A list of OAuth client update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * tenant * businessName * homepageUrl * name * description * accessTokenValiditySeconds * refreshTokenValiditySeconds * redirectUris * grantTypes * accessType * enabled * strongAuthSupported * claimsSupported
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.OAuthClientsAPI.PatchOauthClient(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.OAuthClientsAPI.PatchOauthClient(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `OAuthClientsAPI.PatchOauthClient``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchOauthClient`: GetOAuthClientResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `OAuthClientsAPI.PatchOauthClient`: %v\n", resp)
|
|
}
|
|
- path: /password-org-config
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-configuration#create-password-org-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
passwordorgconfig := []byte(`{
|
|
"digitTokenLength" : 9,
|
|
"digitTokenEnabled" : true,
|
|
"digitTokenDurationMinutes" : 10,
|
|
"customInstructionsEnabled" : true
|
|
}`) // PasswordOrgConfig |
|
|
|
|
|
|
var passwordOrgConfig v3.PasswordOrgConfig
|
|
if err := json.Unmarshal(passwordorgconfig, &passwordOrgConfig); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordConfigurationAPI.CreatePasswordOrgConfig(context.Background()).PasswordOrgConfig(passwordOrgConfig).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordConfigurationAPI.CreatePasswordOrgConfig(context.Background()).PasswordOrgConfig(passwordOrgConfig).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordConfigurationAPI.CreatePasswordOrgConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreatePasswordOrgConfig`: PasswordOrgConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordConfigurationAPI.CreatePasswordOrgConfig`: %v\n", resp)
|
|
}
|
|
- path: /password-org-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-configuration#get-password-org-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordConfigurationAPI.GetPasswordOrgConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordConfigurationAPI.GetPasswordOrgConfig(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordConfigurationAPI.GetPasswordOrgConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetPasswordOrgConfig`: PasswordOrgConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordConfigurationAPI.GetPasswordOrgConfig`: %v\n", resp)
|
|
}
|
|
- path: /password-org-config
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-configuration#put-password-org-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
passwordorgconfig := []byte(`{
|
|
"digitTokenLength" : 9,
|
|
"digitTokenEnabled" : true,
|
|
"digitTokenDurationMinutes" : 10,
|
|
"customInstructionsEnabled" : true
|
|
}`) // PasswordOrgConfig |
|
|
|
|
|
|
var passwordOrgConfig v3.PasswordOrgConfig
|
|
if err := json.Unmarshal(passwordorgconfig, &passwordOrgConfig); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordConfigurationAPI.PutPasswordOrgConfig(context.Background()).PasswordOrgConfig(passwordOrgConfig).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordConfigurationAPI.PutPasswordOrgConfig(context.Background()).PasswordOrgConfig(passwordOrgConfig).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordConfigurationAPI.PutPasswordOrgConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutPasswordOrgConfig`: PasswordOrgConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordConfigurationAPI.PutPasswordOrgConfig`: %v\n", resp)
|
|
}
|
|
- path: /password-dictionary
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-dictionary#get-password-dictionary
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordDictionaryAPI.GetPasswordDictionary(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordDictionaryAPI.GetPasswordDictionary(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordDictionaryAPI.GetPasswordDictionary``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetPasswordDictionary`: string
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordDictionaryAPI.GetPasswordDictionary`: %v\n", resp)
|
|
}
|
|
- path: /password-dictionary
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-dictionary#put-password-dictionary
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
file := BINARY_DATA_HERE // *os.File | (optional) # *os.File | (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.PasswordDictionaryAPI.PutPasswordDictionary(context.Background()).Execute()
|
|
//r, err := apiClient.V3.PasswordDictionaryAPI.PutPasswordDictionary(context.Background()).File(file).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordDictionaryAPI.PutPasswordDictionary``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /password-change-status/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-management#get-password-change-status
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `089899f13a8f4da7824996191587bab9` // string | Password change request ID # string | Password change request ID
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordManagementAPI.GetPasswordChangeStatus(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordManagementAPI.GetPasswordChangeStatus(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordManagementAPI.GetPasswordChangeStatus``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetPasswordChangeStatus`: PasswordStatus
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordManagementAPI.GetPasswordChangeStatus`: %v\n", resp)
|
|
}
|
|
- path: /query-password-info
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-management#query-password-info
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
passwordinfoquerydto := []byte(`{
|
|
"sourceName" : "My-AD",
|
|
"userName" : "Abby.Smith"
|
|
}`) // PasswordInfoQueryDTO |
|
|
|
|
|
|
var passwordInfoQueryDTO v3.PasswordInfoQueryDTO
|
|
if err := json.Unmarshal(passwordinfoquerydto, &passwordInfoQueryDTO); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordManagementAPI.QueryPasswordInfo(context.Background()).PasswordInfoQueryDTO(passwordInfoQueryDTO).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordManagementAPI.QueryPasswordInfo(context.Background()).PasswordInfoQueryDTO(passwordInfoQueryDTO).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordManagementAPI.QueryPasswordInfo``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `QueryPasswordInfo`: PasswordInfo
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordManagementAPI.QueryPasswordInfo`: %v\n", resp)
|
|
}
|
|
- path: /set-password
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-management#set-password
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
passwordchangerequest := []byte(`{
|
|
"sourceId" : "8a807d4c73c545510173c545d4b60246",
|
|
"accountId" : "CN=Abby Smith,OU=Austin,OU=Americas,OU=Demo,DC=seri,DC=acme,DC=com",
|
|
"identityId" : "8a807d4c73c545510173c545f0a002ff",
|
|
"publicKeyId" : "YWQ2NjQ4MTItZjY0NC00MWExLWFjMjktOGNmMzU3Y2VlNjk2",
|
|
"encryptedPassword" : "XzN+YwKgr2C+InkMYFMBG3UtjMEw5ZIql/XFlXo8cJNeslmkplx6vn4kd4/43IF9STBk5RnzR6XmjpEO+FwHDoiBwYZAkAZK/Iswxk4OdybG6Y4MStJCOCiK8osKr35IMMSV/mbO4wAeltoCk7daTWzTGLiI6UaT5tf+F2EgdjJZ7YqM8W8r7aUWsm3p2Xt01Y46ZRx0QaM91QruiIx2rECFT2pUO0wr+7oQ77jypATyGWRtADsu3YcvCk/6U5MqCnXMzKBcRas7NnZdSL/d5H1GglVGz3VLPMaivG4/oL4chOMmFCRl/zVsGxZ9RhN8rxsRGFFKn+rhExTi+bax3A=="
|
|
}`) // PasswordChangeRequest |
|
|
|
|
|
|
var passwordChangeRequest v3.PasswordChangeRequest
|
|
if err := json.Unmarshal(passwordchangerequest, &passwordChangeRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordManagementAPI.SetPassword(context.Background()).PasswordChangeRequest(passwordChangeRequest).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordManagementAPI.SetPassword(context.Background()).PasswordChangeRequest(passwordChangeRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordManagementAPI.SetPassword``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetPassword`: PasswordChangeResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordManagementAPI.SetPassword`: %v\n", resp)
|
|
}
|
|
- path: /password-policies
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-policies#create-password-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
passwordpolicyv3dto := []byte(`{
|
|
"validateAgainstAccountName" : true,
|
|
"minLength" : 8,
|
|
"description" : "Information about the Password Policy",
|
|
"requireStrongAuthUntrustedGeographies" : true,
|
|
"enablePasswdExpiration" : true,
|
|
"minNumeric" : 8,
|
|
"lastUpdated" : "2000-01-23T04:56:07.000+00:00",
|
|
"validateAgainstAccountId" : false,
|
|
"dateCreated" : "2000-01-23T04:56:07.000+00:00",
|
|
"accountNameMinWordLength" : 6,
|
|
"minUpper" : 8,
|
|
"firstExpirationReminder" : 45,
|
|
"modified" : "modified",
|
|
"id" : "2c91808e7d976f3b017d9f5ceae440c8",
|
|
"requireStrongAuthn" : true,
|
|
"useDictionary" : false,
|
|
"minSpecial" : 8,
|
|
"sourceIds" : [ "2c91808382ffee0b01830de154f14034", "2f98808382ffee0b01830de154f12134" ],
|
|
"passwordExpiration" : 8,
|
|
"maxRepeatedChars" : 3,
|
|
"minCharacterTypes" : 5,
|
|
"minAlpha" : 5,
|
|
"created" : "created",
|
|
"useAccountAttributes" : false,
|
|
"accountIdMinWordLength" : 4,
|
|
"minLower" : 8,
|
|
"useIdentityAttributes" : false,
|
|
"defaultPolicy" : true,
|
|
"requireStrongAuthOffNetwork" : true,
|
|
"name" : "PasswordPolicy Example",
|
|
"maxLength" : 25
|
|
}`) // PasswordPolicyV3Dto |
|
|
|
|
|
|
var passwordPolicyV3Dto v3.PasswordPolicyV3Dto
|
|
if err := json.Unmarshal(passwordpolicyv3dto, &passwordPolicyV3Dto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordPoliciesAPI.CreatePasswordPolicy(context.Background()).PasswordPolicyV3Dto(passwordPolicyV3Dto).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordPoliciesAPI.CreatePasswordPolicy(context.Background()).PasswordPolicyV3Dto(passwordPolicyV3Dto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordPoliciesAPI.CreatePasswordPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreatePasswordPolicy`: PasswordPolicyV3Dto
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordPoliciesAPI.CreatePasswordPolicy`: %v\n", resp)
|
|
}
|
|
- path: /password-policies/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-policies#delete-password-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ff808081838d9e9d01838da6a03e0002` // string | The ID of password policy to delete. # string | The ID of password policy to delete.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.PasswordPoliciesAPI.DeletePasswordPolicy(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.PasswordPoliciesAPI.DeletePasswordPolicy(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordPoliciesAPI.DeletePasswordPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /password-policies/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-policies#get-password-policy-by-id
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ff808081838d9e9d01838da6a03e0005` // string | The ID of password policy to retrieve. # string | The ID of password policy to retrieve.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordPoliciesAPI.GetPasswordPolicyById(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordPoliciesAPI.GetPasswordPolicyById(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordPoliciesAPI.GetPasswordPolicyById``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetPasswordPolicyById`: PasswordPolicyV3Dto
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordPoliciesAPI.GetPasswordPolicyById`: %v\n", resp)
|
|
}
|
|
- path: /password-policies
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-policies#list-password-policies
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordPoliciesAPI.ListPasswordPolicies(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordPoliciesAPI.ListPasswordPolicies(context.Background()).Limit(limit).Offset(offset).Count(count).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordPoliciesAPI.ListPasswordPolicies``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListPasswordPolicies`: []PasswordPolicyV3Dto
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordPoliciesAPI.ListPasswordPolicies`: %v\n", resp)
|
|
}
|
|
- path: /password-policies/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-policies#set-password-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ff808081838d9e9d01838da6a03e0007` // string | The ID of password policy to update. # string | The ID of password policy to update.
|
|
passwordpolicyv3dto := []byte(`{
|
|
"validateAgainstAccountName" : true,
|
|
"minLength" : 8,
|
|
"description" : "Information about the Password Policy",
|
|
"requireStrongAuthUntrustedGeographies" : true,
|
|
"enablePasswdExpiration" : true,
|
|
"minNumeric" : 8,
|
|
"lastUpdated" : "2000-01-23T04:56:07.000+00:00",
|
|
"validateAgainstAccountId" : false,
|
|
"dateCreated" : "2000-01-23T04:56:07.000+00:00",
|
|
"accountNameMinWordLength" : 6,
|
|
"minUpper" : 8,
|
|
"firstExpirationReminder" : 45,
|
|
"modified" : "modified",
|
|
"id" : "2c91808e7d976f3b017d9f5ceae440c8",
|
|
"requireStrongAuthn" : true,
|
|
"useDictionary" : false,
|
|
"minSpecial" : 8,
|
|
"sourceIds" : [ "2c91808382ffee0b01830de154f14034", "2f98808382ffee0b01830de154f12134" ],
|
|
"passwordExpiration" : 8,
|
|
"maxRepeatedChars" : 3,
|
|
"minCharacterTypes" : 5,
|
|
"minAlpha" : 5,
|
|
"created" : "created",
|
|
"useAccountAttributes" : false,
|
|
"accountIdMinWordLength" : 4,
|
|
"minLower" : 8,
|
|
"useIdentityAttributes" : false,
|
|
"defaultPolicy" : true,
|
|
"requireStrongAuthOffNetwork" : true,
|
|
"name" : "PasswordPolicy Example",
|
|
"maxLength" : 25
|
|
}`) // PasswordPolicyV3Dto |
|
|
|
|
|
|
var passwordPolicyV3Dto v3.PasswordPolicyV3Dto
|
|
if err := json.Unmarshal(passwordpolicyv3dto, &passwordPolicyV3Dto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordPoliciesAPI.SetPasswordPolicy(context.Background(), id).PasswordPolicyV3Dto(passwordPolicyV3Dto).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordPoliciesAPI.SetPasswordPolicy(context.Background(), id).PasswordPolicyV3Dto(passwordPolicyV3Dto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordPoliciesAPI.SetPasswordPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetPasswordPolicy`: PasswordPolicyV3Dto
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordPoliciesAPI.SetPasswordPolicy`: %v\n", resp)
|
|
}
|
|
- path: /password-sync-groups
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-sync-groups#create-password-sync-group
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
passwordsyncgroup := []byte(`{
|
|
"created" : "2023-03-16T04:00:00Z",
|
|
"name" : "Password Sync Group 1",
|
|
"modified" : "2023-03-16T04:00:00Z",
|
|
"passwordPolicyId" : "2c91808d744ba0ce01746f93b6204501",
|
|
"id" : "6881f631-3bd5-4213-9c75-8e05cc3e35dd",
|
|
"sourceIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ]
|
|
}`) // PasswordSyncGroup |
|
|
|
|
|
|
var passwordSyncGroup v3.PasswordSyncGroup
|
|
if err := json.Unmarshal(passwordsyncgroup, &passwordSyncGroup); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.CreatePasswordSyncGroup(context.Background()).PasswordSyncGroup(passwordSyncGroup).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.CreatePasswordSyncGroup(context.Background()).PasswordSyncGroup(passwordSyncGroup).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.CreatePasswordSyncGroup``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreatePasswordSyncGroup`: PasswordSyncGroup
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordSyncGroupsAPI.CreatePasswordSyncGroup`: %v\n", resp)
|
|
}
|
|
- path: /password-sync-groups/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-sync-groups#delete-password-sync-group
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `6881f631-3bd5-4213-9c75-8e05cc3e35dd` // string | The ID of password sync group to delete. # string | The ID of password sync group to delete.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.PasswordSyncGroupsAPI.DeletePasswordSyncGroup(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.PasswordSyncGroupsAPI.DeletePasswordSyncGroup(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.DeletePasswordSyncGroup``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /password-sync-groups/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-sync-groups#get-password-sync-group
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `6881f631-3bd5-4213-9c75-8e05cc3e35dd` // string | The ID of password sync group to retrieve. # string | The ID of password sync group to retrieve.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroup(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroup(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.GetPasswordSyncGroup``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetPasswordSyncGroup`: PasswordSyncGroup
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordSyncGroupsAPI.GetPasswordSyncGroup`: %v\n", resp)
|
|
}
|
|
- path: /password-sync-groups
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-sync-groups#get-password-sync-groups
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroups(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.GetPasswordSyncGroups(context.Background()).Limit(limit).Offset(offset).Count(count).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.GetPasswordSyncGroups``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetPasswordSyncGroups`: []PasswordSyncGroup
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordSyncGroupsAPI.GetPasswordSyncGroups`: %v\n", resp)
|
|
}
|
|
- path: /password-sync-groups/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/password-sync-groups#update-password-sync-group
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `6881f631-3bd5-4213-9c75-8e05cc3e35dd` // string | The ID of password sync group to update. # string | The ID of password sync group to update.
|
|
passwordsyncgroup := []byte(`{
|
|
"created" : "2023-03-16T04:00:00Z",
|
|
"name" : "Password Sync Group 1",
|
|
"modified" : "2023-03-16T04:00:00Z",
|
|
"passwordPolicyId" : "2c91808d744ba0ce01746f93b6204501",
|
|
"id" : "6881f631-3bd5-4213-9c75-8e05cc3e35dd",
|
|
"sourceIds" : [ "2c918084660f45d6016617daa9210584", "2c918084660f45d6016617daa9210500" ]
|
|
}`) // PasswordSyncGroup |
|
|
|
|
|
|
var passwordSyncGroup v3.PasswordSyncGroup
|
|
if err := json.Unmarshal(passwordsyncgroup, &passwordSyncGroup); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.UpdatePasswordSyncGroup(context.Background(), id).PasswordSyncGroup(passwordSyncGroup).Execute()
|
|
//resp, r, err := apiClient.V3.PasswordSyncGroupsAPI.UpdatePasswordSyncGroup(context.Background(), id).PasswordSyncGroup(passwordSyncGroup).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PasswordSyncGroupsAPI.UpdatePasswordSyncGroup``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdatePasswordSyncGroup`: PasswordSyncGroup
|
|
fmt.Fprintf(os.Stdout, "Response from `PasswordSyncGroupsAPI.UpdatePasswordSyncGroup`: %v\n", resp)
|
|
}
|
|
- path: /personal-access-tokens
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/personal-access-tokens#create-personal-access-token
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
createpersonalaccesstokenrequest := []byte(`{
|
|
"scope" : [ "demo:personal-access-token-scope:first", "demo:personal-access-token-scope:second" ],
|
|
"accessTokenValiditySeconds" : 36900,
|
|
"name" : "NodeJS Integration"
|
|
}`) // CreatePersonalAccessTokenRequest | Name and scope of personal access token.
|
|
|
|
|
|
var createPersonalAccessTokenRequest v3.CreatePersonalAccessTokenRequest
|
|
if err := json.Unmarshal(createpersonalaccesstokenrequest, &createPersonalAccessTokenRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PersonalAccessTokensAPI.CreatePersonalAccessToken(context.Background()).CreatePersonalAccessTokenRequest(createPersonalAccessTokenRequest).Execute()
|
|
//resp, r, err := apiClient.V3.PersonalAccessTokensAPI.CreatePersonalAccessToken(context.Background()).CreatePersonalAccessTokenRequest(createPersonalAccessTokenRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonalAccessTokensAPI.CreatePersonalAccessToken``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreatePersonalAccessToken`: CreatePersonalAccessTokenResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `PersonalAccessTokensAPI.CreatePersonalAccessToken`: %v\n", resp)
|
|
}
|
|
- path: /personal-access-tokens/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/personal-access-tokens#delete-personal-access-token
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The personal access token id # string | The personal access token id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.PersonalAccessTokensAPI.DeletePersonalAccessToken(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.PersonalAccessTokensAPI.DeletePersonalAccessToken(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonalAccessTokensAPI.DeletePersonalAccessToken``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /personal-access-tokens
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/personal-access-tokens#list-personal-access-tokens
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
ownerId := `2c9180867b50d088017b554662fb281e` // string | The identity ID of the owner whose personal access tokens should be listed. If \"me\", the caller should have the following right: 'idn:my-personal-access-tokens:read' If an actual owner ID or if the `owner-id` parameter is omitted in the request, the caller should have the following right: 'idn:all-personal-access-tokens:read'. If the caller has the following right, then managed personal access tokens associated with `owner-id` will be retrieved: 'idn:managed-personal-access-tokens:read' (optional) # string | The identity ID of the owner whose personal access tokens should be listed. If \"me\", the caller should have the following right: 'idn:my-personal-access-tokens:read' If an actual owner ID or if the `owner-id` parameter is omitted in the request, the caller should have the following right: 'idn:all-personal-access-tokens:read'. If the caller has the following right, then managed personal access tokens associated with `owner-id` will be retrieved: 'idn:managed-personal-access-tokens:read' (optional)
|
|
filters := `lastUsed le 2023-02-05T10:59:27.214Z` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **lastUsed**: *le, isnull* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **lastUsed**: *le, isnull* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PersonalAccessTokensAPI.ListPersonalAccessTokens(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.PersonalAccessTokensAPI.ListPersonalAccessTokens(context.Background()).OwnerId(ownerId).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonalAccessTokensAPI.ListPersonalAccessTokens``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListPersonalAccessTokens`: []GetPersonalAccessTokenResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `PersonalAccessTokensAPI.ListPersonalAccessTokens`: %v\n", resp)
|
|
}
|
|
- path: /personal-access-tokens/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/personal-access-tokens#patch-personal-access-token
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The Personal Access Token id # string | The Personal Access Token id
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/name, value=New name}, {op=replace, path=/scope, value=[sp:scopes:all]}]`) // []JsonPatchOperation | A list of OAuth client update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * scope
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PersonalAccessTokensAPI.PatchPersonalAccessToken(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.PersonalAccessTokensAPI.PatchPersonalAccessToken(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PersonalAccessTokensAPI.PatchPersonalAccessToken``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchPersonalAccessToken`: GetPersonalAccessTokenResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `PersonalAccessTokensAPI.PatchPersonalAccessToken`: %v\n", resp)
|
|
}
|
|
- path: /public-identities
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/public-identities#get-public-identities
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `firstname eq "John"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **alias**: *eq, sw* **email**: *eq, sw* **firstname**: *eq, sw* **lastname**: *eq, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **alias**: *eq, sw* **email**: *eq, sw* **firstname**: *eq, sw* **lastname**: *eq, sw* (optional)
|
|
addCoreFilters := false // bool | If *true*, only get identities which satisfy ALL the following criteria in addition to any criteria specified by *filters*: - Should be either correlated or protected. - Should not be \"spadmin\" or \"cloudadmin\". - uid should not be null. - lastname should not be null. - email should not be null. (optional) (default to false) # bool | If *true*, only get identities which satisfy ALL the following criteria in addition to any criteria specified by *filters*: - Should be either correlated or protected. - Should not be \"spadmin\" or \"cloudadmin\". - uid should not be null. - lastname should not be null. - email should not be null. (optional) (default to false)
|
|
sorters := `name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PublicIdentitiesAPI.GetPublicIdentities(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.PublicIdentitiesAPI.GetPublicIdentities(context.Background()).Limit(limit).Offset(offset).Count(count).Filters(filters).AddCoreFilters(addCoreFilters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PublicIdentitiesAPI.GetPublicIdentities``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetPublicIdentities`: []PublicIdentity
|
|
fmt.Fprintf(os.Stdout, "Response from `PublicIdentitiesAPI.GetPublicIdentities`: %v\n", resp)
|
|
}
|
|
- path: /public-identities-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/public-identities-config#get-public-identity-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PublicIdentitiesConfigAPI.GetPublicIdentityConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.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)
|
|
}
|
|
// response from `GetPublicIdentityConfig`: PublicIdentityConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `PublicIdentitiesConfigAPI.GetPublicIdentityConfig`: %v\n", resp)
|
|
}
|
|
- path: /public-identities-config
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/public-identities-config#update-public-identity-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
publicidentityconfig := []byte(`{
|
|
"modified" : "2018-06-25T20:22:28.104Z",
|
|
"attributes" : [ {
|
|
"name" : "Country",
|
|
"key" : "country"
|
|
}, {
|
|
"name" : "Country",
|
|
"key" : "country"
|
|
} ],
|
|
"modifiedBy" : {
|
|
"name" : "Thomas Edison",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
}
|
|
}`) // PublicIdentityConfig |
|
|
|
|
|
|
var publicIdentityConfig v3.PublicIdentityConfig
|
|
if err := json.Unmarshal(publicidentityconfig, &publicIdentityConfig); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.PublicIdentitiesConfigAPI.UpdatePublicIdentityConfig(context.Background()).PublicIdentityConfig(publicIdentityConfig).Execute()
|
|
//resp, r, err := apiClient.V3.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)
|
|
}
|
|
// response from `UpdatePublicIdentityConfig`: PublicIdentityConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `PublicIdentitiesConfigAPI.UpdatePublicIdentityConfig`: %v\n", resp)
|
|
}
|
|
- path: /reports/{id}/cancel
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/reports-data-extraction#cancel-report
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `a1ed223247144cc29d23c632624b4767` // string | ID of the running Report to cancel # string | ID of the running Report to cancel
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ReportsDataExtractionAPI.CancelReport(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.ReportsDataExtractionAPI.CancelReport(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ReportsDataExtractionAPI.CancelReport``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /reports/{taskResultId}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/reports-data-extraction#get-report
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
taskResultId := `ef38f94347e94562b5bb8424a56397d8` // string | Unique identifier of the task result which handled report # string | Unique identifier of the task result which handled report
|
|
fileFormat := `csv` // string | Output format of the requested report file # string | Output format of the requested report file
|
|
name := `Identities Details Report` // string | preferred Report file name, by default will be used report name from task result. (optional) # string | preferred Report file name, by default will be used report name from task result. (optional)
|
|
auditable := true // bool | Enables auditing for current report download. Will create an audit event and sent it to the REPORT cloud-audit kafka topic. Event will be created if there is any result present by requested taskResultId. (optional) (default to false) # bool | Enables auditing for current report download. Will create an audit event and sent it to the REPORT cloud-audit kafka topic. Event will be created if there is any result present by requested taskResultId. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ReportsDataExtractionAPI.GetReport(context.Background(), taskResultId).FileFormat(fileFormat).Execute()
|
|
//resp, r, err := apiClient.V3.ReportsDataExtractionAPI.GetReport(context.Background(), taskResultId).FileFormat(fileFormat).Name(name).Auditable(auditable).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ReportsDataExtractionAPI.GetReport``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetReport`: *os.File
|
|
fmt.Fprintf(os.Stdout, "Response from `ReportsDataExtractionAPI.GetReport`: %v\n", resp)
|
|
}
|
|
- path: /reports/{taskResultId}/result
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/reports-data-extraction#get-report-result
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
taskResultId := `ef38f94347e94562b5bb8424a56397d8` // string | Unique identifier of the task result which handled report # string | Unique identifier of the task result which handled report
|
|
completed := true // bool | state of task result to apply ordering when results are fetching from the DB (optional) (default to false) # bool | state of task result to apply ordering when results are fetching from the DB (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ReportsDataExtractionAPI.GetReportResult(context.Background(), taskResultId).Execute()
|
|
//resp, r, err := apiClient.V3.ReportsDataExtractionAPI.GetReportResult(context.Background(), taskResultId).Completed(completed).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ReportsDataExtractionAPI.GetReportResult``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetReportResult`: ReportResults
|
|
fmt.Fprintf(os.Stdout, "Response from `ReportsDataExtractionAPI.GetReportResult`: %v\n", resp)
|
|
}
|
|
- path: /reports/run
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/reports-data-extraction#start-report
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
reportdetails := []byte(`{
|
|
"reportType" : "ACCOUNTS",
|
|
"arguments" : {
|
|
"application" : "2c9180897e7742b2017e781782f705b9",
|
|
"sourceName" : "Active Directory"
|
|
}
|
|
}`) // ReportDetails |
|
|
|
|
|
|
var reportDetails v3.ReportDetails
|
|
if err := json.Unmarshal(reportdetails, &reportDetails); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ReportsDataExtractionAPI.StartReport(context.Background()).ReportDetails(reportDetails).Execute()
|
|
//resp, r, err := apiClient.V3.ReportsDataExtractionAPI.StartReport(context.Background()).ReportDetails(reportDetails).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ReportsDataExtractionAPI.StartReport``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartReport`: TaskResultDetails
|
|
fmt.Fprintf(os.Stdout, "Response from `ReportsDataExtractionAPI.StartReport`: %v\n", resp)
|
|
}
|
|
- path: /requestable-objects
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/requestable-objects#list-requestable-objects
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identityId := `e7eab60924f64aa284175b9fa3309599` // string | If present, the value returns only requestable objects for the specified identity. * Admin users can call this with any identity ID value. * Non-admin users can only specify *me* or pass their own identity ID value. * If absent, returns a list of all requestable objects for the tenant. Only admin users can make such a call. In this case, the available, pending, assigned accesses will not be annotated in the result. (optional) # string | If present, the value returns only requestable objects for the specified identity. * Admin users can call this with any identity ID value. * Non-admin users can only specify *me* or pass their own identity ID value. * If absent, returns a list of all requestable objects for the tenant. Only admin users can make such a call. In this case, the available, pending, assigned accesses will not be annotated in the result. (optional)
|
|
types := []byte(`ACCESS_PROFILE,ROLE`) // []string | Filters the results to the specified type/types, where each type is one of `ROLE` or `ACCESS_PROFILE`. If absent, all types are returned. SailPoint may add support for additional types in the future without notice. (optional)
|
|
term := `Finance Role` // string | Allows searching requestable access items with a partial match on the name or description. If `term` is provided, then the API will ignore the `filter` query parameter. (optional) # string | Allows searching requestable access items with a partial match on the name or description. If `term` is provided, then the API will ignore the `filter` query parameter. (optional)
|
|
statuses := []byte(`[ASSIGNED, PENDING]`) // []RequestableObjectRequestStatus | Filters the result to the specified status/statuses, where each status is one of `AVAILABLE`, `ASSIGNED`, or `PENDING`. Specifying this parameter without also specifying an `identity-id` parameter results in an error. SailPoint may add additional statuses in the future without notice. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `name sw "bob"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, in, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, in, sw* (optional)
|
|
sorters := `name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.RequestableObjectsAPI.ListRequestableObjects(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.RequestableObjectsAPI.ListRequestableObjects(context.Background()).IdentityId(identityId).Types(types).Term(term).Statuses(statuses).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `RequestableObjectsAPI.ListRequestableObjects``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListRequestableObjects`: []RequestableObject
|
|
fmt.Fprintf(os.Stdout, "Response from `RequestableObjectsAPI.ListRequestableObjects`: %v\n", resp)
|
|
}
|
|
- path: /roles
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/roles#create-role
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
role := []byte(`{
|
|
"owner" : {
|
|
"name" : "support",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"entitlements" : [ {
|
|
"name" : "CN=entitlement.490efde5,OU=OrgCo,OU=ServiceDept,DC=HQAD,DC=local",
|
|
"id" : "2c91809773dee32014e13e122092014e",
|
|
"type" : "ENTITLEMENT"
|
|
}, {
|
|
"name" : "CN=entitlement.490efde5,OU=OrgCo,OU=ServiceDept,DC=HQAD,DC=local",
|
|
"id" : "2c91809773dee32014e13e122092014e",
|
|
"type" : "ENTITLEMENT"
|
|
} ],
|
|
"dimensional" : false,
|
|
"created" : "2021-03-01T22:32:58.104Z",
|
|
"dimensionRefs" : [ {
|
|
"name" : "Role 2",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "DIMENSION"
|
|
}, {
|
|
"name" : "Role 2",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "DIMENSION"
|
|
} ],
|
|
"description" : "Urna amet cursus pellentesque nisl orci maximus lorem nisl euismod fusce morbi placerat adipiscing maecenas nisi tristique et metus et lacus sed morbi nunc nisl maximus magna arcu varius sollicitudin elementum enim maecenas nisi id ipsum tempus fusce diam ipsum tortor.",
|
|
"membership" : {
|
|
"identities" : [ {
|
|
"aliasName" : "t.edison",
|
|
"name" : "Thomas Edison",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
}, {
|
|
"aliasName" : "t.edison",
|
|
"name" : "Thomas Edison",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
} ],
|
|
"criteria" : {
|
|
"stringValue" : "carlee.cert1c9f9b6fd@mailinator.com",
|
|
"children" : [ {
|
|
"stringValue" : "carlee.cert1c9f9b6fd@mailinator.com",
|
|
"children" : [ {
|
|
"stringValue" : "carlee.cert1c9f9b6fd@mailinator.com",
|
|
"operation" : "EQUALS",
|
|
"key" : {
|
|
"sourceId" : "2c9180867427f3a301745aec18211519",
|
|
"property" : "attribute.email",
|
|
"type" : "ACCOUNT"
|
|
}
|
|
}, {
|
|
"stringValue" : "carlee.cert1c9f9b6fd@mailinator.com",
|
|
"operation" : "EQUALS",
|
|
"key" : {
|
|
"sourceId" : "2c9180867427f3a301745aec18211519",
|
|
"property" : "attribute.email",
|
|
"type" : "ACCOUNT"
|
|
}
|
|
} ],
|
|
"operation" : "EQUALS",
|
|
"key" : {
|
|
"sourceId" : "2c9180867427f3a301745aec18211519",
|
|
"property" : "attribute.email",
|
|
"type" : "ACCOUNT"
|
|
}
|
|
}, {
|
|
"stringValue" : "carlee.cert1c9f9b6fd@mailinator.com",
|
|
"children" : [ {
|
|
"stringValue" : "carlee.cert1c9f9b6fd@mailinator.com",
|
|
"operation" : "EQUALS",
|
|
"key" : {
|
|
"sourceId" : "2c9180867427f3a301745aec18211519",
|
|
"property" : "attribute.email",
|
|
"type" : "ACCOUNT"
|
|
}
|
|
}, {
|
|
"stringValue" : "carlee.cert1c9f9b6fd@mailinator.com",
|
|
"operation" : "EQUALS",
|
|
"key" : {
|
|
"sourceId" : "2c9180867427f3a301745aec18211519",
|
|
"property" : "attribute.email",
|
|
"type" : "ACCOUNT"
|
|
}
|
|
} ],
|
|
"operation" : "EQUALS",
|
|
"key" : {
|
|
"sourceId" : "2c9180867427f3a301745aec18211519",
|
|
"property" : "attribute.email",
|
|
"type" : "ACCOUNT"
|
|
}
|
|
} ],
|
|
"operation" : "EQUALS",
|
|
"key" : {
|
|
"sourceId" : "2c9180867427f3a301745aec18211519",
|
|
"property" : "attribute.email",
|
|
"type" : "ACCOUNT"
|
|
}
|
|
},
|
|
"type" : "IDENTITY_LIST"
|
|
},
|
|
"enabled" : true,
|
|
"revocationRequestConfig" : {
|
|
"commentsRequired" : false,
|
|
"approvalSchemes" : [ {
|
|
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
|
|
"approverType" : "GOVERNANCE_GROUP"
|
|
}, {
|
|
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
|
|
"approverType" : "GOVERNANCE_GROUP"
|
|
} ],
|
|
"denialCommentsRequired" : false
|
|
},
|
|
"segments" : [ "f7b1b8a3-5fed-4fd4-ad29-82014e137e19", "29cb6c06-1da8-43ea-8be4-b3125f248f2a" ],
|
|
"legacyMembershipInfo" : {
|
|
"type" : "IDENTITY_LIST"
|
|
},
|
|
"accessRequestConfig" : {
|
|
"commentsRequired" : true,
|
|
"reauthorizationRequired" : true,
|
|
"approvalSchemes" : [ {
|
|
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
|
|
"approverType" : "GOVERNANCE_GROUP"
|
|
}, {
|
|
"approverId" : "46c79819-a69f-49a2-becb-12c971ae66c6",
|
|
"approverType" : "GOVERNANCE_GROUP"
|
|
} ],
|
|
"denialCommentsRequired" : true
|
|
},
|
|
"accessProfiles" : [ {
|
|
"name" : "Access Profile 2567",
|
|
"id" : "ff808081751e6e129f1518161919ecca",
|
|
"type" : "ACCESS_PROFILE"
|
|
}, {
|
|
"name" : "Access Profile 2567",
|
|
"id" : "ff808081751e6e129f1518161919ecca",
|
|
"type" : "ACCESS_PROFILE"
|
|
} ],
|
|
"name" : "Role 2567",
|
|
"modified" : "2021-03-02T20:22:28.104Z",
|
|
"accessModelMetadata" : {
|
|
"attributes" : [ {
|
|
"key" : "iscPrivacy",
|
|
"name" : "Privacy",
|
|
"multiselect" : false,
|
|
"status" : "active",
|
|
"type" : "governance",
|
|
"objectTypes" : [ "all" ],
|
|
"description" : "Specifies the level of privacy associated with an access item.",
|
|
"values" : [ {
|
|
"value" : "public",
|
|
"name" : "Public",
|
|
"status" : "active"
|
|
} ]
|
|
} ]
|
|
},
|
|
"id" : "2c918086749d78830174a1a40e121518",
|
|
"requestable" : true
|
|
}`) // Role |
|
|
|
|
|
|
var role v3.Role
|
|
if err := json.Unmarshal(role, &role); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.RolesAPI.CreateRole(context.Background()).Role(role).Execute()
|
|
//resp, r, err := apiClient.V3.RolesAPI.CreateRole(context.Background()).Role(role).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `RolesAPI.CreateRole``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateRole`: Role
|
|
fmt.Fprintf(os.Stdout, "Response from `RolesAPI.CreateRole`: %v\n", resp)
|
|
}
|
|
- path: /roles/bulk-delete
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/roles#delete-bulk-roles
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
rolebulkdeleterequest := []byte(`{
|
|
"roleIds" : [ "2c9180847812e0b1017817051919ecca", "2c9180887812e0b201781e129f151816" ]
|
|
}`) // RoleBulkDeleteRequest |
|
|
|
|
|
|
var roleBulkDeleteRequest v3.RoleBulkDeleteRequest
|
|
if err := json.Unmarshal(rolebulkdeleterequest, &roleBulkDeleteRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.RolesAPI.DeleteBulkRoles(context.Background()).RoleBulkDeleteRequest(roleBulkDeleteRequest).Execute()
|
|
//resp, r, err := apiClient.V3.RolesAPI.DeleteBulkRoles(context.Background()).RoleBulkDeleteRequest(roleBulkDeleteRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `RolesAPI.DeleteBulkRoles``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteBulkRoles`: TaskResultDto
|
|
fmt.Fprintf(os.Stdout, "Response from `RolesAPI.DeleteBulkRoles`: %v\n", resp)
|
|
}
|
|
- path: /roles/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/roles#delete-role
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808a7813090a017814121e121518` // string | Role ID. # string | Role ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.RolesAPI.DeleteRole(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.RolesAPI.DeleteRole(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `RolesAPI.DeleteRole``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /roles/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/roles#get-role
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808a7813090a017814121e121518` // string | Role ID. # string | Role ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.RolesAPI.GetRole(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.RolesAPI.GetRole(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `RolesAPI.GetRole``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetRole`: Role
|
|
fmt.Fprintf(os.Stdout, "Response from `RolesAPI.GetRole`: %v\n", resp)
|
|
}
|
|
- path: /roles/{id}/assigned-identities
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/roles#get-role-assigned-identities
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808a7813090a017814121e121518` // string | ID of the Role for which the assigned Identities are to be listed # string | ID of the Role for which the assigned Identities are to be listed
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `name sw Joe` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **aliasName**: *eq, sw* **email**: *eq, sw* **name**: *eq, sw, co* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **aliasName**: *eq, sw* **email**: *eq, sw* **name**: *eq, sw, co* (optional)
|
|
sorters := `aliasName,name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, aliasName, email** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, aliasName, email** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.RolesAPI.GetRoleAssignedIdentities(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.RolesAPI.GetRoleAssignedIdentities(context.Background(), id).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `RolesAPI.GetRoleAssignedIdentities``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetRoleAssignedIdentities`: []RoleIdentity
|
|
fmt.Fprintf(os.Stdout, "Response from `RolesAPI.GetRoleAssignedIdentities`: %v\n", resp)
|
|
}
|
|
- path: /roles
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/roles#list-roles
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
forSubadmin := `5168015d32f890ca15812c9180835d2e` // string | If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value **me**, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the **for-subadmin** parameter is specified for an Identity that is not a subadmin. (optional) # string | If provided, filters the returned list according to what is visible to the indicated ROLE_SUBADMIN Identity. The value of the parameter is either an Identity ID, or the special value **me**, which is shorthand for the calling Identity's ID. A 400 Bad Request error is returned if the **for-subadmin** parameter is specified for an Identity that is not a subadmin. (optional)
|
|
limit := 50 // int32 | Note that for this API the maximum value for limit is 50. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50) # int32 | Note that for this API the maximum value for limit is 50. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 50)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `requestable eq false` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **created**: *gt, ge, le* **modified**: *lt, ge, le* **owner.id**: *eq, in* **requestable**: *eq* **dimensional**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, sw* **created**: *gt, ge, le* **modified**: *lt, ge, le* **owner.id**: *eq, in* **requestable**: *eq* **dimensional**: *eq* (optional)
|
|
sorters := `name,-modified` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name, created, modified** (optional)
|
|
forSegmentIds := `0b5c9f25-83c6-4762-9073-e38f7bb2ae26,2e8d8180-24bc-4d21-91c6-7affdb473b0d` // string | If present and not empty, additionally filters Roles to those which are assigned to the Segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error. (optional) # string | If present and not empty, additionally filters Roles to those which are assigned to the Segment(s) with the specified IDs. If segmentation is currently unavailable, specifying this parameter results in an error. (optional)
|
|
includeUnsegmented := false // bool | Whether or not the response list should contain unsegmented Roles. If *for-segment-ids* is absent or empty, specifying *include-unsegmented* as false results in an error. (optional) (default to true) # bool | Whether or not the response list should contain unsegmented Roles. If *for-segment-ids* is absent or empty, specifying *include-unsegmented* as false results in an error. (optional) (default to true)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.RolesAPI.ListRoles(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.RolesAPI.ListRoles(context.Background()).ForSubadmin(forSubadmin).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).ForSegmentIds(forSegmentIds).IncludeUnsegmented(includeUnsegmented).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `RolesAPI.ListRoles``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListRoles`: []Role
|
|
fmt.Fprintf(os.Stdout, "Response from `RolesAPI.ListRoles`: %v\n", resp)
|
|
}
|
|
- path: /roles/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/roles#patch-role
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808a7813090a017814121e121518` // string | Role ID to patch # string | Role ID to patch
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/requestable, value=true}, {op=replace, path=/enabled, value=true}]`) // []JsonPatchOperation |
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.RolesAPI.PatchRole(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.RolesAPI.PatchRole(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `RolesAPI.PatchRole``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchRole`: Role
|
|
fmt.Fprintf(os.Stdout, "Response from `RolesAPI.PatchRole`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#create-sod-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sodpolicyrequest := []byte(`{
|
|
"conflictingAccessCriteria" : {
|
|
"leftCriteria" : {
|
|
"name" : "money-in",
|
|
"criteriaList" : [ {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c9180866166b5b0016167c32ef31a66",
|
|
"name" : "Administrator"
|
|
}, {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c9180866166b5b0016167c32ef31a67",
|
|
"name" : "Administrator"
|
|
} ]
|
|
},
|
|
"rightCriteria" : {
|
|
"name" : "money-in",
|
|
"criteriaList" : [ {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c9180866166b5b0016167c32ef31a66",
|
|
"name" : "Administrator"
|
|
}, {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c9180866166b5b0016167c32ef31a67",
|
|
"name" : "Administrator"
|
|
} ]
|
|
}
|
|
},
|
|
"ownerRef" : {
|
|
"name" : "Support",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"created" : "2020-01-01T00:00:00Z",
|
|
"scheduled" : true,
|
|
"creatorId" : "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde",
|
|
"modifierId" : "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde",
|
|
"description" : "This policy ensures compliance of xyz",
|
|
"violationOwnerAssignmentConfig" : {
|
|
"assignmentRule" : "MANAGER",
|
|
"ownerRef" : {
|
|
"name" : "Support",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
}
|
|
},
|
|
"correctionAdvice" : "Based on the role of the employee, managers should remove access that is not required for their job function.",
|
|
"type" : "GENERAL",
|
|
"tags" : [ "TAG1", "TAG2" ],
|
|
"name" : "policy-xyz",
|
|
"modified" : "2020-01-01T00:00:00Z",
|
|
"policyQuery" : "@access(id:0f11f2a4-7c94-4bf3-a2bd-742580fe3bdg) AND @access(id:0f11f2a4-7c94-4bf3-a2bd-742580fe3bdf)",
|
|
"compensatingControls" : "Have a manager review the transaction decisions for their \"out of compliance\" employee",
|
|
"id" : "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde",
|
|
"state" : "ENFORCED",
|
|
"externalPolicyReference" : "XYZ policy"
|
|
}`) // SodPolicyRequest |
|
|
|
|
|
|
var sodPolicyRequest v3.SodPolicyRequest
|
|
if err := json.Unmarshal(sodpolicyrequest, &sodPolicyRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.CreateSodPolicy(context.Background()).SodPolicyRequest(sodPolicyRequest).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.CreateSodPolicy(context.Background()).SodPolicyRequest(sodPolicyRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.CreateSodPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateSodPolicy`: SodPolicyRead
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.CreateSodPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#delete-sod-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The ID of the SOD Policy to delete. # string | The ID of the SOD Policy to delete.
|
|
logical := true // bool | Indicates whether this is a soft delete (logical true) or a hard delete. Soft delete marks the policy as deleted and just save it with this status. It could be fully deleted or recovered further. Hard delete vise versa permanently delete SOD request during this call. (optional) (default to true) # bool | Indicates whether this is a soft delete (logical true) or a hard delete. Soft delete marks the policy as deleted and just save it with this status. It could be fully deleted or recovered further. Hard delete vise versa permanently delete SOD request during this call. (optional) (default to true)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SODPoliciesAPI.DeleteSodPolicy(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.SODPoliciesAPI.DeleteSodPolicy(context.Background(), id).Logical(logical).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.DeleteSodPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /sod-policies/{id}/schedule
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#delete-sod-policy-schedule
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The ID of the SOD policy the schedule must be deleted for. # string | The ID of the SOD policy the schedule must be deleted for.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SODPoliciesAPI.DeleteSodPolicySchedule(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.SODPoliciesAPI.DeleteSodPolicySchedule(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.DeleteSodPolicySchedule``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /sod-violation-report/{reportResultId}/download/{fileName}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#get-custom-violation-report
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
reportResultId := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the report reference to download. # string | The ID of the report reference to download.
|
|
fileName := `custom-name` // string | Custom Name for the file. # string | Custom Name for the file.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.GetCustomViolationReport(context.Background(), reportResultId, fileName).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.GetCustomViolationReport(context.Background(), reportResultId, fileName).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.GetCustomViolationReport``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCustomViolationReport`: *os.File
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.GetCustomViolationReport`: %v\n", resp)
|
|
}
|
|
- path: /sod-violation-report/{reportResultId}/download
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#get-default-violation-report
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
reportResultId := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the report reference to download. # string | The ID of the report reference to download.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.GetDefaultViolationReport(context.Background(), reportResultId).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.GetDefaultViolationReport(context.Background(), reportResultId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.GetDefaultViolationReport``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetDefaultViolationReport`: *os.File
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.GetDefaultViolationReport`: %v\n", resp)
|
|
}
|
|
- path: /sod-violation-report
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#get-sod-all-report-run-status
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodAllReportRunStatus(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodAllReportRunStatus(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.GetSodAllReportRunStatus``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSodAllReportRunStatus`: ReportResultReference
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.GetSodAllReportRunStatus`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#get-sod-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The ID of the SOD Policy to retrieve. # string | The ID of the SOD Policy to retrieve.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodPolicy(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodPolicy(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.GetSodPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSodPolicy`: SodPolicyRead
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.GetSodPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/{id}/schedule
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#get-sod-policy-schedule
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The ID of the SOD policy schedule to retrieve. # string | The ID of the SOD policy schedule to retrieve.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodPolicySchedule(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodPolicySchedule(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.GetSodPolicySchedule``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSodPolicySchedule`: SodPolicySchedule
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.GetSodPolicySchedule`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/sod-violation-report-status/{reportResultId}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#get-sod-violation-report-run-status
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
reportResultId := `2e8d8180-24bc-4d21-91c6-7affdb473b0d` // string | The ID of the report reference to retrieve. # string | The ID of the report reference to retrieve.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodViolationReportRunStatus(context.Background(), reportResultId).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodViolationReportRunStatus(context.Background(), reportResultId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.GetSodViolationReportRunStatus``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSodViolationReportRunStatus`: ReportResultReference
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.GetSodViolationReportRunStatus`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/{id}/violation-report
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#get-sod-violation-report-status
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The ID of the violation report to retrieve status for. # string | The ID of the violation report to retrieve status for.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodViolationReportStatus(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.GetSodViolationReportStatus(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.GetSodViolationReportStatus``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSodViolationReportStatus`: ReportResultReference
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.GetSodViolationReportStatus`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#list-sod-policies
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `id eq "bc693f07e7b645539626c25954c58554"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, in* **state**: *eq, in* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq, in* **state**: *eq, in* (optional)
|
|
sorters := `id,name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, created, modified, description** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **id, name, created, modified, description** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.ListSodPolicies(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.ListSodPolicies(context.Background()).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.ListSodPolicies``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListSodPolicies`: []SodPolicyRead
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.ListSodPolicies`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#patch-sod-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c918083-5d19-1a86-015d-28455b4a2329` // string | The ID of the SOD policy being modified. # string | The ID of the SOD policy being modified.
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/description, value=Modified description}, {op=replace, path=/conflictingAccessCriteria/leftCriteria/name, value=money-in-modified}, {op=replace, path=/conflictingAccessCriteria/rightCriteria, value={name=money-out-modified, criteriaList=[{type=ENTITLEMENT, id=2c918087682f9a86016839c0509c1ab2}]}}]`) // []JsonPatchOperation | A list of SOD Policy update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * ownerRef * externalPolicyReference * compensatingControls * correctionAdvice * state * tags * violationOwnerAssignmentConfig * scheduled * conflictingAccessCriteria
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.PatchSodPolicy(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.PatchSodPolicy(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.PatchSodPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchSodPolicy`: SodPolicyRead
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.PatchSodPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/{id}/schedule
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#put-policy-schedule
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The ID of the SOD policy to update its schedule. # string | The ID of the SOD policy to update its schedule.
|
|
sodpolicyschedule := []byte(`{
|
|
"schedule" : {
|
|
"hours" : {
|
|
"values" : [ "MON", "WED" ],
|
|
"interval" : 3,
|
|
"type" : "LIST"
|
|
},
|
|
"months" : {
|
|
"values" : [ "MON", "WED" ],
|
|
"interval" : 3,
|
|
"type" : "LIST"
|
|
},
|
|
"timeZoneId" : "America/Chicago",
|
|
"days" : {
|
|
"values" : [ "MON", "WED" ],
|
|
"interval" : 3,
|
|
"type" : "LIST"
|
|
},
|
|
"expiration" : "2018-06-25T20:22:28.104Z",
|
|
"type" : "WEEKLY"
|
|
},
|
|
"created" : "2020-01-01T00:00:00Z",
|
|
"recipients" : [ {
|
|
"name" : "Michael Michaels",
|
|
"id" : "2c7180a46faadee4016fb4e018c20642",
|
|
"type" : "IDENTITY"
|
|
}, {
|
|
"name" : "Michael Michaels",
|
|
"id" : "2c7180a46faadee4016fb4e018c20642",
|
|
"type" : "IDENTITY"
|
|
} ],
|
|
"name" : "SCH-1584312283015",
|
|
"creatorId" : "0f11f2a47c944bf3a2bd742580fe3bde",
|
|
"modifierId" : "0f11f2a47c944bf3a2bd742580fe3bde",
|
|
"modified" : "2020-01-01T00:00:00Z",
|
|
"description" : "Schedule for policy xyz",
|
|
"emailEmptyResults" : false
|
|
}`) // SodPolicySchedule |
|
|
|
|
|
|
var sodPolicySchedule v3.SodPolicySchedule
|
|
if err := json.Unmarshal(sodpolicyschedule, &sodPolicySchedule); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.PutPolicySchedule(context.Background(), id).SodPolicySchedule(sodPolicySchedule).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.PutPolicySchedule(context.Background(), id).SodPolicySchedule(sodPolicySchedule).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.PutPolicySchedule``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutPolicySchedule`: SodPolicySchedule
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.PutPolicySchedule`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#put-sod-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The ID of the SOD policy to update. # string | The ID of the SOD policy to update.
|
|
sodpolicyread := []byte(`{
|
|
"conflictingAccessCriteria" : {
|
|
"leftCriteria" : {
|
|
"name" : "money-in",
|
|
"criteriaList" : [ {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c9180866166b5b0016167c32ef31a66",
|
|
"name" : "Administrator"
|
|
}, {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c9180866166b5b0016167c32ef31a67",
|
|
"name" : "Administrator"
|
|
} ]
|
|
},
|
|
"rightCriteria" : {
|
|
"name" : "money-in",
|
|
"criteriaList" : [ {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c9180866166b5b0016167c32ef31a66",
|
|
"name" : "Administrator"
|
|
}, {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c9180866166b5b0016167c32ef31a67",
|
|
"name" : "Administrator"
|
|
} ]
|
|
}
|
|
},
|
|
"ownerRef" : {
|
|
"name" : "Support",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"created" : "2020-01-01T00:00:00Z",
|
|
"scheduled" : true,
|
|
"creatorId" : "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde",
|
|
"modifierId" : "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde",
|
|
"description" : "This policy ensures compliance of xyz",
|
|
"violationOwnerAssignmentConfig" : {
|
|
"assignmentRule" : "MANAGER",
|
|
"ownerRef" : {
|
|
"name" : "Support",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
}
|
|
},
|
|
"correctionAdvice" : "Based on the role of the employee, managers should remove access that is not required for their job function.",
|
|
"type" : "GENERAL",
|
|
"tags" : [ "TAG1", "TAG2" ],
|
|
"name" : "policy-xyz",
|
|
"modified" : "2020-01-01T00:00:00Z",
|
|
"policyQuery" : "@access(id:0f11f2a4-7c94-4bf3-a2bd-742580fe3bdg) AND @access(id:0f11f2a4-7c94-4bf3-a2bd-742580fe3bdf)",
|
|
"compensatingControls" : "Have a manager review the transaction decisions for their \"out of compliance\" employee",
|
|
"id" : "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde",
|
|
"state" : "ENFORCED",
|
|
"externalPolicyReference" : "XYZ policy"
|
|
}`) // SodPolicyRead |
|
|
|
|
|
|
var sodPolicyRead v3.SodPolicyRead
|
|
if err := json.Unmarshal(sodpolicyread, &sodPolicyRead); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.PutSodPolicy(context.Background(), id).SodPolicyRead(sodPolicyRead).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.PutSodPolicy(context.Background(), id).SodPolicyRead(sodPolicyRead).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.PutSodPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutSodPolicy`: SodPolicyRead
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.PutSodPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/{id}/evaluate
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#start-evaluate-sod-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The SOD policy ID to run. # string | The SOD policy ID to run.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.StartEvaluateSodPolicy(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.StartEvaluateSodPolicy(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.StartEvaluateSodPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartEvaluateSodPolicy`: ReportResultReference
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.StartEvaluateSodPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sod-violation-report/run
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#start-sod-all-policies-for-org
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
multipolicyrequest := []byte(`{
|
|
"filteredPolicyList" : [ "[b868cd40-ffa4-4337-9c07-1a51846cfa94, 63a07a7b-39a4-48aa-956d-50c827deba2a]", "[b868cd40-ffa4-4337-9c07-1a51846cfa94, 63a07a7b-39a4-48aa-956d-50c827deba2a]" ]
|
|
}`) // MultiPolicyRequest | (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.StartSodAllPoliciesForOrg(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.StartSodAllPoliciesForOrg(context.Background()).MultiPolicyRequest(multiPolicyRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.StartSodAllPoliciesForOrg``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartSodAllPoliciesForOrg`: ReportResultReference
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.StartSodAllPoliciesForOrg`: %v\n", resp)
|
|
}
|
|
- path: /sod-policies/{id}/violation-report/run
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-policies#start-sod-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The SOD policy ID to run. # string | The SOD policy ID to run.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODPoliciesAPI.StartSodPolicy(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SODPoliciesAPI.StartSodPolicy(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODPoliciesAPI.StartSodPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartSodPolicy`: ReportResultReference
|
|
fmt.Fprintf(os.Stdout, "Response from `SODPoliciesAPI.StartSodPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sod-violations/predict
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-violations#start-predict-sod-violations
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identitywithnewaccess := []byte(`{
|
|
"identityId" : "2c91808568c529c60168cca6f90c1313",
|
|
"accessRefs" : [ {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c918087682f9a86016839c050861ab1",
|
|
"name" : "CN=Information Access,OU=test,OU=test-service,DC=TestAD,DC=local"
|
|
}, {
|
|
"type" : "ENTITLEMENT",
|
|
"id" : "2c918087682f9a86016839c0509c1ab2",
|
|
"name" : "CN=Information Technology,OU=test,OU=test-service,DC=TestAD,DC=local"
|
|
} ]
|
|
}`) // IdentityWithNewAccess |
|
|
|
|
|
|
var identityWithNewAccess v3.IdentityWithNewAccess
|
|
if err := json.Unmarshal(identitywithnewaccess, &identityWithNewAccess); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODViolationsAPI.StartPredictSodViolations(context.Background()).IdentityWithNewAccess(identityWithNewAccess).Execute()
|
|
//resp, r, err := apiClient.V3.SODViolationsAPI.StartPredictSodViolations(context.Background()).IdentityWithNewAccess(identityWithNewAccess).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODViolationsAPI.StartPredictSodViolations``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartPredictSodViolations`: ViolationPrediction
|
|
fmt.Fprintf(os.Stdout, "Response from `SODViolationsAPI.StartPredictSodViolations`: %v\n", resp)
|
|
}
|
|
- path: /sod-violations/check
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sod-violations#start-violation-check
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
identitywithnewaccess1 := []byte(`{identityId=2c91808568c529c60168cca6f90c1313, accessRefs=[{type=ENTITLEMENT, id=2c918087682f9a86016839c050861ab1, name=CN=Information Access,OU=test,OU=test-service,DC=TestAD,DC=local}, {type=ENTITLEMENT, id=2c918087682f9a86016839c0509c1ab2, name=CN=Information Technology,OU=test,OU=test-service,DC=TestAD,DC=local}], clientMetadata={additionalProp1=string, additionalProp2=string, additionalProp3=string}}`) // IdentityWithNewAccess1 |
|
|
|
|
|
|
var identityWithNewAccess1 v3.IdentityWithNewAccess1
|
|
if err := json.Unmarshal(identitywithnewaccess1, &identityWithNewAccess1); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SODViolationsAPI.StartViolationCheck(context.Background()).IdentityWithNewAccess1(identityWithNewAccess1).Execute()
|
|
//resp, r, err := apiClient.V3.SODViolationsAPI.StartViolationCheck(context.Background()).IdentityWithNewAccess1(identityWithNewAccess1).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SODViolationsAPI.StartViolationCheck``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `StartViolationCheck`: SodViolationCheck
|
|
fmt.Fprintf(os.Stdout, "Response from `SODViolationsAPI.StartViolationCheck`: %v\n", resp)
|
|
}
|
|
- path: /saved-searches
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/saved-search#create-saved-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
createsavedsearchrequest := []byte(``) // CreateSavedSearchRequest | The saved search to persist.
|
|
|
|
|
|
var createSavedSearchRequest v3.CreateSavedSearchRequest
|
|
if err := json.Unmarshal(createsavedsearchrequest, &createSavedSearchRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SavedSearchAPI.CreateSavedSearch(context.Background()).CreateSavedSearchRequest(createSavedSearchRequest).Execute()
|
|
//resp, r, err := apiClient.V3.SavedSearchAPI.CreateSavedSearch(context.Background()).CreateSavedSearchRequest(createSavedSearchRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SavedSearchAPI.CreateSavedSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateSavedSearch`: SavedSearch
|
|
fmt.Fprintf(os.Stdout, "Response from `SavedSearchAPI.CreateSavedSearch`: %v\n", resp)
|
|
}
|
|
- path: /saved-searches/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/saved-search#delete-saved-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808568c529c60168cca6f90c1313` // string | ID of the requested document. # string | ID of the requested document.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SavedSearchAPI.DeleteSavedSearch(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.SavedSearchAPI.DeleteSavedSearch(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SavedSearchAPI.DeleteSavedSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /saved-searches/{id}/execute
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/saved-search#execute-saved-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808568c529c60168cca6f90c1313` // string | ID of the requested document. # string | ID of the requested document.
|
|
searcharguments := []byte(`{
|
|
"owner" : "",
|
|
"recipients" : [ {
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
}, {
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
} ],
|
|
"scheduleId" : "7a724640-0c17-4ce9-a8c3-4a89738459c8"
|
|
}`) // SearchArguments | When saved search execution is triggered by a scheduled search, *scheduleId* will specify the ID of the triggering scheduled search. If *scheduleId* is not specified (when execution is triggered by a UI test), the *owner* and *recipients* arguments must be provided.
|
|
|
|
|
|
var searchArguments v3.SearchArguments
|
|
if err := json.Unmarshal(searcharguments, &searchArguments); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SavedSearchAPI.ExecuteSavedSearch(context.Background(), id).SearchArguments(searchArguments).Execute()
|
|
//r, err := apiClient.V3.SavedSearchAPI.ExecuteSavedSearch(context.Background(), id).SearchArguments(searchArguments).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SavedSearchAPI.ExecuteSavedSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /saved-searches/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/saved-search#get-saved-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808568c529c60168cca6f90c1313` // string | ID of the requested document. # string | ID of the requested document.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SavedSearchAPI.GetSavedSearch(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SavedSearchAPI.GetSavedSearch(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SavedSearchAPI.GetSavedSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSavedSearch`: SavedSearch
|
|
fmt.Fprintf(os.Stdout, "Response from `SavedSearchAPI.GetSavedSearch`: %v\n", resp)
|
|
}
|
|
- path: /saved-searches
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/saved-search#list-saved-searches
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `owner.id eq "7a724640-0c17-4ce9-a8c3-4a89738459c8"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **owner.id**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **owner.id**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SavedSearchAPI.ListSavedSearches(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.SavedSearchAPI.ListSavedSearches(context.Background()).Offset(offset).Limit(limit).Count(count).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SavedSearchAPI.ListSavedSearches``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListSavedSearches`: []SavedSearch
|
|
fmt.Fprintf(os.Stdout, "Response from `SavedSearchAPI.ListSavedSearches`: %v\n", resp)
|
|
}
|
|
- path: /saved-searches/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/saved-search#put-saved-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808568c529c60168cca6f90c1313` // string | ID of the requested document. # string | ID of the requested document.
|
|
savedsearch := []byte(`{
|
|
"owner" : {
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"created" : "2018-06-25T20:22:28.104Z",
|
|
"columns" : {
|
|
"identity" : [ {
|
|
"field" : "displayName",
|
|
"header" : "Display Name"
|
|
}, {
|
|
"field" : "e-mail",
|
|
"header" : "Work Email"
|
|
} ]
|
|
},
|
|
"query" : "@accounts(disabled:true)",
|
|
"description" : "Disabled accounts",
|
|
"orderBy" : {
|
|
"identity" : [ "lastName", "firstName" ],
|
|
"role" : [ "name" ]
|
|
},
|
|
"sort" : [ "displayName" ],
|
|
"filters" : {
|
|
"terms" : [ "account_count", "account_count" ],
|
|
"range" : {
|
|
"lower" : {
|
|
"inclusive" : false,
|
|
"value" : "1"
|
|
},
|
|
"upper" : {
|
|
"inclusive" : false,
|
|
"value" : "1"
|
|
}
|
|
},
|
|
"exclude" : false,
|
|
"type" : "RANGE"
|
|
},
|
|
"ownerId" : "2c91808568c529c60168cca6f90c1313",
|
|
"indices" : [ "identities" ],
|
|
"public" : false,
|
|
"name" : "Disabled accounts",
|
|
"modified" : "2018-06-25T20:22:28.104Z",
|
|
"id" : "0de46054-fe90-434a-b84e-c6b3359d0c64",
|
|
"fields" : [ "disabled" ]
|
|
}`) // SavedSearch | The saved search to persist.
|
|
|
|
|
|
var savedSearch v3.SavedSearch
|
|
if err := json.Unmarshal(savedsearch, &savedSearch); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SavedSearchAPI.PutSavedSearch(context.Background(), id).SavedSearch(savedSearch).Execute()
|
|
//resp, r, err := apiClient.V3.SavedSearchAPI.PutSavedSearch(context.Background(), id).SavedSearch(savedSearch).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SavedSearchAPI.PutSavedSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutSavedSearch`: SavedSearch
|
|
fmt.Fprintf(os.Stdout, "Response from `SavedSearchAPI.PutSavedSearch`: %v\n", resp)
|
|
}
|
|
- path: /scheduled-searches
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/scheduled-search#create-scheduled-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
createscheduledsearchrequest := []byte(`{savedSearchId=9c620e13-cd33-4804-a13d-403bd7bcdbad, schedule={type=DAILY, hours={type=LIST, values=[9]}}, recipients=[{type=IDENTITY, id=2c9180867624cbd7017642d8c8c81f67}]}`) // CreateScheduledSearchRequest | The scheduled search to persist.
|
|
|
|
|
|
var createScheduledSearchRequest v3.CreateScheduledSearchRequest
|
|
if err := json.Unmarshal(createscheduledsearchrequest, &createScheduledSearchRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ScheduledSearchAPI.CreateScheduledSearch(context.Background()).CreateScheduledSearchRequest(createScheduledSearchRequest).Execute()
|
|
//resp, r, err := apiClient.V3.ScheduledSearchAPI.CreateScheduledSearch(context.Background()).CreateScheduledSearchRequest(createScheduledSearchRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduledSearchAPI.CreateScheduledSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateScheduledSearch`: ScheduledSearch
|
|
fmt.Fprintf(os.Stdout, "Response from `ScheduledSearchAPI.CreateScheduledSearch`: %v\n", resp)
|
|
}
|
|
- path: /scheduled-searches/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/scheduled-search#delete-scheduled-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808568c529c60168cca6f90c1313` // string | ID of the requested document. # string | ID of the requested document.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ScheduledSearchAPI.DeleteScheduledSearch(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.ScheduledSearchAPI.DeleteScheduledSearch(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduledSearchAPI.DeleteScheduledSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /scheduled-searches/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/scheduled-search#get-scheduled-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808568c529c60168cca6f90c1313` // string | ID of the requested document. # string | ID of the requested document.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ScheduledSearchAPI.GetScheduledSearch(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.ScheduledSearchAPI.GetScheduledSearch(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduledSearchAPI.GetScheduledSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetScheduledSearch`: ScheduledSearch
|
|
fmt.Fprintf(os.Stdout, "Response from `ScheduledSearchAPI.GetScheduledSearch`: %v\n", resp)
|
|
}
|
|
- path: /scheduled-searches
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/scheduled-search#list-scheduled-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `savedSearchId eq "6cc0945d-9eeb-4948-9033-72d066e1153e"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **owner.id**: *eq* **savedSearchId**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **owner.id**: *eq* **savedSearchId**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ScheduledSearchAPI.ListScheduledSearch(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ScheduledSearchAPI.ListScheduledSearch(context.Background()).Offset(offset).Limit(limit).Count(count).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduledSearchAPI.ListScheduledSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListScheduledSearch`: []ScheduledSearch
|
|
fmt.Fprintf(os.Stdout, "Response from `ScheduledSearchAPI.ListScheduledSearch`: %v\n", resp)
|
|
}
|
|
- path: /scheduled-searches/{id}/unsubscribe
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/scheduled-search#unsubscribe-scheduled-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808568c529c60168cca6f90c1313` // string | ID of the requested document. # string | ID of the requested document.
|
|
typedreference := []byte(`{
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
}`) // TypedReference | The recipient to be removed from the scheduled search.
|
|
|
|
|
|
var typedReference v3.TypedReference
|
|
if err := json.Unmarshal(typedreference, &typedReference); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ScheduledSearchAPI.UnsubscribeScheduledSearch(context.Background(), id).TypedReference(typedReference).Execute()
|
|
//r, err := apiClient.V3.ScheduledSearchAPI.UnsubscribeScheduledSearch(context.Background(), id).TypedReference(typedReference).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduledSearchAPI.UnsubscribeScheduledSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /scheduled-searches/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/scheduled-search#update-scheduled-search
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c91808568c529c60168cca6f90c1313` // string | ID of the requested document. # string | ID of the requested document.
|
|
scheduledsearch := []byte(`{
|
|
"owner" : {
|
|
"id" : "2c9180867624cbd7017642d8c8c81f67",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"displayQueryDetails" : false,
|
|
"created" : "",
|
|
"description" : "Daily disabled accounts",
|
|
"ownerId" : "2c9180867624cbd7017642d8c8c81f67",
|
|
"enabled" : false,
|
|
"schedule" : {
|
|
"hours" : {
|
|
"values" : [ "MON", "WED" ],
|
|
"interval" : 3,
|
|
"type" : "LIST"
|
|
},
|
|
"months" : {
|
|
"values" : [ "MON", "WED" ],
|
|
"interval" : 3,
|
|
"type" : "LIST"
|
|
},
|
|
"timeZoneId" : "America/Chicago",
|
|
"days" : {
|
|
"values" : [ "MON", "WED" ],
|
|
"interval" : 3,
|
|
"type" : "LIST"
|
|
},
|
|
"expiration" : "2018-06-25T20:22:28.104Z",
|
|
"type" : "WEEKLY"
|
|
},
|
|
"recipients" : [ {
|
|
"id" : "2c9180867624cbd7017642d8c8c81f67",
|
|
"type" : "IDENTITY"
|
|
}, {
|
|
"id" : "2c9180867624cbd7017642d8c8c81f67",
|
|
"type" : "IDENTITY"
|
|
} ],
|
|
"savedSearchId" : "554f1511-f0a1-4744-ab14-599514d3e57c",
|
|
"name" : "Daily disabled accounts",
|
|
"modified" : "",
|
|
"id" : "0de46054-fe90-434a-b84e-c6b3359d0c64",
|
|
"emailEmptyResults" : false
|
|
}`) // ScheduledSearch | The scheduled search to persist.
|
|
|
|
|
|
var scheduledSearch v3.ScheduledSearch
|
|
if err := json.Unmarshal(scheduledsearch, &scheduledSearch); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ScheduledSearchAPI.UpdateScheduledSearch(context.Background(), id).ScheduledSearch(scheduledSearch).Execute()
|
|
//resp, r, err := apiClient.V3.ScheduledSearchAPI.UpdateScheduledSearch(context.Background(), id).ScheduledSearch(scheduledSearch).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ScheduledSearchAPI.UpdateScheduledSearch``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateScheduledSearch`: ScheduledSearch
|
|
fmt.Fprintf(os.Stdout, "Response from `ScheduledSearchAPI.UpdateScheduledSearch`: %v\n", resp)
|
|
}
|
|
- path: /search/aggregate
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/search#search-aggregate
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
search := []byte(`{
|
|
"queryDsl" : {
|
|
"match" : {
|
|
"name" : "john.doe"
|
|
}
|
|
},
|
|
"aggregationType" : "DSL",
|
|
"aggregationsVersion" : "",
|
|
"query" : {
|
|
"query" : "name:a*",
|
|
"timeZone" : "America/Chicago",
|
|
"fields" : "[firstName,lastName,email]",
|
|
"innerHit" : {
|
|
"query" : "source.name:\\\"Active Directory\\\"",
|
|
"type" : "access"
|
|
}
|
|
},
|
|
"aggregationsDsl" : { },
|
|
"sort" : [ "displayName", "+id" ],
|
|
"filters" : { },
|
|
"queryVersion" : "",
|
|
"queryType" : "SAILPOINT",
|
|
"includeNested" : true,
|
|
"queryResultFilter" : {
|
|
"excludes" : [ "stacktrace" ],
|
|
"includes" : [ "name", "displayName" ]
|
|
},
|
|
"indices" : [ "identities" ],
|
|
"typeAheadQuery" : {
|
|
"field" : "source.name",
|
|
"size" : 100,
|
|
"query" : "Work",
|
|
"sortByValue" : true,
|
|
"nestedType" : "access",
|
|
"sort" : "asc",
|
|
"maxExpansions" : 10
|
|
},
|
|
"textQuery" : {
|
|
"contains" : true,
|
|
"terms" : [ "The quick brown fox", "3141592", "7" ],
|
|
"matchAny" : false,
|
|
"fields" : [ "displayName", "employeeNumber", "roleCount" ]
|
|
},
|
|
"searchAfter" : [ "John Doe", "2c91808375d8e80a0175e1f88a575221" ],
|
|
"aggregations" : {
|
|
"filter" : {
|
|
"field" : "access.type",
|
|
"name" : "Entitlements",
|
|
"type" : "TERM",
|
|
"value" : "ENTITLEMENT"
|
|
},
|
|
"bucket" : {
|
|
"field" : "attributes.city",
|
|
"size" : 100,
|
|
"minDocCount" : 2,
|
|
"name" : "Identity Locations",
|
|
"type" : "TERMS"
|
|
},
|
|
"metric" : {
|
|
"field" : "@access.name",
|
|
"name" : "Access Name Count",
|
|
"type" : "COUNT"
|
|
},
|
|
"subAggregation" : {
|
|
"filter" : {
|
|
"field" : "access.type",
|
|
"name" : "Entitlements",
|
|
"type" : "TERM",
|
|
"value" : "ENTITLEMENT"
|
|
},
|
|
"bucket" : {
|
|
"field" : "attributes.city",
|
|
"size" : 100,
|
|
"minDocCount" : 2,
|
|
"name" : "Identity Locations",
|
|
"type" : "TERMS"
|
|
},
|
|
"metric" : {
|
|
"field" : "@access.name",
|
|
"name" : "Access Name Count",
|
|
"type" : "COUNT"
|
|
},
|
|
"subAggregation" : {
|
|
"filter" : {
|
|
"field" : "access.type",
|
|
"name" : "Entitlements",
|
|
"type" : "TERM",
|
|
"value" : "ENTITLEMENT"
|
|
},
|
|
"bucket" : {
|
|
"field" : "attributes.city",
|
|
"size" : 100,
|
|
"minDocCount" : 2,
|
|
"name" : "Identity Locations",
|
|
"type" : "TERMS"
|
|
},
|
|
"metric" : {
|
|
"field" : "@access.name",
|
|
"name" : "Access Name Count",
|
|
"type" : "COUNT"
|
|
},
|
|
"nested" : {
|
|
"name" : "id",
|
|
"type" : "access"
|
|
}
|
|
},
|
|
"nested" : {
|
|
"name" : "id",
|
|
"type" : "access"
|
|
}
|
|
},
|
|
"nested" : {
|
|
"name" : "id",
|
|
"type" : "access"
|
|
}
|
|
}
|
|
}`) // Search |
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
|
|
|
|
var search v3.Search
|
|
if err := json.Unmarshal(search, &search); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SearchAPI.SearchAggregate(context.Background()).Search(search).Execute()
|
|
//resp, r, err := apiClient.V3.SearchAPI.SearchAggregate(context.Background()).Search(search).Offset(offset).Limit(limit).Count(count).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.SearchAggregate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SearchAggregate`: AggregationResult
|
|
fmt.Fprintf(os.Stdout, "Response from `SearchAPI.SearchAggregate`: %v\n", resp)
|
|
}
|
|
- path: /search/count
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/search#search-count
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
search := []byte(`{
|
|
"queryDsl" : {
|
|
"match" : {
|
|
"name" : "john.doe"
|
|
}
|
|
},
|
|
"aggregationType" : "DSL",
|
|
"aggregationsVersion" : "",
|
|
"query" : {
|
|
"query" : "name:a*",
|
|
"timeZone" : "America/Chicago",
|
|
"fields" : "[firstName,lastName,email]",
|
|
"innerHit" : {
|
|
"query" : "source.name:\\\"Active Directory\\\"",
|
|
"type" : "access"
|
|
}
|
|
},
|
|
"aggregationsDsl" : { },
|
|
"sort" : [ "displayName", "+id" ],
|
|
"filters" : { },
|
|
"queryVersion" : "",
|
|
"queryType" : "SAILPOINT",
|
|
"includeNested" : true,
|
|
"queryResultFilter" : {
|
|
"excludes" : [ "stacktrace" ],
|
|
"includes" : [ "name", "displayName" ]
|
|
},
|
|
"indices" : [ "identities" ],
|
|
"typeAheadQuery" : {
|
|
"field" : "source.name",
|
|
"size" : 100,
|
|
"query" : "Work",
|
|
"sortByValue" : true,
|
|
"nestedType" : "access",
|
|
"sort" : "asc",
|
|
"maxExpansions" : 10
|
|
},
|
|
"textQuery" : {
|
|
"contains" : true,
|
|
"terms" : [ "The quick brown fox", "3141592", "7" ],
|
|
"matchAny" : false,
|
|
"fields" : [ "displayName", "employeeNumber", "roleCount" ]
|
|
},
|
|
"searchAfter" : [ "John Doe", "2c91808375d8e80a0175e1f88a575221" ],
|
|
"aggregations" : {
|
|
"filter" : {
|
|
"field" : "access.type",
|
|
"name" : "Entitlements",
|
|
"type" : "TERM",
|
|
"value" : "ENTITLEMENT"
|
|
},
|
|
"bucket" : {
|
|
"field" : "attributes.city",
|
|
"size" : 100,
|
|
"minDocCount" : 2,
|
|
"name" : "Identity Locations",
|
|
"type" : "TERMS"
|
|
},
|
|
"metric" : {
|
|
"field" : "@access.name",
|
|
"name" : "Access Name Count",
|
|
"type" : "COUNT"
|
|
},
|
|
"subAggregation" : {
|
|
"filter" : {
|
|
"field" : "access.type",
|
|
"name" : "Entitlements",
|
|
"type" : "TERM",
|
|
"value" : "ENTITLEMENT"
|
|
},
|
|
"bucket" : {
|
|
"field" : "attributes.city",
|
|
"size" : 100,
|
|
"minDocCount" : 2,
|
|
"name" : "Identity Locations",
|
|
"type" : "TERMS"
|
|
},
|
|
"metric" : {
|
|
"field" : "@access.name",
|
|
"name" : "Access Name Count",
|
|
"type" : "COUNT"
|
|
},
|
|
"subAggregation" : {
|
|
"filter" : {
|
|
"field" : "access.type",
|
|
"name" : "Entitlements",
|
|
"type" : "TERM",
|
|
"value" : "ENTITLEMENT"
|
|
},
|
|
"bucket" : {
|
|
"field" : "attributes.city",
|
|
"size" : 100,
|
|
"minDocCount" : 2,
|
|
"name" : "Identity Locations",
|
|
"type" : "TERMS"
|
|
},
|
|
"metric" : {
|
|
"field" : "@access.name",
|
|
"name" : "Access Name Count",
|
|
"type" : "COUNT"
|
|
},
|
|
"nested" : {
|
|
"name" : "id",
|
|
"type" : "access"
|
|
}
|
|
},
|
|
"nested" : {
|
|
"name" : "id",
|
|
"type" : "access"
|
|
}
|
|
},
|
|
"nested" : {
|
|
"name" : "id",
|
|
"type" : "access"
|
|
}
|
|
}
|
|
}`) // Search |
|
|
|
|
|
|
var search v3.Search
|
|
if err := json.Unmarshal(search, &search); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SearchAPI.SearchCount(context.Background()).Search(search).Execute()
|
|
//r, err := apiClient.V3.SearchAPI.SearchCount(context.Background()).Search(search).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.SearchCount``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /search/{index}/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/search#search-get
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
index := `identities` // string | The index from which to fetch the specified document. The currently supported index names are: *accessprofiles*, *accountactivities*, *entitlements*, *events*, *identities*, and *roles*. # string | The index from which to fetch the specified document. The currently supported index names are: *accessprofiles*, *accountactivities*, *entitlements*, *events*, *identities*, and *roles*.
|
|
id := `2c91808568c529c60168cca6f90c1313` // string | ID of the requested document. # string | ID of the requested document.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SearchAPI.SearchGet(context.Background(), index, id).Execute()
|
|
//resp, r, err := apiClient.V3.SearchAPI.SearchGet(context.Background(), index, id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.SearchGet``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SearchGet`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `SearchAPI.SearchGet`: %v\n", resp)
|
|
}
|
|
- path: /search
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/search#search-post
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
search := []byte(`{
|
|
"queryDsl" : {
|
|
"match" : {
|
|
"name" : "john.doe"
|
|
}
|
|
},
|
|
"aggregationType" : "DSL",
|
|
"aggregationsVersion" : "",
|
|
"query" : {
|
|
"query" : "name:a*",
|
|
"timeZone" : "America/Chicago",
|
|
"fields" : "[firstName,lastName,email]",
|
|
"innerHit" : {
|
|
"query" : "source.name:\\\"Active Directory\\\"",
|
|
"type" : "access"
|
|
}
|
|
},
|
|
"aggregationsDsl" : { },
|
|
"sort" : [ "displayName", "+id" ],
|
|
"filters" : { },
|
|
"queryVersion" : "",
|
|
"queryType" : "SAILPOINT",
|
|
"includeNested" : true,
|
|
"queryResultFilter" : {
|
|
"excludes" : [ "stacktrace" ],
|
|
"includes" : [ "name", "displayName" ]
|
|
},
|
|
"indices" : [ "identities" ],
|
|
"typeAheadQuery" : {
|
|
"field" : "source.name",
|
|
"size" : 100,
|
|
"query" : "Work",
|
|
"sortByValue" : true,
|
|
"nestedType" : "access",
|
|
"sort" : "asc",
|
|
"maxExpansions" : 10
|
|
},
|
|
"textQuery" : {
|
|
"contains" : true,
|
|
"terms" : [ "The quick brown fox", "3141592", "7" ],
|
|
"matchAny" : false,
|
|
"fields" : [ "displayName", "employeeNumber", "roleCount" ]
|
|
},
|
|
"searchAfter" : [ "John Doe", "2c91808375d8e80a0175e1f88a575221" ],
|
|
"aggregations" : {
|
|
"filter" : {
|
|
"field" : "access.type",
|
|
"name" : "Entitlements",
|
|
"type" : "TERM",
|
|
"value" : "ENTITLEMENT"
|
|
},
|
|
"bucket" : {
|
|
"field" : "attributes.city",
|
|
"size" : 100,
|
|
"minDocCount" : 2,
|
|
"name" : "Identity Locations",
|
|
"type" : "TERMS"
|
|
},
|
|
"metric" : {
|
|
"field" : "@access.name",
|
|
"name" : "Access Name Count",
|
|
"type" : "COUNT"
|
|
},
|
|
"subAggregation" : {
|
|
"filter" : {
|
|
"field" : "access.type",
|
|
"name" : "Entitlements",
|
|
"type" : "TERM",
|
|
"value" : "ENTITLEMENT"
|
|
},
|
|
"bucket" : {
|
|
"field" : "attributes.city",
|
|
"size" : 100,
|
|
"minDocCount" : 2,
|
|
"name" : "Identity Locations",
|
|
"type" : "TERMS"
|
|
},
|
|
"metric" : {
|
|
"field" : "@access.name",
|
|
"name" : "Access Name Count",
|
|
"type" : "COUNT"
|
|
},
|
|
"subAggregation" : {
|
|
"filter" : {
|
|
"field" : "access.type",
|
|
"name" : "Entitlements",
|
|
"type" : "TERM",
|
|
"value" : "ENTITLEMENT"
|
|
},
|
|
"bucket" : {
|
|
"field" : "attributes.city",
|
|
"size" : 100,
|
|
"minDocCount" : 2,
|
|
"name" : "Identity Locations",
|
|
"type" : "TERMS"
|
|
},
|
|
"metric" : {
|
|
"field" : "@access.name",
|
|
"name" : "Access Name Count",
|
|
"type" : "COUNT"
|
|
},
|
|
"nested" : {
|
|
"name" : "id",
|
|
"type" : "access"
|
|
}
|
|
},
|
|
"nested" : {
|
|
"name" : "id",
|
|
"type" : "access"
|
|
}
|
|
},
|
|
"nested" : {
|
|
"name" : "id",
|
|
"type" : "access"
|
|
}
|
|
}
|
|
}`) // Search |
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
limit := 10000 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
|
|
|
|
var search v3.Search
|
|
if err := json.Unmarshal(search, &search); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SearchAPI.SearchPost(context.Background()).Search(search).Execute()
|
|
//resp, r, err := apiClient.V3.SearchAPI.SearchPost(context.Background()).Search(search).Offset(offset).Limit(limit).Count(count).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.SearchPost``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SearchPost`: []map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `SearchAPI.SearchPost`: %v\n", resp)
|
|
}
|
|
- path: /accounts/search-attribute-config
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/search-attribute-configuration#create-search-attribute-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
searchattributeconfig := []byte(`{
|
|
"displayName" : "New Mail Attribute",
|
|
"name" : "newMailAttribute",
|
|
"applicationAttributes" : {
|
|
"2c91808b79fd2422017a0b35d30f3968" : "employeeNumber",
|
|
"2c91808b79fd2422017a0b36008f396b" : "employeeNumber"
|
|
}
|
|
}`) // SearchAttributeConfig |
|
|
|
|
|
|
var searchAttributeConfig v3.SearchAttributeConfig
|
|
if err := json.Unmarshal(searchattributeconfig, &searchAttributeConfig); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SearchAttributeConfigurationAPI.CreateSearchAttributeConfig(context.Background()).SearchAttributeConfig(searchAttributeConfig).Execute()
|
|
//resp, r, err := apiClient.V3.SearchAttributeConfigurationAPI.CreateSearchAttributeConfig(context.Background()).SearchAttributeConfig(searchAttributeConfig).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SearchAttributeConfigurationAPI.CreateSearchAttributeConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateSearchAttributeConfig`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `SearchAttributeConfigurationAPI.CreateSearchAttributeConfig`: %v\n", resp)
|
|
}
|
|
- path: /accounts/search-attribute-config/{name}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/search-attribute-configuration#delete-search-attribute-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
name := `newMailAttribute` // string | Name of the extended search attribute configuration to delete. # string | Name of the extended search attribute configuration to delete.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SearchAttributeConfigurationAPI.DeleteSearchAttributeConfig(context.Background(), name).Execute()
|
|
//r, err := apiClient.V3.SearchAttributeConfigurationAPI.DeleteSearchAttributeConfig(context.Background(), name).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SearchAttributeConfigurationAPI.DeleteSearchAttributeConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /accounts/search-attribute-config
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/search-attribute-configuration#get-search-attribute-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SearchAttributeConfigurationAPI.GetSearchAttributeConfig(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.SearchAttributeConfigurationAPI.GetSearchAttributeConfig(context.Background()).Limit(limit).Offset(offset).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SearchAttributeConfigurationAPI.GetSearchAttributeConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSearchAttributeConfig`: []SearchAttributeConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `SearchAttributeConfigurationAPI.GetSearchAttributeConfig`: %v\n", resp)
|
|
}
|
|
- path: /accounts/search-attribute-config/{name}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/search-attribute-configuration#get-single-search-attribute-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
name := `newMailAttribute` // string | Name of the extended search attribute configuration to retrieve. # string | Name of the extended search attribute configuration to retrieve.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SearchAttributeConfigurationAPI.GetSingleSearchAttributeConfig(context.Background(), name).Execute()
|
|
//resp, r, err := apiClient.V3.SearchAttributeConfigurationAPI.GetSingleSearchAttributeConfig(context.Background(), name).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SearchAttributeConfigurationAPI.GetSingleSearchAttributeConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSingleSearchAttributeConfig`: []SearchAttributeConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `SearchAttributeConfigurationAPI.GetSingleSearchAttributeConfig`: %v\n", resp)
|
|
}
|
|
- path: /accounts/search-attribute-config/{name}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/search-attribute-configuration#patch-search-attribute-config
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
name := `promotedMailAttribute` // string | Name of the search attribute configuration to patch. # string | Name of the search attribute configuration to patch.
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/name, value=newAttributeName}, {op=replace, path=/displayName, value=new attribute display name}, {op=add, path=/applicationAttributes, value={2c91808b79fd2422017a0b35d30f3968=employeeNumber}}]`) // []JsonPatchOperation |
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SearchAttributeConfigurationAPI.PatchSearchAttributeConfig(context.Background(), name).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.SearchAttributeConfigurationAPI.PatchSearchAttributeConfig(context.Background(), name).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SearchAttributeConfigurationAPI.PatchSearchAttributeConfig``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchSearchAttributeConfig`: SearchAttributeConfig
|
|
fmt.Fprintf(os.Stdout, "Response from `SearchAttributeConfigurationAPI.PatchSearchAttributeConfig`: %v\n", resp)
|
|
}
|
|
- path: /segments
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/segments#create-segment
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
segment := []byte(`{
|
|
"owner" : {
|
|
"name" : "support",
|
|
"id" : "2c9180a46faadee4016fb4e018c20639",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"created" : "2020-01-01T00:00:00Z",
|
|
"visibilityCriteria" : {
|
|
"expression" : {
|
|
"children" : [ ],
|
|
"attribute" : "location",
|
|
"value" : {
|
|
"type" : "STRING",
|
|
"value" : "Austin"
|
|
},
|
|
"operator" : "EQUALS"
|
|
}
|
|
},
|
|
"name" : "segment-xyz",
|
|
"modified" : "2020-01-01T00:00:00Z",
|
|
"description" : "This segment represents xyz",
|
|
"active" : true,
|
|
"id" : "0f11f2a4-7c94-4bf3-a2bd-742580fe3bde"
|
|
}`) // Segment |
|
|
|
|
|
|
var segment v3.Segment
|
|
if err := json.Unmarshal(segment, &segment); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SegmentsAPI.CreateSegment(context.Background()).Segment(segment).Execute()
|
|
//resp, r, err := apiClient.V3.SegmentsAPI.CreateSegment(context.Background()).Segment(segment).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SegmentsAPI.CreateSegment``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateSegment`: Segment
|
|
fmt.Fprintf(os.Stdout, "Response from `SegmentsAPI.CreateSegment`: %v\n", resp)
|
|
}
|
|
- path: /segments/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/segments#delete-segment
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The segment ID to delete. # string | The segment ID to delete.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SegmentsAPI.DeleteSegment(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.SegmentsAPI.DeleteSegment(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SegmentsAPI.DeleteSegment``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /segments/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/segments#get-segment
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The segment ID to retrieve. # string | The segment ID to retrieve.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SegmentsAPI.GetSegment(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SegmentsAPI.GetSegment(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SegmentsAPI.GetSegment``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSegment`: Segment
|
|
fmt.Fprintf(os.Stdout, "Response from `SegmentsAPI.GetSegment`: %v\n", resp)
|
|
}
|
|
- path: /segments
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/segments#list-segments
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SegmentsAPI.ListSegments(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.SegmentsAPI.ListSegments(context.Background()).Limit(limit).Offset(offset).Count(count).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SegmentsAPI.ListSegments``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListSegments`: []Segment
|
|
fmt.Fprintf(os.Stdout, "Response from `SegmentsAPI.ListSegments`: %v\n", resp)
|
|
}
|
|
- path: /segments/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/segments#patch-segment
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The segment ID to modify. # string | The segment ID to modify.
|
|
requestbody := []byte(`[{op=replace, path=/visibilityCriteria, value={expression={operator=AND, children=[{operator=EQUALS, attribute=location, value={type=STRING, value=Philadelphia}}, {operator=EQUALS, attribute=department, value={type=STRING, value=HR}}]}}}]`) // []map[string]interface{} | A list of segment update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * description * owner * visibilityCriteria * active
|
|
|
|
|
|
var requestBody []v3.RequestBody
|
|
if err := json.Unmarshal(requestbody, &requestBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SegmentsAPI.PatchSegment(context.Background(), id).RequestBody(requestBody).Execute()
|
|
//resp, r, err := apiClient.V3.SegmentsAPI.PatchSegment(context.Background(), id).RequestBody(requestBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SegmentsAPI.PatchSegment``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchSegment`: Segment
|
|
fmt.Fprintf(os.Stdout, "Response from `SegmentsAPI.PatchSegment`: %v\n", resp)
|
|
}
|
|
- path: /service-desk-integrations
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#create-service-desk-integration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
servicedeskintegrationdto := []byte(`{
|
|
"ownerRef" : "",
|
|
"cluster" : "xyzzy999",
|
|
"created" : "2024-01-17T18:45:25.994Z",
|
|
"description" : "A very nice Service Desk integration",
|
|
"clusterRef" : "",
|
|
"type" : "ServiceNowSDIM",
|
|
"managedSources" : [ "2c9180835d191a86015d28455b4a2329", "2c5680835d191a85765d28455b4a9823" ],
|
|
"provisioningConfig" : {
|
|
"managedResourceRefs" : [ {
|
|
"type" : "SOURCE",
|
|
"id" : "2c9180855d191c59015d291ceb051111",
|
|
"name" : "My Source 1"
|
|
}, {
|
|
"type" : "SOURCE",
|
|
"id" : "2c9180855d191c59015d291ceb052222",
|
|
"name" : "My Source 2"
|
|
} ],
|
|
"provisioningRequestExpiration" : 7,
|
|
"noProvisioningRequests" : true,
|
|
"universalManager" : true,
|
|
"planInitializerScript" : {
|
|
"source" : "<?xml version='1.0' encoding='UTF-8'?>\\r\\n<!DOCTYPE Rule PUBLIC \\\"sailpoint.dtd\\\" \\\"sailpoint.dtd\\\">\\r\\n<Rule name=\\\"Example Rule\\\" type=\\\"BeforeProvisioning\\\">\\r\\n <Description>Before Provisioning Rule which changes disables and enables to a modify.</Description>\\r\\n <Source><![CDATA[\\r\\nimport sailpoint.object.*;\\r\\nimport sailpoint.object.ProvisioningPlan.AccountRequest;\\r\\nimport sailpoint.object.ProvisioningPlan.AccountRequest.Operation;\\r\\nimport sailpoint.object.ProvisioningPlan.AttributeRequest;\\r\\nimport sailpoint.object.ProvisioningPlan;\\r\\nimport sailpoint.object.ProvisioningPlan.Operation;\\r\\n\\r\\nfor ( AccountRequest accountRequest : plan.getAccountRequests() ) {\\r\\n if ( accountRequest.getOp().equals( ProvisioningPlan.ObjectOperation.Disable ) ) {\\r\\n accountRequest.setOp( ProvisioningPlan.ObjectOperation.Modify );\\r\\n }\\r\\n if ( accountRequest.getOp().equals( ProvisioningPlan.ObjectOperation.Enable ) ) {\\r\\n accountRequest.setOp( ProvisioningPlan.ObjectOperation.Modify );\\r\\n }\\r\\n}\\r\\n\\r\\n ]]></Source>\n"
|
|
}
|
|
},
|
|
"name" : "Service Desk Integration Name",
|
|
"modified" : "2024-02-18T18:45:25.994Z",
|
|
"attributes" : {
|
|
"property" : "value",
|
|
"key" : "value"
|
|
},
|
|
"id" : "62945a496ef440189b1f03e3623411c8",
|
|
"beforeProvisioningRule" : ""
|
|
}`) // ServiceDeskIntegrationDto | The specifics of a new integration to create
|
|
|
|
|
|
var serviceDeskIntegrationDto v3.ServiceDeskIntegrationDto
|
|
if err := json.Unmarshal(servicedeskintegrationdto, &serviceDeskIntegrationDto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.CreateServiceDeskIntegration(context.Background()).ServiceDeskIntegrationDto(serviceDeskIntegrationDto).Execute()
|
|
//resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.CreateServiceDeskIntegration(context.Background()).ServiceDeskIntegrationDto(serviceDeskIntegrationDto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.CreateServiceDeskIntegration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateServiceDeskIntegration`: ServiceDeskIntegrationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `ServiceDeskIntegrationAPI.CreateServiceDeskIntegration`: %v\n", resp)
|
|
}
|
|
- path: /service-desk-integrations/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#delete-service-desk-integration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `anId` // string | ID of Service Desk integration to delete # string | ID of Service Desk integration to delete
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.ServiceDeskIntegrationAPI.DeleteServiceDeskIntegration(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.ServiceDeskIntegrationAPI.DeleteServiceDeskIntegration(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.DeleteServiceDeskIntegration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /service-desk-integrations/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#get-service-desk-integration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `anId` // string | ID of the Service Desk integration to get # string | ID of the Service Desk integration to get
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetServiceDeskIntegration(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetServiceDeskIntegration(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.GetServiceDeskIntegration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetServiceDeskIntegration`: ServiceDeskIntegrationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `ServiceDeskIntegrationAPI.GetServiceDeskIntegration`: %v\n", resp)
|
|
}
|
|
- path: /service-desk-integrations/templates/{scriptName}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#get-service-desk-integration-template
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
scriptName := `aScriptName` // string | The scriptName value of the Service Desk integration template to get # string | The scriptName value of the Service Desk integration template to get
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetServiceDeskIntegrationTemplate(context.Background(), scriptName).Execute()
|
|
//resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetServiceDeskIntegrationTemplate(context.Background(), scriptName).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.GetServiceDeskIntegrationTemplate``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetServiceDeskIntegrationTemplate`: ServiceDeskIntegrationTemplateDto
|
|
fmt.Fprintf(os.Stdout, "Response from `ServiceDeskIntegrationAPI.GetServiceDeskIntegrationTemplate`: %v\n", resp)
|
|
}
|
|
- path: /service-desk-integrations/types
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#get-service-desk-integration-types
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetServiceDeskIntegrationTypes(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetServiceDeskIntegrationTypes(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.GetServiceDeskIntegrationTypes``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetServiceDeskIntegrationTypes`: []ServiceDeskIntegrationTemplateType
|
|
fmt.Fprintf(os.Stdout, "Response from `ServiceDeskIntegrationAPI.GetServiceDeskIntegrationTypes`: %v\n", resp)
|
|
}
|
|
- path: /service-desk-integrations
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#get-service-desk-integrations
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
sorters := `name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **name** (optional)
|
|
filters := `name eq "John Doe"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq* **type**: *eq, in* **cluster**: *eq, in* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **name**: *eq* **type**: *eq, in* **cluster**: *eq, in* (optional)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetServiceDeskIntegrations(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetServiceDeskIntegrations(context.Background()).Offset(offset).Limit(limit).Sorters(sorters).Filters(filters).Count(count).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.GetServiceDeskIntegrations``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetServiceDeskIntegrations`: []ServiceDeskIntegrationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `ServiceDeskIntegrationAPI.GetServiceDeskIntegrations`: %v\n", resp)
|
|
}
|
|
- path: /service-desk-integrations/status-check-configuration
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#get-status-check-details
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetStatusCheckDetails(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.GetStatusCheckDetails(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.GetStatusCheckDetails``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetStatusCheckDetails`: QueuedCheckConfigDetails
|
|
fmt.Fprintf(os.Stdout, "Response from `ServiceDeskIntegrationAPI.GetStatusCheckDetails`: %v\n", resp)
|
|
}
|
|
- path: /service-desk-integrations/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#patch-service-desk-integration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `anId` // string | ID of the Service Desk integration to update # string | ID of the Service Desk integration to update
|
|
jsonpatchoperation := []byte(``) // []JsonPatchOperation | A list of SDIM update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Only `replace` operations are accepted by this endpoint. A 403 Forbidden Error indicates that a PATCH operation was attempted that is not allowed.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.PatchServiceDeskIntegration(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.PatchServiceDeskIntegration(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.PatchServiceDeskIntegration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchServiceDeskIntegration`: ServiceDeskIntegrationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `ServiceDeskIntegrationAPI.PatchServiceDeskIntegration`: %v\n", resp)
|
|
}
|
|
- path: /service-desk-integrations/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#put-service-desk-integration
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `anId` // string | ID of the Service Desk integration to update # string | ID of the Service Desk integration to update
|
|
servicedeskintegrationdto := []byte(`{
|
|
"ownerRef" : "",
|
|
"cluster" : "xyzzy999",
|
|
"created" : "2024-01-17T18:45:25.994Z",
|
|
"description" : "A very nice Service Desk integration",
|
|
"clusterRef" : "",
|
|
"type" : "ServiceNowSDIM",
|
|
"managedSources" : [ "2c9180835d191a86015d28455b4a2329", "2c5680835d191a85765d28455b4a9823" ],
|
|
"provisioningConfig" : {
|
|
"managedResourceRefs" : [ {
|
|
"type" : "SOURCE",
|
|
"id" : "2c9180855d191c59015d291ceb051111",
|
|
"name" : "My Source 1"
|
|
}, {
|
|
"type" : "SOURCE",
|
|
"id" : "2c9180855d191c59015d291ceb052222",
|
|
"name" : "My Source 2"
|
|
} ],
|
|
"provisioningRequestExpiration" : 7,
|
|
"noProvisioningRequests" : true,
|
|
"universalManager" : true,
|
|
"planInitializerScript" : {
|
|
"source" : "<?xml version='1.0' encoding='UTF-8'?>\\r\\n<!DOCTYPE Rule PUBLIC \\\"sailpoint.dtd\\\" \\\"sailpoint.dtd\\\">\\r\\n<Rule name=\\\"Example Rule\\\" type=\\\"BeforeProvisioning\\\">\\r\\n <Description>Before Provisioning Rule which changes disables and enables to a modify.</Description>\\r\\n <Source><![CDATA[\\r\\nimport sailpoint.object.*;\\r\\nimport sailpoint.object.ProvisioningPlan.AccountRequest;\\r\\nimport sailpoint.object.ProvisioningPlan.AccountRequest.Operation;\\r\\nimport sailpoint.object.ProvisioningPlan.AttributeRequest;\\r\\nimport sailpoint.object.ProvisioningPlan;\\r\\nimport sailpoint.object.ProvisioningPlan.Operation;\\r\\n\\r\\nfor ( AccountRequest accountRequest : plan.getAccountRequests() ) {\\r\\n if ( accountRequest.getOp().equals( ProvisioningPlan.ObjectOperation.Disable ) ) {\\r\\n accountRequest.setOp( ProvisioningPlan.ObjectOperation.Modify );\\r\\n }\\r\\n if ( accountRequest.getOp().equals( ProvisioningPlan.ObjectOperation.Enable ) ) {\\r\\n accountRequest.setOp( ProvisioningPlan.ObjectOperation.Modify );\\r\\n }\\r\\n}\\r\\n\\r\\n ]]></Source>\n"
|
|
}
|
|
},
|
|
"name" : "Service Desk Integration Name",
|
|
"modified" : "2024-02-18T18:45:25.994Z",
|
|
"attributes" : {
|
|
"property" : "value",
|
|
"key" : "value"
|
|
},
|
|
"id" : "62945a496ef440189b1f03e3623411c8",
|
|
"beforeProvisioningRule" : ""
|
|
}`) // ServiceDeskIntegrationDto | The specifics of the integration to update
|
|
|
|
|
|
var serviceDeskIntegrationDto v3.ServiceDeskIntegrationDto
|
|
if err := json.Unmarshal(servicedeskintegrationdto, &serviceDeskIntegrationDto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.PutServiceDeskIntegration(context.Background(), id).ServiceDeskIntegrationDto(serviceDeskIntegrationDto).Execute()
|
|
//resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.PutServiceDeskIntegration(context.Background(), id).ServiceDeskIntegrationDto(serviceDeskIntegrationDto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.PutServiceDeskIntegration``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutServiceDeskIntegration`: ServiceDeskIntegrationDto
|
|
fmt.Fprintf(os.Stdout, "Response from `ServiceDeskIntegrationAPI.PutServiceDeskIntegration`: %v\n", resp)
|
|
}
|
|
- path: /service-desk-integrations/status-check-configuration
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/service-desk-integration#update-status-check-details
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
queuedcheckconfigdetails := []byte(`{
|
|
"provisioningStatusCheckIntervalMinutes" : "30",
|
|
"provisioningMaxStatusCheckDays" : "2"
|
|
}`) // QueuedCheckConfigDetails | The modified time check configuration
|
|
|
|
|
|
var queuedCheckConfigDetails v3.QueuedCheckConfigDetails
|
|
if err := json.Unmarshal(queuedcheckconfigdetails, &queuedCheckConfigDetails); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.UpdateStatusCheckDetails(context.Background()).QueuedCheckConfigDetails(queuedCheckConfigDetails).Execute()
|
|
//resp, r, err := apiClient.V3.ServiceDeskIntegrationAPI.UpdateStatusCheckDetails(context.Background()).QueuedCheckConfigDetails(queuedCheckConfigDetails).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `ServiceDeskIntegrationAPI.UpdateStatusCheckDetails``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateStatusCheckDetails`: QueuedCheckConfigDetails
|
|
fmt.Fprintf(os.Stdout, "Response from `ServiceDeskIntegrationAPI.UpdateStatusCheckDetails`: %v\n", resp)
|
|
}
|
|
- path: /source-usages/{sourceId}/status
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/source-usages#get-status-by-source-id
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | ID of IDN source # string | ID of IDN source
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourceUsagesAPI.GetStatusBySourceId(context.Background(), sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.SourceUsagesAPI.GetStatusBySourceId(context.Background(), sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourceUsagesAPI.GetStatusBySourceId``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetStatusBySourceId`: SourceUsageStatus
|
|
fmt.Fprintf(os.Stdout, "Response from `SourceUsagesAPI.GetStatusBySourceId`: %v\n", resp)
|
|
}
|
|
- path: /source-usages/{sourceId}/summaries
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/source-usages#get-usages-by-source-id
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | ID of IDN source # string | ID of IDN source
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
sorters := `-date` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **date** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **date** (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourceUsagesAPI.GetUsagesBySourceId(context.Background(), sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.SourceUsagesAPI.GetUsagesBySourceId(context.Background(), sourceId).Limit(limit).Offset(offset).Count(count).Sorters(sorters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourceUsagesAPI.GetUsagesBySourceId``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetUsagesBySourceId`: []SourceUsage
|
|
fmt.Fprintf(os.Stdout, "Response from `SourceUsagesAPI.GetUsagesBySourceId`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/provisioning-policies
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#create-provisioning-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id # string | The Source id
|
|
provisioningpolicydto := []byte(`{
|
|
"name" : "example provisioning policy for inactive identities",
|
|
"description" : "this provisioning policy creates access based on an identity going inactive",
|
|
"fields" : [ {
|
|
"isRequired" : false,
|
|
"transform" : {
|
|
"type" : "rule",
|
|
"attributes" : {
|
|
"name" : "Create Unique LDAP Attribute"
|
|
}
|
|
},
|
|
"isMultiValued" : false,
|
|
"name" : "userName",
|
|
"attributes" : {
|
|
"template" : "${firstname}.${lastname}${uniqueCounter}",
|
|
"cloudMaxUniqueChecks" : "50",
|
|
"cloudMaxSize" : "20",
|
|
"cloudRequired" : "true"
|
|
},
|
|
"type" : "string"
|
|
}, {
|
|
"isRequired" : false,
|
|
"transform" : {
|
|
"type" : "rule",
|
|
"attributes" : {
|
|
"name" : "Create Unique LDAP Attribute"
|
|
}
|
|
},
|
|
"isMultiValued" : false,
|
|
"name" : "userName",
|
|
"attributes" : {
|
|
"template" : "${firstname}.${lastname}${uniqueCounter}",
|
|
"cloudMaxUniqueChecks" : "50",
|
|
"cloudMaxSize" : "20",
|
|
"cloudRequired" : "true"
|
|
},
|
|
"type" : "string"
|
|
} ],
|
|
"usageType" : "CREATE"
|
|
}`) // ProvisioningPolicyDto |
|
|
|
|
|
|
var provisioningPolicyDto v3.ProvisioningPolicyDto
|
|
if err := json.Unmarshal(provisioningpolicydto, &provisioningPolicyDto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.CreateProvisioningPolicy(context.Background(), sourceId).ProvisioningPolicyDto(provisioningPolicyDto).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.CreateProvisioningPolicy(context.Background(), sourceId).ProvisioningPolicyDto(provisioningPolicyDto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.CreateProvisioningPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateProvisioningPolicy`: ProvisioningPolicyDto
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.CreateProvisioningPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sources
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#create-source
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
source := []byte(`{
|
|
"cluster" : {
|
|
"name" : "Corporate Cluster",
|
|
"id" : "2c9180866166b5b0016167c32ef31a66",
|
|
"type" : "CLUSTER"
|
|
},
|
|
"deleteThreshold" : 10,
|
|
"connectorId" : "active-directory",
|
|
"description" : "This is the corporate directory.",
|
|
"type" : "OpenLDAP - Direct",
|
|
"connectorClass" : "sailpoint.connector.LDAPConnector",
|
|
"connectionType" : "file",
|
|
"features" : [ "PROVISIONING", "NO_PERMISSIONS_PROVISIONING", "GROUPS_HAVE_MEMBERS" ],
|
|
"passwordPolicies" : [ {
|
|
"type" : "PASSWORD_POLICY",
|
|
"id" : "2c9180855d191c59015d291ceb053980",
|
|
"name" : "Corporate Password Policy"
|
|
}, {
|
|
"type" : "PASSWORD_POLICY",
|
|
"id" : "2c9180855d191c59015d291ceb057777",
|
|
"name" : "Vendor Password Policy"
|
|
} ],
|
|
"modified" : "2024-01-23T18:08:50.897Z",
|
|
"id" : "2c91808568c529c60168cca6f90c1324",
|
|
"connectorImplementationId" : "delimited-file",
|
|
"managerCorrelationRule" : {
|
|
"name" : "Example Rule",
|
|
"id" : "2c918085708c274401708c2a8a760001",
|
|
"type" : "RULE"
|
|
},
|
|
"owner" : {
|
|
"name" : "MyName",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"managementWorkgroup" : {
|
|
"name" : "My Management Workgroup",
|
|
"id" : "2c91808568c529c60168cca6f90c2222",
|
|
"type" : "GOVERNANCE_GROUP"
|
|
},
|
|
"accountCorrelationRule" : {
|
|
"name" : "Example Rule",
|
|
"id" : "2c918085708c274401708c2a8a760001",
|
|
"type" : "RULE"
|
|
},
|
|
"authoritative" : false,
|
|
"connectorAttributes" : {
|
|
"healthCheckTimeout" : 30,
|
|
"authSearchAttributes" : [ "cn", "uid", "mail" ]
|
|
},
|
|
"created" : "2022-02-08T14:50:03.827Z",
|
|
"managerCorrelationMapping" : {
|
|
"accountAttributeName" : "manager",
|
|
"identityAttributeName" : "manager"
|
|
},
|
|
"credentialProviderEnabled" : false,
|
|
"accountCorrelationConfig" : {
|
|
"name" : "Directory [source-62867] Account Correlation",
|
|
"id" : "2c9180855d191c59015d28583727245a",
|
|
"type" : "ACCOUNT_CORRELATION_CONFIG"
|
|
},
|
|
"connector" : "active-directory",
|
|
"healthy" : true,
|
|
"schemas" : [ {
|
|
"type" : "CONNECTOR_SCHEMA",
|
|
"id" : "2c9180835d191a86015d28455b4b232a",
|
|
"name" : "account"
|
|
}, {
|
|
"type" : "CONNECTOR_SCHEMA",
|
|
"id" : "2c9180835d191a86015d28455b4b232b",
|
|
"name" : "group"
|
|
} ],
|
|
"name" : "My Source",
|
|
"connectorName" : "Active Directory",
|
|
"category" : "CredentialProvider",
|
|
"beforeProvisioningRule" : {
|
|
"name" : "Example Rule",
|
|
"id" : "2c918085708c274401708c2a8a760001",
|
|
"type" : "RULE"
|
|
},
|
|
"status" : "SOURCE_STATE_HEALTHY",
|
|
"since" : "2021-09-28T15:48:29.3801666300Z"
|
|
}`) // Source |
|
|
provisionAsCsv := false // bool | If this parameter is `true`, it configures the source as a Delimited File (CSV) source. Setting this to `true` will automatically set the `type` of the source to `DelimitedFile`. You must use this query parameter to create a Delimited File source as you would in the UI. If you don't set this query parameter and you attempt to set the `type` attribute directly, the request won't correctly generate the source. (optional) # bool | If this parameter is `true`, it configures the source as a Delimited File (CSV) source. Setting this to `true` will automatically set the `type` of the source to `DelimitedFile`. You must use this query parameter to create a Delimited File source as you would in the UI. If you don't set this query parameter and you attempt to set the `type` attribute directly, the request won't correctly generate the source. (optional)
|
|
|
|
|
|
var source v3.Source
|
|
if err := json.Unmarshal(source, &source); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.CreateSource(context.Background()).Source(source).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.CreateSource(context.Background()).Source(source).ProvisionAsCsv(provisionAsCsv).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.CreateSource``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateSource`: Source
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.CreateSource`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/schemas
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#create-source-schema
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | Source ID. # string | Source ID.
|
|
schema := []byte(`{
|
|
"features" : [ "PROVISIONING", "NO_PERMISSIONS_PROVISIONING", "GROUPS_HAVE_MEMBERS" ],
|
|
"nativeObjectType" : "User",
|
|
"configuration" : {
|
|
"groupMemberAttribute" : "member"
|
|
},
|
|
"created" : "2019-12-24T22:32:58.104Z",
|
|
"includePermissions" : false,
|
|
"name" : "account",
|
|
"hierarchyAttribute" : "memberOf",
|
|
"modified" : "2019-12-31T20:22:28.104Z",
|
|
"attributes" : [ {
|
|
"name" : "sAMAccountName",
|
|
"type" : "STRING",
|
|
"isMultiValued" : false,
|
|
"isEntitlement" : false,
|
|
"isGroup" : false
|
|
}, {
|
|
"name" : "memberOf",
|
|
"type" : "STRING",
|
|
"schema" : {
|
|
"type" : "CONNECTOR_SCHEMA",
|
|
"id" : "2c9180887671ff8c01767b4671fc7d60",
|
|
"name" : "group"
|
|
},
|
|
"description" : "Group membership",
|
|
"isMultiValued" : true,
|
|
"isEntitlement" : true,
|
|
"isGroup" : true
|
|
} ],
|
|
"id" : "2c9180835d191a86015d28455b4a2329",
|
|
"displayAttribute" : "distinguishedName",
|
|
"identityAttribute" : "sAMAccountName"
|
|
}`) // Schema |
|
|
|
|
|
|
var schema v3.Schema
|
|
if err := json.Unmarshal(schema, &schema); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.CreateSourceSchema(context.Background(), sourceId).Schema(schema).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.CreateSourceSchema(context.Background(), sourceId).Schema(schema).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.CreateSourceSchema``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateSourceSchema`: Schema
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.CreateSourceSchema`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/provisioning-policies/{usageType}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#delete-provisioning-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source ID. # string | The Source ID.
|
|
usageType := CREATE // UsageType | The type of provisioning policy usage. In IdentityNow, a source can support various provisioning operations. For example, when a joiner is added to a source, this may trigger both CREATE and UPDATE provisioning operations. Each usage type is considered a provisioning policy. A source can have any number of these provisioning policies defined. These are the common usage types: CREATE - This usage type relates to 'Create Account Profile', the provisioning template for the account to be created. For example, this would be used for a joiner on a source. UPDATE - This usage type relates to 'Update Account Profile', the provisioning template for the 'Update' connector operations. For example, this would be used for an attribute sync on a source. ENABLE - This usage type relates to 'Enable Account Profile', the provisioning template for the account to be enabled. For example, this could be used for a joiner on a source once the joiner's account is created. DISABLE - This usage type relates to 'Disable Account Profile', the provisioning template for the account to be disabled. For example, this could be used when a leaver is removed temporarily from a source. You can use these four usage types for all your provisioning policy needs. # UsageType | The type of provisioning policy usage. In IdentityNow, a source can support various provisioning operations. For example, when a joiner is added to a source, this may trigger both CREATE and UPDATE provisioning operations. Each usage type is considered a provisioning policy. A source can have any number of these provisioning policies defined. These are the common usage types: CREATE - This usage type relates to 'Create Account Profile', the provisioning template for the account to be created. For example, this would be used for a joiner on a source. UPDATE - This usage type relates to 'Update Account Profile', the provisioning template for the 'Update' connector operations. For example, this would be used for an attribute sync on a source. ENABLE - This usage type relates to 'Enable Account Profile', the provisioning template for the account to be enabled. For example, this could be used for a joiner on a source once the joiner's account is created. DISABLE - This usage type relates to 'Disable Account Profile', the provisioning template for the account to be disabled. For example, this could be used when a leaver is removed temporarily from a source. You can use these four usage types for all your provisioning policy needs.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SourcesAPI.DeleteProvisioningPolicy(context.Background(), sourceId, usageType).Execute()
|
|
//r, err := apiClient.V3.SourcesAPI.DeleteProvisioningPolicy(context.Background(), sourceId, usageType).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.DeleteProvisioningPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /sources/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#delete-source
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180835d191a86015d28455b4a2329` // string | Source ID. # string | Source ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.DeleteSource(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.DeleteSource(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.DeleteSource``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteSource`: DeleteSource202Response
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.DeleteSource`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/schemas/{schemaId}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#delete-source-schema
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id. # string | The Source id.
|
|
schemaId := `2c9180835d191a86015d28455b4a2329` // string | The Schema id. # string | The Schema id.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SourcesAPI.DeleteSourceSchema(context.Background(), sourceId, schemaId).Execute()
|
|
//r, err := apiClient.V3.SourcesAPI.DeleteSourceSchema(context.Background(), sourceId, schemaId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.DeleteSourceSchema``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /sources/{id}/schemas/accounts
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#get-accounts-schema
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `8c190e6787aa4ed9a90bd9d5344523fb` // string | The Source id # string | The Source id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SourcesAPI.GetAccountsSchema(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.SourcesAPI.GetAccountsSchema(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.GetAccountsSchema``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /sources/{id}/schemas/entitlements
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#get-entitlements-schema
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `8c190e6787aa4ed9a90bd9d5344523fb` // string | The Source id # string | The Source id
|
|
schemaName := `?schemaName=group` // string | Name of entitlement schema (optional) # string | Name of entitlement schema (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.SourcesAPI.GetEntitlementsSchema(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.SourcesAPI.GetEntitlementsSchema(context.Background(), id).SchemaName(schemaName).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.GetEntitlementsSchema``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /sources/{sourceId}/provisioning-policies/{usageType}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#get-provisioning-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source ID. # string | The Source ID.
|
|
usageType := CREATE // UsageType | The type of provisioning policy usage. In IdentityNow, a source can support various provisioning operations. For example, when a joiner is added to a source, this may trigger both CREATE and UPDATE provisioning operations. Each usage type is considered a provisioning policy. A source can have any number of these provisioning policies defined. These are the common usage types: CREATE - This usage type relates to 'Create Account Profile', the provisioning template for the account to be created. For example, this would be used for a joiner on a source. UPDATE - This usage type relates to 'Update Account Profile', the provisioning template for the 'Update' connector operations. For example, this would be used for an attribute sync on a source. ENABLE - This usage type relates to 'Enable Account Profile', the provisioning template for the account to be enabled. For example, this could be used for a joiner on a source once the joiner's account is created. DISABLE - This usage type relates to 'Disable Account Profile', the provisioning template for the account to be disabled. For example, this could be used when a leaver is removed temporarily from a source. You can use these four usage types for all your provisioning policy needs. # UsageType | The type of provisioning policy usage. In IdentityNow, a source can support various provisioning operations. For example, when a joiner is added to a source, this may trigger both CREATE and UPDATE provisioning operations. Each usage type is considered a provisioning policy. A source can have any number of these provisioning policies defined. These are the common usage types: CREATE - This usage type relates to 'Create Account Profile', the provisioning template for the account to be created. For example, this would be used for a joiner on a source. UPDATE - This usage type relates to 'Update Account Profile', the provisioning template for the 'Update' connector operations. For example, this would be used for an attribute sync on a source. ENABLE - This usage type relates to 'Enable Account Profile', the provisioning template for the account to be enabled. For example, this could be used for a joiner on a source once the joiner's account is created. DISABLE - This usage type relates to 'Disable Account Profile', the provisioning template for the account to be disabled. For example, this could be used when a leaver is removed temporarily from a source. You can use these four usage types for all your provisioning policy needs.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.GetProvisioningPolicy(context.Background(), sourceId, usageType).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.GetProvisioningPolicy(context.Background(), sourceId, usageType).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.GetProvisioningPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetProvisioningPolicy`: ProvisioningPolicyDto
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.GetProvisioningPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sources/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#get-source
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180835d191a86015d28455b4a2329` // string | Source ID. # string | Source ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.GetSource(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.GetSource(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.GetSource``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSource`: Source
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.GetSource`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/connections
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#get-source-connections
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | Source ID. # string | Source ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.GetSourceConnections(context.Background(), sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.GetSourceConnections(context.Background(), sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.GetSourceConnections``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSourceConnections`: SourceConnectionsDto
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.GetSourceConnections`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/source-health
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#get-source-health
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id. # string | The Source id.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.GetSourceHealth(context.Background(), sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.GetSourceHealth(context.Background(), sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.GetSourceHealth``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSourceHealth`: SourceHealthDto
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.GetSourceHealth`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/schemas/{schemaId}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#get-source-schema
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id. # string | The Source id.
|
|
schemaId := `2c9180835d191a86015d28455b4a2329` // string | The Schema id. # string | The Schema id.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.GetSourceSchema(context.Background(), sourceId, schemaId).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.GetSourceSchema(context.Background(), sourceId, schemaId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.GetSourceSchema``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSourceSchema`: Schema
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.GetSourceSchema`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/schemas
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#get-source-schemas
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | Source ID. # string | Source ID.
|
|
includeTypes := `group` // string | If set to 'group', then the account schema is filtered and only group schemas are returned. Only a value of 'group' is recognized presently. Note: The API will check whether include-types is group or not, if not, it will list schemas based on include-names, if include-names is not provided, it will list all schemas. (optional) # string | If set to 'group', then the account schema is filtered and only group schemas are returned. Only a value of 'group' is recognized presently. Note: The API will check whether include-types is group or not, if not, it will list schemas based on include-names, if include-names is not provided, it will list all schemas. (optional)
|
|
includeNames := `account` // string | A comma-separated list of schema names to filter result. (optional) # string | A comma-separated list of schema names to filter result. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.GetSourceSchemas(context.Background(), sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.GetSourceSchemas(context.Background(), sourceId).IncludeTypes(includeTypes).IncludeNames(includeNames).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.GetSourceSchemas``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetSourceSchemas`: []Schema
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.GetSourceSchemas`: %v\n", resp)
|
|
}
|
|
- path: /sources/{id}/schemas/accounts
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#import-accounts-schema
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `8c190e6787aa4ed9a90bd9d5344523fb` // string | The Source id # string | The Source id
|
|
file := BINARY_DATA_HERE // *os.File | (optional) # *os.File | (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.ImportAccountsSchema(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.ImportAccountsSchema(context.Background(), id).File(file).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.ImportAccountsSchema``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ImportAccountsSchema`: Schema
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.ImportAccountsSchema`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/upload-connector-file
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#import-connector-file
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id. # string | The Source id.
|
|
file := BINARY_DATA_HERE // *os.File | (optional) # *os.File | (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.ImportConnectorFile(context.Background(), sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.ImportConnectorFile(context.Background(), sourceId).File(file).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.ImportConnectorFile``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ImportConnectorFile`: Source
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.ImportConnectorFile`: %v\n", resp)
|
|
}
|
|
- path: /sources/{id}/schemas/entitlements
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#import-entitlements-schema
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `8c190e6787aa4ed9a90bd9d5344523fb` // string | The Source id # string | The Source id
|
|
schemaName := `?schemaName=group` // string | Name of entitlement schema (optional) # string | Name of entitlement schema (optional)
|
|
file := BINARY_DATA_HERE // *os.File | (optional) # *os.File | (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.ImportEntitlementsSchema(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.ImportEntitlementsSchema(context.Background(), id).SchemaName(schemaName).File(file).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.ImportEntitlementsSchema``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ImportEntitlementsSchema`: Schema
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.ImportEntitlementsSchema`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/provisioning-policies
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#list-provisioning-policies
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id # string | The Source id
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.ListProvisioningPolicies(context.Background(), sourceId).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.ListProvisioningPolicies(context.Background(), sourceId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.ListProvisioningPolicies``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListProvisioningPolicies`: []ProvisioningPolicyDto
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.ListProvisioningPolicies`: %v\n", resp)
|
|
}
|
|
- path: /sources
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#list-sources
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `name eq "Employees"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **name**: *co, eq, in, sw, ge, gt, ne, isnull* **type**: *eq, in, ge, gt, ne, isnull, sw* **owner.id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **features**: *ca, co* **created**: *eq, ge, gt, in, le, lt, ne, isnull, sw* **modified**: *eq, ge, gt, in, le, lt, ne, isnull, sw* **managementWorkgroup.id**: *eq, ge, gt, in, le, lt, ne, isnull, sw* **description**: *eq, sw* **authoritative**: *eq, ne, isnull* **healthy**: *isnull* **status**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **connectionType**: *eq, ge, gt, in, le, lt, ne, isnull, sw* **connectorName**: *eq, ge, gt, in, ne, isnull, sw* **category**: *co, eq, ge, gt, in, le, lt, ne, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **name**: *co, eq, in, sw, ge, gt, ne, isnull* **type**: *eq, in, ge, gt, ne, isnull, sw* **owner.id**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **features**: *ca, co* **created**: *eq, ge, gt, in, le, lt, ne, isnull, sw* **modified**: *eq, ge, gt, in, le, lt, ne, isnull, sw* **managementWorkgroup.id**: *eq, ge, gt, in, le, lt, ne, isnull, sw* **description**: *eq, sw* **authoritative**: *eq, ne, isnull* **healthy**: *isnull* **status**: *eq, in, ge, gt, le, lt, ne, isnull, sw* **connectionType**: *eq, ge, gt, in, le, lt, ne, isnull, sw* **connectorName**: *eq, ge, gt, in, ne, isnull, sw* **category**: *co, eq, ge, gt, in, le, lt, ne, sw* (optional)
|
|
sorters := `name` // string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **type, created, modified, name, owner.name, healthy, status, id, description, owner.id, accountCorrelationConfig.id, accountCorrelationConfig.name, managerCorrelationRule.type, managerCorrelationRule.id, managerCorrelationRule.name, authoritative, managementWorkgroup.id, connectorName, connectionType** (optional) # string | Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **type, created, modified, name, owner.name, healthy, status, id, description, owner.id, accountCorrelationConfig.id, accountCorrelationConfig.name, managerCorrelationRule.type, managerCorrelationRule.id, managerCorrelationRule.name, authoritative, managementWorkgroup.id, connectorName, connectionType** (optional)
|
|
forSubadmin := `name` // string | Filter the returned list of sources for the identity specified by the parameter, which is the id of an identity with the role SOURCE_SUBADMIN. By convention, the value **me** indicates the identity id of the current user. Subadmins may only view Sources which they are able to administer; all other Sources will be filtered out when this parameter is set. If the current user is a SOURCE_SUBADMIN but fails to pass a valid value for this parameter, a 403 Forbidden is returned. (optional) # string | Filter the returned list of sources for the identity specified by the parameter, which is the id of an identity with the role SOURCE_SUBADMIN. By convention, the value **me** indicates the identity id of the current user. Subadmins may only view Sources which they are able to administer; all other Sources will be filtered out when this parameter is set. If the current user is a SOURCE_SUBADMIN but fails to pass a valid value for this parameter, a 403 Forbidden is returned. (optional)
|
|
includeIDNSource := true // bool | Include the IdentityNow source in the response. (optional) (default to false) # bool | Include the IdentityNow source in the response. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.ListSources(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.ListSources(context.Background()).Limit(limit).Offset(offset).Count(count).Filters(filters).Sorters(sorters).ForSubadmin(forSubadmin).IncludeIDNSource(includeIDNSource).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.ListSources``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListSources`: []Source
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.ListSources`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/provisioning-policies/{usageType}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#put-provisioning-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source ID. # string | The Source ID.
|
|
usageType := CREATE // UsageType | The type of provisioning policy usage. In IdentityNow, a source can support various provisioning operations. For example, when a joiner is added to a source, this may trigger both CREATE and UPDATE provisioning operations. Each usage type is considered a provisioning policy. A source can have any number of these provisioning policies defined. These are the common usage types: CREATE - This usage type relates to 'Create Account Profile', the provisioning template for the account to be created. For example, this would be used for a joiner on a source. UPDATE - This usage type relates to 'Update Account Profile', the provisioning template for the 'Update' connector operations. For example, this would be used for an attribute sync on a source. ENABLE - This usage type relates to 'Enable Account Profile', the provisioning template for the account to be enabled. For example, this could be used for a joiner on a source once the joiner's account is created. DISABLE - This usage type relates to 'Disable Account Profile', the provisioning template for the account to be disabled. For example, this could be used when a leaver is removed temporarily from a source. You can use these four usage types for all your provisioning policy needs. # UsageType | The type of provisioning policy usage. In IdentityNow, a source can support various provisioning operations. For example, when a joiner is added to a source, this may trigger both CREATE and UPDATE provisioning operations. Each usage type is considered a provisioning policy. A source can have any number of these provisioning policies defined. These are the common usage types: CREATE - This usage type relates to 'Create Account Profile', the provisioning template for the account to be created. For example, this would be used for a joiner on a source. UPDATE - This usage type relates to 'Update Account Profile', the provisioning template for the 'Update' connector operations. For example, this would be used for an attribute sync on a source. ENABLE - This usage type relates to 'Enable Account Profile', the provisioning template for the account to be enabled. For example, this could be used for a joiner on a source once the joiner's account is created. DISABLE - This usage type relates to 'Disable Account Profile', the provisioning template for the account to be disabled. For example, this could be used when a leaver is removed temporarily from a source. You can use these four usage types for all your provisioning policy needs.
|
|
provisioningpolicydto := []byte(`{
|
|
"name" : "example provisioning policy for inactive identities",
|
|
"description" : "this provisioning policy creates access based on an identity going inactive",
|
|
"fields" : [ {
|
|
"isRequired" : false,
|
|
"transform" : {
|
|
"type" : "rule",
|
|
"attributes" : {
|
|
"name" : "Create Unique LDAP Attribute"
|
|
}
|
|
},
|
|
"isMultiValued" : false,
|
|
"name" : "userName",
|
|
"attributes" : {
|
|
"template" : "${firstname}.${lastname}${uniqueCounter}",
|
|
"cloudMaxUniqueChecks" : "50",
|
|
"cloudMaxSize" : "20",
|
|
"cloudRequired" : "true"
|
|
},
|
|
"type" : "string"
|
|
}, {
|
|
"isRequired" : false,
|
|
"transform" : {
|
|
"type" : "rule",
|
|
"attributes" : {
|
|
"name" : "Create Unique LDAP Attribute"
|
|
}
|
|
},
|
|
"isMultiValued" : false,
|
|
"name" : "userName",
|
|
"attributes" : {
|
|
"template" : "${firstname}.${lastname}${uniqueCounter}",
|
|
"cloudMaxUniqueChecks" : "50",
|
|
"cloudMaxSize" : "20",
|
|
"cloudRequired" : "true"
|
|
},
|
|
"type" : "string"
|
|
} ],
|
|
"usageType" : "CREATE"
|
|
}`) // ProvisioningPolicyDto |
|
|
|
|
|
|
var provisioningPolicyDto v3.ProvisioningPolicyDto
|
|
if err := json.Unmarshal(provisioningpolicydto, &provisioningPolicyDto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.PutProvisioningPolicy(context.Background(), sourceId, usageType).ProvisioningPolicyDto(provisioningPolicyDto).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.PutProvisioningPolicy(context.Background(), sourceId, usageType).ProvisioningPolicyDto(provisioningPolicyDto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.PutProvisioningPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutProvisioningPolicy`: ProvisioningPolicyDto
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.PutProvisioningPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sources/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#put-source
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180835d191a86015d28455b4a2329` // string | Source ID. # string | Source ID.
|
|
source := []byte(`{
|
|
"cluster" : {
|
|
"name" : "Corporate Cluster",
|
|
"id" : "2c9180866166b5b0016167c32ef31a66",
|
|
"type" : "CLUSTER"
|
|
},
|
|
"deleteThreshold" : 10,
|
|
"connectorId" : "active-directory",
|
|
"description" : "This is the corporate directory.",
|
|
"type" : "OpenLDAP - Direct",
|
|
"connectorClass" : "sailpoint.connector.LDAPConnector",
|
|
"connectionType" : "file",
|
|
"features" : [ "PROVISIONING", "NO_PERMISSIONS_PROVISIONING", "GROUPS_HAVE_MEMBERS" ],
|
|
"passwordPolicies" : [ {
|
|
"type" : "PASSWORD_POLICY",
|
|
"id" : "2c9180855d191c59015d291ceb053980",
|
|
"name" : "Corporate Password Policy"
|
|
}, {
|
|
"type" : "PASSWORD_POLICY",
|
|
"id" : "2c9180855d191c59015d291ceb057777",
|
|
"name" : "Vendor Password Policy"
|
|
} ],
|
|
"modified" : "2024-01-23T18:08:50.897Z",
|
|
"id" : "2c91808568c529c60168cca6f90c1324",
|
|
"connectorImplementationId" : "delimited-file",
|
|
"managerCorrelationRule" : {
|
|
"name" : "Example Rule",
|
|
"id" : "2c918085708c274401708c2a8a760001",
|
|
"type" : "RULE"
|
|
},
|
|
"owner" : {
|
|
"name" : "MyName",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"managementWorkgroup" : {
|
|
"name" : "My Management Workgroup",
|
|
"id" : "2c91808568c529c60168cca6f90c2222",
|
|
"type" : "GOVERNANCE_GROUP"
|
|
},
|
|
"accountCorrelationRule" : {
|
|
"name" : "Example Rule",
|
|
"id" : "2c918085708c274401708c2a8a760001",
|
|
"type" : "RULE"
|
|
},
|
|
"authoritative" : false,
|
|
"connectorAttributes" : {
|
|
"healthCheckTimeout" : 30,
|
|
"authSearchAttributes" : [ "cn", "uid", "mail" ]
|
|
},
|
|
"created" : "2022-02-08T14:50:03.827Z",
|
|
"managerCorrelationMapping" : {
|
|
"accountAttributeName" : "manager",
|
|
"identityAttributeName" : "manager"
|
|
},
|
|
"credentialProviderEnabled" : false,
|
|
"accountCorrelationConfig" : {
|
|
"name" : "Directory [source-62867] Account Correlation",
|
|
"id" : "2c9180855d191c59015d28583727245a",
|
|
"type" : "ACCOUNT_CORRELATION_CONFIG"
|
|
},
|
|
"connector" : "active-directory",
|
|
"healthy" : true,
|
|
"schemas" : [ {
|
|
"type" : "CONNECTOR_SCHEMA",
|
|
"id" : "2c9180835d191a86015d28455b4b232a",
|
|
"name" : "account"
|
|
}, {
|
|
"type" : "CONNECTOR_SCHEMA",
|
|
"id" : "2c9180835d191a86015d28455b4b232b",
|
|
"name" : "group"
|
|
} ],
|
|
"name" : "My Source",
|
|
"connectorName" : "Active Directory",
|
|
"category" : "CredentialProvider",
|
|
"beforeProvisioningRule" : {
|
|
"name" : "Example Rule",
|
|
"id" : "2c918085708c274401708c2a8a760001",
|
|
"type" : "RULE"
|
|
},
|
|
"status" : "SOURCE_STATE_HEALTHY",
|
|
"since" : "2021-09-28T15:48:29.3801666300Z"
|
|
}`) // Source |
|
|
|
|
|
|
var source v3.Source
|
|
if err := json.Unmarshal(source, &source); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.PutSource(context.Background(), id).Source(source).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.PutSource(context.Background(), id).Source(source).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.PutSource``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutSource`: Source
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.PutSource`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/schemas/{schemaId}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#put-source-schema
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id. # string | The Source id.
|
|
schemaId := `2c9180835d191a86015d28455b4a2329` // string | The Schema id. # string | The Schema id.
|
|
schema := []byte(`{
|
|
"features" : [ "PROVISIONING", "NO_PERMISSIONS_PROVISIONING", "GROUPS_HAVE_MEMBERS" ],
|
|
"nativeObjectType" : "User",
|
|
"configuration" : {
|
|
"groupMemberAttribute" : "member"
|
|
},
|
|
"created" : "2019-12-24T22:32:58.104Z",
|
|
"includePermissions" : false,
|
|
"name" : "account",
|
|
"hierarchyAttribute" : "memberOf",
|
|
"modified" : "2019-12-31T20:22:28.104Z",
|
|
"attributes" : [ {
|
|
"name" : "sAMAccountName",
|
|
"type" : "STRING",
|
|
"isMultiValued" : false,
|
|
"isEntitlement" : false,
|
|
"isGroup" : false
|
|
}, {
|
|
"name" : "memberOf",
|
|
"type" : "STRING",
|
|
"schema" : {
|
|
"type" : "CONNECTOR_SCHEMA",
|
|
"id" : "2c9180887671ff8c01767b4671fc7d60",
|
|
"name" : "group"
|
|
},
|
|
"description" : "Group membership",
|
|
"isMultiValued" : true,
|
|
"isEntitlement" : true,
|
|
"isGroup" : true
|
|
} ],
|
|
"id" : "2c9180835d191a86015d28455b4a2329",
|
|
"displayAttribute" : "distinguishedName",
|
|
"identityAttribute" : "sAMAccountName"
|
|
}`) // Schema |
|
|
|
|
|
|
var schema v3.Schema
|
|
if err := json.Unmarshal(schema, &schema); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.PutSourceSchema(context.Background(), sourceId, schemaId).Schema(schema).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.PutSourceSchema(context.Background(), sourceId, schemaId).Schema(schema).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.PutSourceSchema``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutSourceSchema`: Schema
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.PutSourceSchema`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/provisioning-policies/bulk-update
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#update-provisioning-policies-in-bulk
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id. # string | The Source id.
|
|
provisioningpolicydto := []byte(``) // []ProvisioningPolicyDto |
|
|
|
|
|
|
var provisioningPolicyDto []v3.ProvisioningPolicyDto
|
|
if err := json.Unmarshal(provisioningpolicydto, &provisioningPolicyDto); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.UpdateProvisioningPoliciesInBulk(context.Background(), sourceId).ProvisioningPolicyDto(provisioningPolicyDto).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.UpdateProvisioningPoliciesInBulk(context.Background(), sourceId).ProvisioningPolicyDto(provisioningPolicyDto).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.UpdateProvisioningPoliciesInBulk``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateProvisioningPoliciesInBulk`: []ProvisioningPolicyDto
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.UpdateProvisioningPoliciesInBulk`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/provisioning-policies/{usageType}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#update-provisioning-policy
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id. # string | The Source id.
|
|
usageType := CREATE // UsageType | The type of provisioning policy usage. In IdentityNow, a source can support various provisioning operations. For example, when a joiner is added to a source, this may trigger both CREATE and UPDATE provisioning operations. Each usage type is considered a provisioning policy. A source can have any number of these provisioning policies defined. These are the common usage types: CREATE - This usage type relates to 'Create Account Profile', the provisioning template for the account to be created. For example, this would be used for a joiner on a source. UPDATE - This usage type relates to 'Update Account Profile', the provisioning template for the 'Update' connector operations. For example, this would be used for an attribute sync on a source. ENABLE - This usage type relates to 'Enable Account Profile', the provisioning template for the account to be enabled. For example, this could be used for a joiner on a source once the joiner's account is created. DISABLE - This usage type relates to 'Disable Account Profile', the provisioning template for the account to be disabled. For example, this could be used when a leaver is removed temporarily from a source. You can use these four usage types for all your provisioning policy needs. # UsageType | The type of provisioning policy usage. In IdentityNow, a source can support various provisioning operations. For example, when a joiner is added to a source, this may trigger both CREATE and UPDATE provisioning operations. Each usage type is considered a provisioning policy. A source can have any number of these provisioning policies defined. These are the common usage types: CREATE - This usage type relates to 'Create Account Profile', the provisioning template for the account to be created. For example, this would be used for a joiner on a source. UPDATE - This usage type relates to 'Update Account Profile', the provisioning template for the 'Update' connector operations. For example, this would be used for an attribute sync on a source. ENABLE - This usage type relates to 'Enable Account Profile', the provisioning template for the account to be enabled. For example, this could be used for a joiner on a source once the joiner's account is created. DISABLE - This usage type relates to 'Disable Account Profile', the provisioning template for the account to be disabled. For example, this could be used when a leaver is removed temporarily from a source. You can use these four usage types for all your provisioning policy needs.
|
|
jsonpatchoperation := []byte(`[{op=add, path=/fields/0, value={name=email, transform={type=identityAttribute, attributes={name=email}}, attributes={}, isRequired=false, type=string, isMultiValued=false}}]`) // []JsonPatchOperation | The JSONPatch payload used to update the schema.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.UpdateProvisioningPolicy(context.Background(), sourceId, usageType).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.UpdateProvisioningPolicy(context.Background(), sourceId, usageType).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.UpdateProvisioningPolicy``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateProvisioningPolicy`: ProvisioningPolicyDto
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.UpdateProvisioningPolicy`: %v\n", resp)
|
|
}
|
|
- path: /sources/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#update-source
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180835d191a86015d28455b4a2329` // string | Source ID. # string | Source ID.
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/description, value=new description}]`) // []JsonPatchOperation | A list of account update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. Any password changes are submitted as plain-text and encrypted upon receipt in Identity Security Cloud (ISC).
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.UpdateSource(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.UpdateSource(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.UpdateSource``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateSource`: Source
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.UpdateSource`: %v\n", resp)
|
|
}
|
|
- path: /sources/{sourceId}/schemas/{schemaId}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/sources#update-source-schema
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
sourceId := `2c9180835d191a86015d28455b4a2329` // string | The Source id. # string | The Source id.
|
|
schemaId := `2c9180835d191a86015d28455b4a2329` // string | The Schema id. # string | The Schema id.
|
|
jsonpatchoperation := []byte(`[{op=add, path=/attributes/-, value={name=location, type=STRING, schema=null, description=Employee location, isMulti=false, isEntitlement=false, isGroup=false}}]`) // []JsonPatchOperation | The JSONPatch payload used to update the schema.
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.SourcesAPI.UpdateSourceSchema(context.Background(), sourceId, schemaId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.SourcesAPI.UpdateSourceSchema(context.Background(), sourceId, schemaId).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `SourcesAPI.UpdateSourceSchema``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateSourceSchema`: Schema
|
|
fmt.Fprintf(os.Stdout, "Response from `SourcesAPI.UpdateSourceSchema`: %v\n", resp)
|
|
}
|
|
- path: /tagged-objects/{type}/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/tagged-objects#delete-tagged-object
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
type_ := `ROLE` // string | The type of object to delete tags from. # string | The type of object to delete tags from.
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the object to delete tags from. # string | The ID of the object to delete tags from.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.TaggedObjectsAPI.DeleteTaggedObject(context.Background(), type_, id).Execute()
|
|
//r, err := apiClient.V3.TaggedObjectsAPI.DeleteTaggedObject(context.Background(), type_, id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TaggedObjectsAPI.DeleteTaggedObject``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /tagged-objects/bulk-remove
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/tagged-objects#delete-tags-to-many-object
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
bulkremovetaggedobject := []byte(`{
|
|
"objectRefs" : [ {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
}, {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
} ],
|
|
"tags" : [ "BU_FINANCE", "PCI" ]
|
|
}`) // BulkRemoveTaggedObject | Supported object types are ACCESS_PROFILE, APPLICATION, CAMPAIGN, ENTITLEMENT, IDENTITY, ROLE, SOD_POLICY, SOURCE.
|
|
|
|
|
|
var bulkRemoveTaggedObject v3.BulkRemoveTaggedObject
|
|
if err := json.Unmarshal(bulkremovetaggedobject, &bulkRemoveTaggedObject); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.TaggedObjectsAPI.DeleteTagsToManyObject(context.Background()).BulkRemoveTaggedObject(bulkRemoveTaggedObject).Execute()
|
|
//r, err := apiClient.V3.TaggedObjectsAPI.DeleteTagsToManyObject(context.Background()).BulkRemoveTaggedObject(bulkRemoveTaggedObject).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TaggedObjectsAPI.DeleteTagsToManyObject``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /tagged-objects/{type}/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/tagged-objects#get-tagged-object
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
type_ := `ROLE` // string | The type of tagged object to retrieve. # string | The type of tagged object to retrieve.
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the object reference to retrieve. # string | The ID of the object reference to retrieve.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.TaggedObjectsAPI.GetTaggedObject(context.Background(), type_, id).Execute()
|
|
//resp, r, err := apiClient.V3.TaggedObjectsAPI.GetTaggedObject(context.Background(), type_, id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TaggedObjectsAPI.GetTaggedObject``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetTaggedObject`: TaggedObject
|
|
fmt.Fprintf(os.Stdout, "Response from `TaggedObjectsAPI.GetTaggedObject`: %v\n", resp)
|
|
}
|
|
- path: /tagged-objects
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/tagged-objects#list-tagged-objects
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `tagName eq "BU_FINANCE"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **objectRef.id**: *eq, in* **objectRef.type**: *eq, in* **tagName**: *eq, in* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **objectRef.id**: *eq, in* **objectRef.type**: *eq, in* **tagName**: *eq, in* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.TaggedObjectsAPI.ListTaggedObjects(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.TaggedObjectsAPI.ListTaggedObjects(context.Background()).Limit(limit).Offset(offset).Count(count).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TaggedObjectsAPI.ListTaggedObjects``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListTaggedObjects`: []TaggedObject
|
|
fmt.Fprintf(os.Stdout, "Response from `TaggedObjectsAPI.ListTaggedObjects`: %v\n", resp)
|
|
}
|
|
- path: /tagged-objects/{type}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/tagged-objects#list-tagged-objects-by-type
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
type_ := `ROLE` // string | The type of tagged object to retrieve. # string | The type of tagged object to retrieve.
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
filters := `objectRef.id eq "2c91808568c529c60168cca6f90c1313"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **objectRef.id**: *eq* **objectRef.type**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **objectRef.id**: *eq* **objectRef.type**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.TaggedObjectsAPI.ListTaggedObjectsByType(context.Background(), type_).Execute()
|
|
//resp, r, err := apiClient.V3.TaggedObjectsAPI.ListTaggedObjectsByType(context.Background(), type_).Limit(limit).Offset(offset).Count(count).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TaggedObjectsAPI.ListTaggedObjectsByType``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListTaggedObjectsByType`: []TaggedObject
|
|
fmt.Fprintf(os.Stdout, "Response from `TaggedObjectsAPI.ListTaggedObjectsByType`: %v\n", resp)
|
|
}
|
|
- path: /tagged-objects/{type}/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/tagged-objects#put-tagged-object
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
type_ := `ROLE` // string | The type of tagged object to update. # string | The type of tagged object to update.
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the object reference to update. # string | The ID of the object reference to update.
|
|
taggedobject := []byte(`{
|
|
"objectRef" : {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"tags" : [ "BU_FINANCE", "PCI" ]
|
|
}`) // TaggedObject |
|
|
|
|
|
|
var taggedObject v3.TaggedObject
|
|
if err := json.Unmarshal(taggedobject, &taggedObject); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.TaggedObjectsAPI.PutTaggedObject(context.Background(), type_, id).TaggedObject(taggedObject).Execute()
|
|
//resp, r, err := apiClient.V3.TaggedObjectsAPI.PutTaggedObject(context.Background(), type_, id).TaggedObject(taggedObject).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TaggedObjectsAPI.PutTaggedObject``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutTaggedObject`: TaggedObject
|
|
fmt.Fprintf(os.Stdout, "Response from `TaggedObjectsAPI.PutTaggedObject`: %v\n", resp)
|
|
}
|
|
- path: /tagged-objects
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/tagged-objects#set-tag-to-object
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
taggedobject := []byte(`{
|
|
"objectRef" : {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"tags" : [ "BU_FINANCE", "PCI" ]
|
|
}`) // TaggedObject |
|
|
|
|
|
|
var taggedObject v3.TaggedObject
|
|
if err := json.Unmarshal(taggedobject, &taggedObject); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.TaggedObjectsAPI.SetTagToObject(context.Background()).TaggedObject(taggedObject).Execute()
|
|
//r, err := apiClient.V3.TaggedObjectsAPI.SetTagToObject(context.Background()).TaggedObject(taggedObject).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TaggedObjectsAPI.SetTagToObject``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /tagged-objects/bulk-add
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/tagged-objects#set-tags-to-many-objects
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
bulkaddtaggedobject := []byte(`{
|
|
"objectRefs" : [ {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
}, {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
} ],
|
|
"operation" : "MERGE",
|
|
"tags" : [ "BU_FINANCE", "PCI" ]
|
|
}`) // BulkAddTaggedObject | Supported object types are ACCESS_PROFILE, APPLICATION, CAMPAIGN, ENTITLEMENT, IDENTITY, ROLE, SOD_POLICY, SOURCE.
|
|
|
|
|
|
var bulkAddTaggedObject v3.BulkAddTaggedObject
|
|
if err := json.Unmarshal(bulkaddtaggedobject, &bulkAddTaggedObject); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.TaggedObjectsAPI.SetTagsToManyObjects(context.Background()).BulkAddTaggedObject(bulkAddTaggedObject).Execute()
|
|
//resp, r, err := apiClient.V3.TaggedObjectsAPI.SetTagsToManyObjects(context.Background()).BulkAddTaggedObject(bulkAddTaggedObject).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TaggedObjectsAPI.SetTagsToManyObjects``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SetTagsToManyObjects`: []BulkTaggedObjectResponse
|
|
fmt.Fprintf(os.Stdout, "Response from `TaggedObjectsAPI.SetTagsToManyObjects`: %v\n", resp)
|
|
}
|
|
- path: /transforms
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/transforms#create-transform
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
transform := []byte(`{
|
|
"name" : "Timestamp To Date",
|
|
"attributes" : "{}",
|
|
"type" : "dateFormat"
|
|
}`) // Transform | The transform to be created.
|
|
|
|
|
|
var transform v3.Transform
|
|
if err := json.Unmarshal(transform, &transform); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.TransformsAPI.CreateTransform(context.Background()).Transform(transform).Execute()
|
|
//resp, r, err := apiClient.V3.TransformsAPI.CreateTransform(context.Background()).Transform(transform).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TransformsAPI.CreateTransform``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateTransform`: TransformRead
|
|
fmt.Fprintf(os.Stdout, "Response from `TransformsAPI.CreateTransform`: %v\n", resp)
|
|
}
|
|
- path: /transforms/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/transforms#delete-transform
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2cd78adghjkja34jh2b1hkjhasuecd` // string | ID of the transform to delete # string | ID of the transform to delete
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.TransformsAPI.DeleteTransform(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.TransformsAPI.DeleteTransform(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TransformsAPI.DeleteTransform``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /transforms/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/transforms#get-transform
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2cd78adghjkja34jh2b1hkjhasuecd` // string | ID of the transform to retrieve # string | ID of the transform to retrieve
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.TransformsAPI.GetTransform(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.TransformsAPI.GetTransform(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TransformsAPI.GetTransform``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetTransform`: TransformRead
|
|
fmt.Fprintf(os.Stdout, "Response from `TransformsAPI.GetTransform`: %v\n", resp)
|
|
}
|
|
- path: /transforms
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/transforms#list-transforms
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
name := `ExampleTransformName123` // string | Name of the transform to retrieve from the list. (optional) # string | Name of the transform to retrieve from the list. (optional)
|
|
filters := `name eq "Uppercase"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **internal**: *eq* **name**: *eq, sw* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **internal**: *eq* **name**: *eq, sw* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.TransformsAPI.ListTransforms(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.TransformsAPI.ListTransforms(context.Background()).Offset(offset).Limit(limit).Count(count).Name(name).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TransformsAPI.ListTransforms``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListTransforms`: []TransformRead
|
|
fmt.Fprintf(os.Stdout, "Response from `TransformsAPI.ListTransforms`: %v\n", resp)
|
|
}
|
|
- path: /transforms/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/transforms#update-transform
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2cd78adghjkja34jh2b1hkjhasuecd` // string | ID of the transform to update # string | ID of the transform to update
|
|
transform := []byte(`{
|
|
"name" : "Timestamp To Date",
|
|
"attributes" : "{}",
|
|
"type" : "dateFormat"
|
|
}`) // Transform | The updated transform object. Must include \"name\", \"type\", and \"attributes\" fields, but \"name\" and \"type\" must not be modified. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.TransformsAPI.UpdateTransform(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.TransformsAPI.UpdateTransform(context.Background(), id).Transform(transform).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `TransformsAPI.UpdateTransform``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `UpdateTransform`: TransformRead
|
|
fmt.Fprintf(os.Stdout, "Response from `TransformsAPI.UpdateTransform`: %v\n", resp)
|
|
}
|
|
- path: /vendor-connector-mappings
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/vendor-connector-mappings#create-vendor-connector-mapping
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
vendorconnectormapping := []byte(`{
|
|
"createdAt" : "2024-03-13T12:56:19.391294Z",
|
|
"deletedAt" : {
|
|
"Valid" : false,
|
|
"Time" : "0001-01-01T00:00:00Z"
|
|
},
|
|
"updatedBy" : {
|
|
"Valid" : true,
|
|
"String" : "user-67891"
|
|
},
|
|
"connector" : "Example connector",
|
|
"createdBy" : "admin",
|
|
"vendor" : "Example vendor",
|
|
"id" : "78733556-9ea3-4f59-bf69-e5cd92b011b4",
|
|
"deletedBy" : {
|
|
"Valid" : false,
|
|
"String" : ""
|
|
},
|
|
"updatedAt" : {
|
|
"Valid" : true,
|
|
"Time" : "2024-03-14T12:56:19.391294Z"
|
|
}
|
|
}`) // VendorConnectorMapping |
|
|
|
|
|
|
var vendorConnectorMapping v3.VendorConnectorMapping
|
|
if err := json.Unmarshal(vendorconnectormapping, &vendorConnectorMapping); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.VendorConnectorMappingsAPI.CreateVendorConnectorMapping(context.Background()).VendorConnectorMapping(vendorConnectorMapping).Execute()
|
|
//resp, r, err := apiClient.V3.VendorConnectorMappingsAPI.CreateVendorConnectorMapping(context.Background()).VendorConnectorMapping(vendorConnectorMapping).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `VendorConnectorMappingsAPI.CreateVendorConnectorMapping``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateVendorConnectorMapping`: VendorConnectorMapping
|
|
fmt.Fprintf(os.Stdout, "Response from `VendorConnectorMappingsAPI.CreateVendorConnectorMapping`: %v\n", resp)
|
|
}
|
|
- path: /vendor-connector-mappings
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/vendor-connector-mappings#delete-vendor-connector-mapping
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
vendorconnectormapping := []byte(`{
|
|
"createdAt" : "2024-03-13T12:56:19.391294Z",
|
|
"deletedAt" : {
|
|
"Valid" : false,
|
|
"Time" : "0001-01-01T00:00:00Z"
|
|
},
|
|
"updatedBy" : {
|
|
"Valid" : true,
|
|
"String" : "user-67891"
|
|
},
|
|
"connector" : "Example connector",
|
|
"createdBy" : "admin",
|
|
"vendor" : "Example vendor",
|
|
"id" : "78733556-9ea3-4f59-bf69-e5cd92b011b4",
|
|
"deletedBy" : {
|
|
"Valid" : false,
|
|
"String" : ""
|
|
},
|
|
"updatedAt" : {
|
|
"Valid" : true,
|
|
"Time" : "2024-03-14T12:56:19.391294Z"
|
|
}
|
|
}`) // VendorConnectorMapping |
|
|
|
|
|
|
var vendorConnectorMapping v3.VendorConnectorMapping
|
|
if err := json.Unmarshal(vendorconnectormapping, &vendorConnectorMapping); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.VendorConnectorMappingsAPI.DeleteVendorConnectorMapping(context.Background()).VendorConnectorMapping(vendorConnectorMapping).Execute()
|
|
//resp, r, err := apiClient.V3.VendorConnectorMappingsAPI.DeleteVendorConnectorMapping(context.Background()).VendorConnectorMapping(vendorConnectorMapping).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `VendorConnectorMappingsAPI.DeleteVendorConnectorMapping``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `DeleteVendorConnectorMapping`: DeleteVendorConnectorMapping200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `VendorConnectorMappingsAPI.DeleteVendorConnectorMapping`: %v\n", resp)
|
|
}
|
|
- path: /vendor-connector-mappings
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/vendor-connector-mappings#get-vendor-connector-mappings
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.VendorConnectorMappingsAPI.GetVendorConnectorMappings(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.VendorConnectorMappingsAPI.GetVendorConnectorMappings(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `VendorConnectorMappingsAPI.GetVendorConnectorMappings``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetVendorConnectorMappings`: []VendorConnectorMapping
|
|
fmt.Fprintf(os.Stdout, "Response from `VendorConnectorMappingsAPI.GetVendorConnectorMappings`: %v\n", resp)
|
|
}
|
|
- path: /work-items/{id}/approve/{approvalItemId}
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#approve-approval-item
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the work item # string | The ID of the work item
|
|
approvalItemId := `1211bcaa32112bcef6122adb21cef1ac` // string | The ID of the approval item. # string | The ID of the approval item.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.ApproveApprovalItem(context.Background(), id, approvalItemId).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.ApproveApprovalItem(context.Background(), id, approvalItemId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.ApproveApprovalItem``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ApproveApprovalItem`: WorkItems
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.ApproveApprovalItem`: %v\n", resp)
|
|
}
|
|
- path: /work-items/bulk-approve/{id}
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#approve-approval-items-in-bulk
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the work item # string | The ID of the work item
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.ApproveApprovalItemsInBulk(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.ApproveApprovalItemsInBulk(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.ApproveApprovalItemsInBulk``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ApproveApprovalItemsInBulk`: WorkItems
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.ApproveApprovalItemsInBulk`: %v\n", resp)
|
|
}
|
|
- path: /work-items/{id}
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#complete-work-item
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the work item # string | The ID of the work item
|
|
body := `body_example` // string | Body is the request payload to create form definition request (optional) # string | Body is the request payload to create form definition request (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.CompleteWorkItem(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.CompleteWorkItem(context.Background(), id).Body(body).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.CompleteWorkItem``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CompleteWorkItem`: WorkItems
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.CompleteWorkItem`: %v\n", resp)
|
|
}
|
|
- path: /work-items/completed
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#get-completed-work-items
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
ownerId := `1211bcaa32112bcef6122adb21cef1ac` // string | The id of the owner of the work item list being requested. Either an admin, or the owning/current user must make this request. (optional) # string | The id of the owner of the work item list being requested. Either an admin, or the owning/current user must make this request. (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.GetCompletedWorkItems(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.GetCompletedWorkItems(context.Background()).OwnerId(ownerId).Limit(limit).Offset(offset).Count(count).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.GetCompletedWorkItems``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCompletedWorkItems`: []WorkItems
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.GetCompletedWorkItems`: %v\n", resp)
|
|
}
|
|
- path: /work-items/completed/count
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#get-count-completed-work-items
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
ownerId := `1211bcaa32112bcef6122adb21cef1ac` // string | ID of the work item owner. (optional) # string | ID of the work item owner. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.GetCountCompletedWorkItems(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.GetCountCompletedWorkItems(context.Background()).OwnerId(ownerId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.GetCountCompletedWorkItems``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCountCompletedWorkItems`: WorkItemsCount
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.GetCountCompletedWorkItems`: %v\n", resp)
|
|
}
|
|
- path: /work-items/count
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#get-count-work-items
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
ownerId := `ef38f94347e94562b5bb8424a56397d8` // string | ID of the work item owner. (optional) # string | ID of the work item owner. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.GetCountWorkItems(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.GetCountWorkItems(context.Background()).OwnerId(ownerId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.GetCountWorkItems``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetCountWorkItems`: WorkItemsCount
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.GetCountWorkItems`: %v\n", resp)
|
|
}
|
|
- path: /work-items/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#get-work-item
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `2c9180835d191a86015d28455b4a2329` // string | ID of the work item. # string | ID of the work item.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.GetWorkItem(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.GetWorkItem(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.GetWorkItem``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetWorkItem`: WorkItems
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.GetWorkItem`: %v\n", resp)
|
|
}
|
|
- path: /work-items/summary
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#get-work-items-summary
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
ownerId := `1211bcaa32112bcef6122adb21cef1ac` // string | ID of the work item owner. (optional) # string | ID of the work item owner. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.GetWorkItemsSummary(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.GetWorkItemsSummary(context.Background()).OwnerId(ownerId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.GetWorkItemsSummary``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetWorkItemsSummary`: WorkItemsSummary
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.GetWorkItemsSummary`: %v\n", resp)
|
|
}
|
|
- path: /work-items
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#list-work-items
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
|
|
ownerId := `1211bcaa32112bcef6122adb21cef1ac` // string | ID of the work item owner. (optional) # string | ID of the work item owner. (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.ListWorkItems(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.ListWorkItems(context.Background()).Limit(limit).Offset(offset).Count(count).OwnerId(ownerId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.ListWorkItems``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListWorkItems`: []WorkItems
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.ListWorkItems`: %v\n", resp)
|
|
}
|
|
- path: /work-items/{id}/reject/{approvalItemId}
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#reject-approval-item
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the work item # string | The ID of the work item
|
|
approvalItemId := `1211bcaa32112bcef6122adb21cef1ac` // string | The ID of the approval item. # string | The ID of the approval item.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.RejectApprovalItem(context.Background(), id, approvalItemId).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.RejectApprovalItem(context.Background(), id, approvalItemId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.RejectApprovalItem``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `RejectApprovalItem`: WorkItems
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.RejectApprovalItem`: %v\n", resp)
|
|
}
|
|
- path: /work-items/bulk-reject/{id}
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#reject-approval-items-in-bulk
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the work item # string | The ID of the work item
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.RejectApprovalItemsInBulk(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.RejectApprovalItemsInBulk(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.RejectApprovalItemsInBulk``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `RejectApprovalItemsInBulk`: WorkItems
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.RejectApprovalItemsInBulk`: %v\n", resp)
|
|
}
|
|
- path: /work-items/{id}/forward
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#send-work-item-forward
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the work item # string | The ID of the work item
|
|
workitemforward := []byte(`{
|
|
"targetOwnerId" : "2c9180835d2e5168015d32f890ca1581",
|
|
"comment" : "I'm going on vacation.",
|
|
"sendNotifications" : true
|
|
}`) // WorkItemForward |
|
|
|
|
|
|
var workItemForward v3.WorkItemForward
|
|
if err := json.Unmarshal(workitemforward, &workItemForward); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.WorkItemsAPI.SendWorkItemForward(context.Background(), id).WorkItemForward(workItemForward).Execute()
|
|
//r, err := apiClient.V3.WorkItemsAPI.SendWorkItemForward(context.Background(), id).WorkItemForward(workItemForward).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.SendWorkItemForward``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /work-items/{id}/submit-account-selection
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/work-items#submit-account-selection
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `ef38f94347e94562b5bb8424a56397d8` // string | The ID of the work item # string | The ID of the work item
|
|
requestBody := {fieldName=fieldValue} // map[string]interface{} | Account Selection Data map, keyed on fieldName # map[string]interface{} | Account Selection Data map, keyed on fieldName
|
|
|
|
|
|
var requestBody v3.RequestBody
|
|
if err := json.Unmarshal(requestbody, &requestBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkItemsAPI.SubmitAccountSelection(context.Background(), id).RequestBody(requestBody).Execute()
|
|
//resp, r, err := apiClient.V3.WorkItemsAPI.SubmitAccountSelection(context.Background(), id).RequestBody(requestBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkItemsAPI.SubmitAccountSelection``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `SubmitAccountSelection`: WorkItems
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkItemsAPI.SubmitAccountSelection`: %v\n", resp)
|
|
}
|
|
- path: /workflow-executions/{id}/cancel
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#cancel-workflow-execution
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | The workflow execution ID # string | The workflow execution ID
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.WorkflowsAPI.CancelWorkflowExecution(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.WorkflowsAPI.CancelWorkflowExecution(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.CancelWorkflowExecution``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /workflows/execute/external/{id}
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#create-external-execute-workflow
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow
|
|
createexternalexecuteworkflowrequest := []byte(``) // CreateExternalExecuteWorkflowRequest | (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.CreateExternalExecuteWorkflow(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.CreateExternalExecuteWorkflow(context.Background(), id).CreateExternalExecuteWorkflowRequest(createExternalExecuteWorkflowRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.CreateExternalExecuteWorkflow``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateExternalExecuteWorkflow`: CreateExternalExecuteWorkflow200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.CreateExternalExecuteWorkflow`: %v\n", resp)
|
|
}
|
|
- path: /workflows
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#create-workflow
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
createworkflowrequest := []byte(`{name=Send Email, owner={type=IDENTITY, id=2c91808568c529c60168cca6f90c1313, name=William Wilson}, description=Send an email to the identity who's attributes changed., definition={start=Send Email Test, steps={Send Email={actionId=sp:send-email, attributes={body=This is a test, from=sailpoint@sailpoint.com, recipientId.$=$.identity.id, subject=test}, nextStep=success, selectResult=null, type=action}, success={type=success}}}, enabled=false, trigger={type=EVENT, attributes={id=idn:identity-attributes-changed, filter=$.changes[?(@.attribute == 'manager')]}}}`) // CreateWorkflowRequest |
|
|
|
|
|
|
var createWorkflowRequest v3.CreateWorkflowRequest
|
|
if err := json.Unmarshal(createworkflowrequest, &createWorkflowRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.CreateWorkflow(context.Background()).CreateWorkflowRequest(createWorkflowRequest).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.CreateWorkflow(context.Background()).CreateWorkflowRequest(createWorkflowRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.CreateWorkflow``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateWorkflow`: Workflow
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.CreateWorkflow`: %v\n", resp)
|
|
}
|
|
- path: /workflows/{id}/external/oauth-clients
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#create-workflow-external-trigger
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.CreateWorkflowExternalTrigger(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.CreateWorkflowExternalTrigger(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.CreateWorkflowExternalTrigger``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `CreateWorkflowExternalTrigger`: WorkflowOAuthClient
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.CreateWorkflowExternalTrigger`: %v\n", resp)
|
|
}
|
|
- path: /workflows/{id}
|
|
method: Delete
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#delete-workflow
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the Workflow # string | Id of the Workflow
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
r, err := apiClient.V3.WorkflowsAPI.DeleteWorkflow(context.Background(), id).Execute()
|
|
//r, err := apiClient.V3.WorkflowsAPI.DeleteWorkflow(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.DeleteWorkflow``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
}
|
|
- path: /workflows/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#get-workflow
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow
|
|
workflowMetrics := false // bool | disable workflow metrics (optional) (default to true) # bool | disable workflow metrics (optional) (default to true)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.GetWorkflow(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.GetWorkflow(context.Background(), id).WorkflowMetrics(workflowMetrics).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.GetWorkflow``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetWorkflow`: Workflow
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.GetWorkflow`: %v\n", resp)
|
|
}
|
|
- path: /workflow-executions/{id}
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#get-workflow-execution
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Workflow execution ID. # string | Workflow execution ID.
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.GetWorkflowExecution(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.GetWorkflowExecution(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.GetWorkflowExecution``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetWorkflowExecution`: map[string]interface{}
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.GetWorkflowExecution`: %v\n", resp)
|
|
}
|
|
- path: /workflow-executions/{id}/history
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#get-workflow-execution-history
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow execution # string | Id of the workflow execution
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.GetWorkflowExecutionHistory(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.GetWorkflowExecutionHistory(context.Background(), id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.GetWorkflowExecutionHistory``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetWorkflowExecutionHistory`: []WorkflowExecutionEvent
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.GetWorkflowExecutionHistory`: %v\n", resp)
|
|
}
|
|
- path: /workflows/{id}/executions
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#get-workflow-executions
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Workflow ID. # string | Workflow ID.
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
filters := `status eq "Failed"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **start_time**: *eq, lt, le, gt, ge* **status**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **start_time**: *eq, lt, le, gt, ge* **status**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.GetWorkflowExecutions(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.GetWorkflowExecutions(context.Background(), id).Limit(limit).Offset(offset).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.GetWorkflowExecutions``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `GetWorkflowExecutions`: []WorkflowExecution
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.GetWorkflowExecutions`: %v\n", resp)
|
|
}
|
|
- path: /workflow-library
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#list-complete-workflow-library
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.ListCompleteWorkflowLibrary(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.ListCompleteWorkflowLibrary(context.Background()).Limit(limit).Offset(offset).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListCompleteWorkflowLibrary``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListCompleteWorkflowLibrary`: []ListCompleteWorkflowLibrary200ResponseInner
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListCompleteWorkflowLibrary`: %v\n", resp)
|
|
}
|
|
- path: /workflow-library/actions
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#list-workflow-library-actions
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
filters := `id eq "sp:create-campaign"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.ListWorkflowLibraryActions(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.ListWorkflowLibraryActions(context.Background()).Limit(limit).Offset(offset).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListWorkflowLibraryActions``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListWorkflowLibraryActions`: []WorkflowLibraryAction
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListWorkflowLibraryActions`: %v\n", resp)
|
|
}
|
|
- path: /workflow-library/operators
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#list-workflow-library-operators
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.ListWorkflowLibraryOperators(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.ListWorkflowLibraryOperators(context.Background()).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListWorkflowLibraryOperators``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListWorkflowLibraryOperators`: []WorkflowLibraryOperator
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListWorkflowLibraryOperators`: %v\n", resp)
|
|
}
|
|
- path: /workflow-library/triggers
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#list-workflow-library-triggers
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
filters := `id eq "idn:identity-attributes-changed"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.ListWorkflowLibraryTriggers(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.ListWorkflowLibraryTriggers(context.Background()).Limit(limit).Offset(offset).Filters(filters).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListWorkflowLibraryTriggers``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListWorkflowLibraryTriggers`: []WorkflowLibraryTrigger
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListWorkflowLibraryTriggers`: %v\n", resp)
|
|
}
|
|
- path: /workflows
|
|
method: Get
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#list-workflows
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
triggerId := `idn:identity-created` // string | Trigger ID (optional) # string | Trigger ID (optional)
|
|
connectorInstanceId := `28541fec-bb81-4ad4-88ef-0f7d213adcad` // string | Connector Instance ID (optional) # string | Connector Instance ID (optional)
|
|
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
|
|
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.ListWorkflows(context.Background()).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.ListWorkflows(context.Background()).TriggerId(triggerId).ConnectorInstanceId(connectorInstanceId).Limit(limit).Offset(offset).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListWorkflows``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `ListWorkflows`: []Workflow
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListWorkflows`: %v\n", resp)
|
|
}
|
|
- path: /workflows/{id}
|
|
method: Patch
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#patch-workflow
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the Workflow # string | Id of the Workflow
|
|
jsonpatchoperation := []byte(`[{op=replace, path=/name, value=Send Email}, {op=replace, path=/owner, value={type=IDENTITY, id=2c91808568c529c60168cca6f90c1313, name=William Wilson}}, {op=replace, path=/description, value=Send an email to the identity who's attributes changed.}, {op=replace, path=/enabled, value=false}, {op=replace, path=/definition, value={start=Send Email Test, steps={Send Email={actionId=sp:send-email, attributes={body=This is a test, from=sailpoint@sailpoint.com, recipientId.$=$.identity.id, subject=test}, nextStep=success, selectResult=null, type=action}, success={type=success}}}}, {op=replace, path=/trigger, value={type=EVENT, attributes={id=idn:identity-attributes-changed}}}]`) // []JsonPatchOperation |
|
|
|
|
|
|
var jsonPatchOperation []v3.JsonPatchOperation
|
|
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.PatchWorkflow(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.PatchWorkflow(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.PatchWorkflow``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PatchWorkflow`: Workflow
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.PatchWorkflow`: %v\n", resp)
|
|
}
|
|
- path: /workflows/{id}
|
|
method: Put
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#put-workflow
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the Workflow # string | Id of the Workflow
|
|
workflowbody := []byte(`{
|
|
"owner" : {
|
|
"name" : "William Wilson",
|
|
"id" : "2c91808568c529c60168cca6f90c1313",
|
|
"type" : "IDENTITY"
|
|
},
|
|
"name" : "Send Email",
|
|
"description" : "Send an email to the identity who's attributes changed.",
|
|
"definition" : {
|
|
"start" : "Send Email Test",
|
|
"steps" : {
|
|
"Send Email" : {
|
|
"actionId" : "sp:send-email",
|
|
"attributes" : {
|
|
"body" : "This is a test",
|
|
"from" : "sailpoint@sailpoint.com",
|
|
"recipientId.$" : "$.identity.id",
|
|
"subject" : "test"
|
|
},
|
|
"nextStep" : "success",
|
|
"type" : "ACTION"
|
|
},
|
|
"success" : {
|
|
"type" : "success"
|
|
}
|
|
}
|
|
},
|
|
"trigger" : {
|
|
"displayName" : "displayName",
|
|
"attributes" : "{}",
|
|
"type" : "EVENT"
|
|
},
|
|
"enabled" : false
|
|
}`) // WorkflowBody |
|
|
|
|
|
|
var workflowBody v3.WorkflowBody
|
|
if err := json.Unmarshal(workflowbody, &workflowBody); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.PutWorkflow(context.Background(), id).WorkflowBody(workflowBody).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.PutWorkflow(context.Background(), id).WorkflowBody(workflowBody).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.PutWorkflow``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `PutWorkflow`: Workflow
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.PutWorkflow`: %v\n", resp)
|
|
}
|
|
- path: /workflows/execute/external/{id}/test
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#test-external-execute-workflow
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow
|
|
testexternalexecuteworkflowrequest := []byte(``) // TestExternalExecuteWorkflowRequest | (optional)
|
|
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.TestExternalExecuteWorkflow(context.Background(), id).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.TestExternalExecuteWorkflow(context.Background(), id).TestExternalExecuteWorkflowRequest(testExternalExecuteWorkflowRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.TestExternalExecuteWorkflow``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `TestExternalExecuteWorkflow`: TestExternalExecuteWorkflow200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.TestExternalExecuteWorkflow`: %v\n", resp)
|
|
}
|
|
- path: /workflows/{id}/test
|
|
method: Post
|
|
xCodeSample:
|
|
- lang: Go
|
|
label: SDK_tools/sdk/go/v3/methods/workflows#test-workflow
|
|
source: |
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
"encoding/json"
|
|
v3 "github.com/sailpoint-oss/golang-sdk/v2/api_v3"
|
|
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
|
|
)
|
|
|
|
func main() {
|
|
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow
|
|
testworkflowrequest := []byte(`{input={identity={id=ee769173319b41d19ccec6cea52f237b, name=john.doe, type=IDENTITY}, changes=[{attribute=department, oldValue=sales, newValue=marketing}, {attribute=manager, oldValue={id=ee769173319b41d19ccec6c235423237b, name=nice.guy, type=IDENTITY}, newValue={id=ee769173319b41d19ccec6c235423236c, name=mean.guy, type=IDENTITY}}, {attribute=email, oldValue=john.doe@hotmail.com, newValue=john.doe@gmail.com}]}}`) // TestWorkflowRequest |
|
|
|
|
|
|
var testWorkflowRequest v3.TestWorkflowRequest
|
|
if err := json.Unmarshal(testworkflowrequest, &testWorkflowRequest); err != nil {
|
|
fmt.Println("Error:", err)
|
|
return
|
|
}
|
|
|
|
|
|
|
|
configuration := sailpoint.NewDefaultConfiguration()
|
|
apiClient := sailpoint.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.V3.WorkflowsAPI.TestWorkflow(context.Background(), id).TestWorkflowRequest(testWorkflowRequest).Execute()
|
|
//resp, r, err := apiClient.V3.WorkflowsAPI.TestWorkflow(context.Background(), id).TestWorkflowRequest(testWorkflowRequest).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.TestWorkflow``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `TestWorkflow`: TestWorkflow200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.TestWorkflow`: %v\n", resp)
|
|
}
|