All URIs are relative to https://sailpoint.api.identitynow.com/beta
Method | HTTP request | Description |
---|---|---|
CreateSegment | Post /segments | Create Segment |
DeleteSegment | Delete /segments/{id} | Delete Segment by ID |
GetSegment | Get /segments/{id} | Get Segment by ID |
ListSegments | Get /segments | List Segments |
PatchSegment | Patch /segments/{id} | Update Segment |
Segment CreateSegment(ctx).Segment(segment).Execute()
Create Segment
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
segment := *openapiclient.NewSegment() // Segment |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.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)
}
Other parameters are passed through a pointer to a apiCreateSegmentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
segment | Segment |
UserContextAuth, UserContextAuth
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteSegment(ctx, id).Execute()
Delete Segment by ID
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "ef38f94347e94562b5bb8424a56397d8" // string | The segment ID to delete.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.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)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The segment ID to delete. |
Other parameters are passed through a pointer to a apiDeleteSegmentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
UserContextAuth, UserContextAuth
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Segment GetSegment(ctx, id).Execute()
Get Segment by ID
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "ef38f94347e94562b5bb8424a56397d8" // string | The segment ID to retrieve.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The segment ID to retrieve. |
Other parameters are passed through a pointer to a apiGetSegmentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
UserContextAuth, UserContextAuth
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Segment ListSegments(ctx).Limit(limit).Offset(offset).Count(count).Execute()
List Segments
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
limit := int32(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 := int32(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)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.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)
}
Other parameters are passed through a pointer to a apiListSegmentsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
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] |
UserContextAuth, UserContextAuth
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Segment PatchSegment(ctx, id).RequestBody(requestBody).Execute()
Update Segment
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "ef38f94347e94562b5bb8424a56397d8" // string | The segment ID to modify.
requestBody := []map[string]interface{}{map[string]interface{}(123)} // []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
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.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)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The segment ID to modify. |
Other parameters are passed through a pointer to a apiPatchSegmentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
requestBody | []map[string]interface{} | A list of segment update operations according to the JSON Patch standard. The following fields are patchable: * name * description * owner * visibilityCriteria * active |
UserContextAuth, UserContextAuth
- Content-Type: application/json-patch+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]