Skip to main content

CertificationCampaignFiltersAPI

Use this API to implement the certification campaign filter functionality. These filters can be used to create a certification campaign that includes a subset of your entitlements or users to certify.

For example, if for a certification campaign an organization wants to certify only specific users or entitlements, then those can be included/excluded on the basis of campaign filters.

For more information about creating a campaign filter, refer to Creating a Campaign Filter

You can create campaign filters using any of the following criteria types:

  • Access Profile : This criteria type includes or excludes access profiles from a campaign.

  • Account Attribute : This criteria type includes or excludes certification items that match a specified value in an account attribute.

  • Entitlement : This criteria type includes or excludes entitlements from a campaign.

  • Identity : This criteria type includes or excludes specific identities from your campaign.

  • Identity Attribute : This criteria type includes or excludes identities based on whether they have an identity attribute that matches criteria you've chosen.

  • Role : This criteria type includes or excludes roles, as opposed to identities.

  • Source : This criteria type includes or excludes entitlements from a source you select.

For more information about these criteria types, refer to Types of Campaign Filters

Once the campaign filter is created, it can be linked while creating the campaign. The generated campaign will have the items to review as per the campaign filter.

For example, An inclusion campaign filter is created with a source of Source 1, an operation of Equals, and an entitlement of Entitlement 1. When this filter is selected, only users who have Entitlement 1 are included in the campaign, and only Entitlement 1 is shown in the certification.

All URIs are relative to https://sailpoint.api.identitynow.com/v2024

MethodHTTP requestDescription
create-campaign-filterPost /campaign-filtersCreate Campaign Filter
delete-campaign-filtersPost /campaign-filters/deleteDeletes Campaign Filters
get-campaign-filter-by-idGet /campaign-filters/{id}Get Campaign Filter by ID
list-campaign-filtersGet /campaign-filtersList Campaign Filters
update-campaign-filterPost /campaign-filters/{id}Updates a Campaign Filter

create-campaign-filter

Create Campaign Filter Use this API to create a campaign filter based on filter details and criteria.

API Spec

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateCampaignFilterRequest struct via the builder pattern

NameTypeDescriptionNotes
campaignFilterDetailsCampaignFilterDetails

Return type

CampaignFilterDetails

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"
"encoding/json"
v2024 "github.com/sailpoint-oss/golang-sdk/v2/api_v2024"
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 v2024.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.V2024.CertificationCampaignFiltersAPI.CreateCampaignFilter(context.Background()).CampaignFilterDetails(campaignFilterDetails).Execute()
//resp, r, err := apiClient.V2024.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)
}

[Back to top]

delete-campaign-filters

Deletes Campaign Filters Deletes campaign filters whose Ids are specified in the provided list of campaign filter Ids. Authorized callers must be an ORG_ADMIN or a CERT_ADMIN.

API Spec

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiDeleteCampaignFiltersRequest struct via the builder pattern

NameTypeDescriptionNotes
requestBody[]stringA json list of IDs of campaign filters to delete.

Return type

(empty response body)

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"
"encoding/json"
v2024 "github.com/sailpoint-oss/golang-sdk/v2/api_v2024"
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 []v2024.RequestBody
if err := json.Unmarshal(requestbody, &requestBody); err != nil {
fmt.Println("Error:", err)
return
}


configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
r, err := apiClient.V2024.CertificationCampaignFiltersAPI.DeleteCampaignFilters(context.Background()).RequestBody(requestBody).Execute()
//r, err := apiClient.V2024.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)
}

}

[Back to top]

get-campaign-filter-by-id

Get Campaign Filter by ID Retrieves information for an existing campaign filter using the filter's ID.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringThe ID of the campaign filter to be retrieved.

Other Parameters

Other parameters are passed through a pointer to a apiGetCampaignFilterByIdRequest struct via the builder pattern

NameTypeDescriptionNotes

Return type

CampaignFilterDetails

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


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.V2024.CertificationCampaignFiltersAPI.GetCampaignFilterById(context.Background(), id).Execute()
//resp, r, err := apiClient.V2024.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)
}

[Back to top]

list-campaign-filters

List Campaign Filters Use this API to list all campaign filters. You can reduce scope with standard V3 query parameters.

API Spec

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListCampaignFiltersRequest struct via the builder pattern

NameTypeDescriptionNotes
limitint32Max number of results to return. See V3 API Standard Collection Parameters for more information.[default to 250]
startint32Start/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]
includeSystemFiltersboolIf 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.[default to true]

Return type

ListCampaignFilters200Response

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


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.V2024.CertificationCampaignFiltersAPI.ListCampaignFilters(context.Background()).Execute()
//resp, r, err := apiClient.V2024.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)
}

[Back to top]

update-campaign-filter

Updates a Campaign Filter Updates an existing campaign filter using the filter's ID.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
filterIdstringThe ID of the campaign filter being modified.

Other Parameters

Other parameters are passed through a pointer to a apiUpdateCampaignFilterRequest struct via the builder pattern

NameTypeDescriptionNotes

campaignFilterDetails | CampaignFilterDetails | A campaign filter details with updated field values. |

Return type

CampaignFilterDetails

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"
"encoding/json"
v2024 "github.com/sailpoint-oss/golang-sdk/v2/api_v2024"
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 v2024.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.V2024.CertificationCampaignFiltersAPI.UpdateCampaignFilter(context.Background(), filterId).CampaignFilterDetails(campaignFilterDetails).Execute()
//resp, r, err := apiClient.V2024.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)
}

[Back to top]