How can I use the query attribute by using the API campaign to create a new certification campaign

How can I use the query attribute by using the API campaign to create a new certification campaign

Hi @eescoto,

You can pass the search query in the query field under the searchCampaignInfo field

Here is a sample JSON body you can make use of. You can refer this document for more info.

"query": "attributes.country:USA" is the query used to get the user list.

{
    "name": "API Test Campaign",
    "description": "API Test Campaign",
    "type": "SEARCH",
    "deadline": "2024-05-24T10:00:01.456Z",
    "emailNotificationEnabled": true,
    "autoRevokeAllowed": false,
    "recommendationsEnabled": false,
    "sunsetCommentsRequired": true,
    "searchCampaignInfo": {
        "type": "IDENTITY",
        "description": "Test Campaign query",
        "reviewer": {
            "type": "IDENTITY",
            "id": "c614c7d927934721a4ff4fd9417f9968",
            "name": "Jia.Sing"
        },
        "query": "attributes.country:USA",
        "accessConstraints": [
            {
                "type": "ROLE",
                "operator": "ALL"
            },
            {
                "type": "ACCESS_PROFILE",
                "operator": "ALL"
            },
            {
                "type": "ENTITLEMENT",
                "operator": "ALL"
            }
        ]
    },
    "mandatoryCommentRequirement": "REVOKE_ONLY_DECISIONS"
}
1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.