DataSegmentationAPI
This service is responsible for creating segments that will determine how access is delegated to identities withing the organization.
All URIs are relative to https://sailpoint.api.identitynow.com
| Method | HTTP request | Description |
|---|---|---|
| create-data-segment-v1 | Post /data-segments/v1 | Create segment |
| delete-data-segment-v1 | Delete /data-segments/v1/{segmentId} | Delete segment by id |
| get-data-segment-identity-membership-v1 | Get /data-segments/v1/membership/{identityId} | Get segmentmembership by identity id |
| get-data-segment-v1 | Get /data-segments/v1/{segmentId} | Get segment by id |
| get-data-segmentation-enabled-for-user-v1 | Get /data-segments/v1/user-enabled/{identityId} | Is segmentation enabled by identity |
| list-data-segments-v1 | Get /data-segments/v1 | Get segments |
| patch-data-segment-v1 | Patch /data-segments/v1/{segmentId} | Update segment |
| publish-data-segment-v1 | Post /data-segments/v1/{segmentId} | Publish segment by id |
create-data-segment-v1
Create segment This API creates a segment.
Note: Segment definitions may take time to propagate to all identities.
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiCreateDataSegmentV1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| dataSegment | DataSegment |
Return type
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
"encoding/json"
v1 "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
sailpoint "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
)
func main() {
datasegment := []byte(``) // DataSegment |
var dataSegment v1.DataSegment
if err := json.Unmarshal(datasegment, &dataSegment); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.DataSegmentationAPI.CreateDataSegmentV1(context.Background()).DataSegment(dataSegment).Execute()
//resp, r, err := apiClient.DataSegmentationAPI.CreateDataSegmentV1(context.Background()).DataSegment(dataSegment).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataSegmentationAPI.CreateDataSegmentV1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateDataSegmentV1`: DataSegment
fmt.Fprintf(os.Stdout, "Response from `DataSegmentationAPI.CreateDataSegmentV1`: %v\n", resp)
}
delete-data-segment-v1
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.
on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK.
Example:
configuration = Configuration()
configuration.Experimental = true
Delete segment by id This API deletes the segment specified by the given ID.
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| segmentId | string | The segment ID to delete. |
Other Parameters
Other parameters are passed through a pointer to a apiDeleteDataSegmentV1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xSailPointExperimental | string | Use this header to enable this experimental API. | [default to "true"] published | bool | This determines which version of the segment to delete | [default to false]
Return type
(empty response body)
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
sailpoint "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
)
func main() {
segmentId := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The segment ID to delete. # string | The segment ID to delete.
xSailPointExperimental := `true` // string | Use this header to enable this experimental API. (default to "true") # string | Use this header to enable this experimental API. (default to "true")
published := false // bool | This determines which version of the segment to delete (optional) (default to false) # bool | This determines which version of the segment to delete (optional) (default to false)
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
r, err := apiClient.DataSegmentationAPI.DeleteDataSegmentV1(context.Background(), segmentId).XSailPointExperimental(xSailPointExperimental).Execute()
//r, err := apiClient.DataSegmentationAPI.DeleteDataSegmentV1(context.Background(), segmentId).XSailPointExperimental(xSailPointExperimental).Published(published).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataSegmentationAPI.DeleteDataSegmentV1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
get-data-segment-identity-membership-v1
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.
on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK.
Example:
configuration = Configuration()
configuration.Experimental = true
Get segmentmembership by identity id This API returns the segment membership specified by the given identity ID.
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| identityId | string | The identity ID to retrieve the segments they are in. |
Other Parameters
Other parameters are passed through a pointer to a apiGetDataSegmentIdentityMembershipV1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xSailPointExperimental | string | Use this header to enable this experimental API. | [default to "true"]
Return type
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
sailpoint "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
)
func main() {
identityId := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The identity ID to retrieve the segments they are in. # string | The identity ID to retrieve the segments they are in.
xSailPointExperimental := `true` // string | Use this header to enable this experimental API. (default to "true") # string | Use this header to enable this experimental API. (default to "true")
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.DataSegmentationAPI.GetDataSegmentIdentityMembershipV1(context.Background(), identityId).XSailPointExperimental(xSailPointExperimental).Execute()
//resp, r, err := apiClient.DataSegmentationAPI.GetDataSegmentIdentityMembershipV1(context.Background(), identityId).XSailPointExperimental(xSailPointExperimental).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataSegmentationAPI.GetDataSegmentIdentityMembershipV1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDataSegmentIdentityMembershipV1`: []Segmentmembership
fmt.Fprintf(os.Stdout, "Response from `DataSegmentationAPI.GetDataSegmentIdentityMembershipV1`: %v\n", resp)
}
get-data-segment-v1
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.
on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK.
Example:
configuration = Configuration()
configuration.Experimental = true
Get segment by id This API returns the segment specified by the given ID.
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| segmentId | string | The segment ID to retrieve. |
Other Parameters
Other parameters are passed through a pointer to a apiGetDataSegmentV1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xSailPointExperimental | string | Use this header to enable this experimental API. | [default to "true"]
Return type
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
sailpoint "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
)
func main() {
segmentId := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The segment ID to retrieve. # string | The segment ID to retrieve.
xSailPointExperimental := `true` // string | Use this header to enable this experimental API. (default to "true") # string | Use this header to enable this experimental API. (default to "true")
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.DataSegmentationAPI.GetDataSegmentV1(context.Background(), segmentId).XSailPointExperimental(xSailPointExperimental).Execute()
//resp, r, err := apiClient.DataSegmentationAPI.GetDataSegmentV1(context.Background(), segmentId).XSailPointExperimental(xSailPointExperimental).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataSegmentationAPI.GetDataSegmentV1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDataSegmentV1`: DataSegment
fmt.Fprintf(os.Stdout, "Response from `DataSegmentationAPI.GetDataSegmentV1`: %v\n", resp)
}
get-data-segmentation-enabled-for-user-v1
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.
on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK.
Example:
configuration = Configuration()
configuration.Experimental = true
Is segmentation enabled by identity This API returns whether or not segmentation is enabled for the identity.
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| identityId | string | The identity ID to retrieve if segmentation is enabled for the identity. |
Other Parameters
Other parameters are passed through a pointer to a apiGetDataSegmentationEnabledForUserV1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xSailPointExperimental | string | Use this header to enable this experimental API. | [default to "true"]
Return type
bool
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
sailpoint "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
)
func main() {
identityId := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The identity ID to retrieve if segmentation is enabled for the identity. # string | The identity ID to retrieve if segmentation is enabled for the identity.
xSailPointExperimental := `true` // string | Use this header to enable this experimental API. (default to "true") # string | Use this header to enable this experimental API. (default to "true")
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.DataSegmentationAPI.GetDataSegmentationEnabledForUserV1(context.Background(), identityId).XSailPointExperimental(xSailPointExperimental).Execute()
//resp, r, err := apiClient.DataSegmentationAPI.GetDataSegmentationEnabledForUserV1(context.Background(), identityId).XSailPointExperimental(xSailPointExperimental).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataSegmentationAPI.GetDataSegmentationEnabledForUserV1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDataSegmentationEnabledForUserV1`: bool
fmt.Fprintf(os.Stdout, "Response from `DataSegmentationAPI.GetDataSegmentationEnabledForUserV1`: %v\n", resp)
}
list-data-segments-v1
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.
on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK.
Example:
configuration = Configuration()
configuration.Experimental = true
Get segments This API returns the segment specified by the given ID.
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiListDataSegmentsV1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| xSailPointExperimental | string | Use this header to enable this experimental API. | [default to "true"] |
| enabled | bool | This boolean indicates whether the segment is currently active. Inactive segments have no effect. | [default to true] |
| unique | bool | This returns only one record if set to true and that would be the published record if exists. | [default to false] |
| published | bool | This boolean indicates whether the segment is being applied to the accounts. If unpublished its being actively modified until published | [default to true] |
| limit | int32 | Max number of results to return. See V3 API Standard Collection Parameters for more information. | [default to 250] |
| offset | int32 | Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. | [default to 0] |
| count | 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 for more information. | [default to false] |
| filters | string | Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: id: eq, in, sw name: eq, in, sw |
Return type
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
sailpoint "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
)
func main() {
xSailPointExperimental := `true` // string | Use this header to enable this experimental API. (default to "true") # string | Use this header to enable this experimental API. (default to "true")
enabled := true // bool | This boolean indicates whether the segment is currently active. Inactive segments have no effect. (optional) (default to true) # bool | This boolean indicates whether the segment is currently active. Inactive segments have no effect. (optional) (default to true)
unique := false // bool | This returns only one record if set to true and that would be the published record if exists. (optional) (default to false) # bool | This returns only one record if set to true and that would be the published record if exists. (optional) (default to false)
published := true // bool | This boolean indicates whether the segment is being applied to the accounts. If unpublished its being actively modified until published (optional) (default to true) # bool | This boolean indicates whether the segment is being applied to the accounts. If unpublished its being actively modified until published (optional) (default to true)
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 ""` // 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* **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, sw* **name**: *eq, in, sw* (optional)
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.DataSegmentationAPI.ListDataSegmentsV1(context.Background()).XSailPointExperimental(xSailPointExperimental).Execute()
//resp, r, err := apiClient.DataSegmentationAPI.ListDataSegmentsV1(context.Background()).XSailPointExperimental(xSailPointExperimental).Enabled(enabled).Unique(unique).Published(published).Limit(limit).Offset(offset).Count(count).Filters(filters).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataSegmentationAPI.ListDataSegmentsV1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListDataSegmentsV1`: []DataSegment
fmt.Fprintf(os.Stdout, "Response from `DataSegmentationAPI.ListDataSegmentsV1`: %v\n", resp)
}
patch-data-segment-v1
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.
on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK.
Example:
configuration = Configuration()
configuration.Experimental = true
Update segment Use this API to update segment fields by using the JSON Patch standard.
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| segmentId | string | The segment ID to modify. |
Other Parameters
Other parameters are passed through a pointer to a apiPatchDataSegmentV1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xSailPointExperimental | string | Use this header to enable this experimental API. | [default to "true"] requestBody | []map[string]interface | A list of segment update operations according to the JSON Patch standard. The following fields are patchable: * name * description * membership * memberFilter * memberSelection * scopes * enabled |
Return type
HTTP request headers
- Content-Type: application/json-patch+json
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
"encoding/json"
v1 "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
sailpoint "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
)
func main() {
segmentId := `ef38f943-47e9-4562-b5bb-8424a56397d8` // string | The segment ID to modify. # string | The segment ID to modify.
xSailPointExperimental := `true` // string | Use this header to enable this experimental API. (default to "true") # string | Use this header to enable this experimental API. (default to "true")
requestbody := []byte(`[{"op":"replace","path":"/memberFilter","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 * membership * memberFilter * memberSelection * scopes * enabled
var requestBody []v1.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.DataSegmentationAPI.PatchDataSegmentV1(context.Background(), segmentId).XSailPointExperimental(xSailPointExperimental).RequestBody(requestBody).Execute()
//resp, r, err := apiClient.DataSegmentationAPI.PatchDataSegmentV1(context.Background(), segmentId).XSailPointExperimental(xSailPointExperimental).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataSegmentationAPI.PatchDataSegmentV1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchDataSegmentV1`: DataSegment
fmt.Fprintf(os.Stdout, "Response from `DataSegmentationAPI.PatchDataSegmentV1`: %v\n", resp)
}
publish-data-segment-v1
This API is currently in an experimental state. The API is subject to change based on feedback and further testing. You must include the X-SailPoint-Experimental header and set it to true to use this endpoint.
on the configuration object you can set the x-sailpoint-experimental header to `true' to enable all experimantl endpoints within the SDK.
Example:
configuration = Configuration()
configuration.Experimental = true
Publish segment by id This will publish the segment so that it starts applying the segmentation to the desired users if enabled
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| segmentId | string | The segmentId. |
Other Parameters
Other parameters are passed through a pointer to a apiPublishDataSegmentV1Request struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| xSailPointExperimental | string | Use this header to enable this experimental API. | [default to "true"] |
requestBody | []string | A list of segment ids that you wish to publish | publishAll | bool | This flag decides whether you want to publish all unpublished or a list of specific segment ids | [default to true]
Return type
(empty response body)
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
"encoding/json"
v1 "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
sailpoint "github.com/sailpoint-oss/golang-sdk/v3/data_segmentation"
)
func main() {
xSailPointExperimental := `true` // string | Use this header to enable this experimental API. (default to "true") # string | Use this header to enable this experimental API. (default to "true")
segmentId := `segmentId_example` // string | The segmentId. # string | The segmentId.
requestbody := []byte(``) // []string | A list of segment ids that you wish to publish
publishAll := true // bool | This flag decides whether you want to publish all unpublished or a list of specific segment ids (optional) (default to true) # bool | This flag decides whether you want to publish all unpublished or a list of specific segment ids (optional) (default to true)
var requestBody []v1.RequestBody
if err := json.Unmarshal(requestbody, &requestBody); err != nil {
fmt.Println("Error:", err)
return
}
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
r, err := apiClient.DataSegmentationAPI.PublishDataSegmentV1(context.Background(), segmentId).XSailPointExperimental(xSailPointExperimental).RequestBody(requestBody).Execute()
//r, err := apiClient.DataSegmentationAPI.PublishDataSegmentV1(context.Background(), segmentId).XSailPointExperimental(xSailPointExperimental).RequestBody(requestBody).PublishAll(publishAll).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DataSegmentationAPI.PublishDataSegmentV1``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}