Skip to main content

Update a scope filter's definition

Available since Strategy ONE (November 2025)

tip

You can try out this workflow at REST API Playground.

Learn more about Strategy REST API Playground here.

This workflow sample demonstrates how to update a scope filter's definition through the using service.

  1. Create a changeset
  2. Update a scope filter definition
  3. Commit the changeset
  4. Delete the changeset
info

Get the authorization token needed to execute the request with POST /api/auth/login.

Get the project ID from GET /api/projects.

Changesets are used in this workflow. For information on how to create and use changesets, see Changesets.

Update a scope filter

Endpoint:PUT /api/model/scopeFilters/{scopeFilterId}

You want to update the scope filter to have an attribute elements prompt based on the "Customer" attribute. The attribute elements should be in the "Smith:Laurell" and "Smith:Sarah" lists.

Sample Request Header:

"accept": "application/json"
"X-MSTR-AuthToken": "frbicqfk7btoggg5bnu450hrqt"
"X-MSTR-MS-Changeset": "C4F6B0E4C87F46EF9B6C5690DFFF87C1"

Sample Request Body:

{
"information": {
"name": "new scope filter"
},
"controlType": "view",
"conditions": [
{
"question": {
"attribute": {
"objectId": "8D679D3C11D3E4981000E787EC6DE8A4",
"subType": "attribute",
"name": "Customer"
},
"listAllElements": true
},
"defaultAnswer": {
"elements": [
{
"display": "Smith:Laurell",
"elementId": "h564"
},
{
"display": "Smith:Sarah",
"elementId": "h565"
}
]
},
"restriction": {
"required": false,
"allowPersonalAnswers": "none",
"min": 1
},
"function": "in",
"id": "FD94DF5EFD7743EEAEF0ED32151A14E8"
}
]
}

Sample Curl:

curl -X PUT "https://demo.microstrategy.com/MicroStrategyLibrary/api/scopeFilters/639FF974194E4469896352772CB0B379" -H "accept: application/json" -H "X-MSTR-AuthToken: frbicqfk7btoggg5bnu450hrqt" -H "X-MSTR-MS-Changeset: C4F6B0E4C87F46EF9B6C5690DFFF87C1" -d '{"information":{"name":"new scope filter"},"controlType":"view","conditions":[{"question":{"attribute":{"objectId":"8D679D3C11D3E4981000E787EC6DE8A4","subType":"attribute","name":"Customer"},"listAllElements":true},"defaultAnswer":{"elements":[{"display":"Smith:Laurell","elementId":"h564"},{"display":"Smith:Sarah","elementId":"h565"}]},"restriction":{"required":false,"allowPersonalAnswers":"none","min":1},"function":"in","id":"FD94DF5EFD7743EEAEF0ED32151A14E8"}]}'

Sample Response Body: You can view the scope filter's new definition in the response body.

{
"information": {
"dateCreated": "2025-10-25T05:20:36.565Z",
"dateModified": "2025-10-25T09:20:22.989Z",
"versionId": "9E9D1EB3478833521A9B43A9C1A6E159",
"acg": 255,
"primaryLocale": "en-US",
"objectId": "639FF974194E4469896352772CB0B379",
"subType": "global_filter",
"name": "new scope filter"
},
"controlType": "view",
"conditions": [
{
"question": {
"attribute": {
"objectId": "8D679D3C11D3E4981000E787EC6DE8A4",
"subType": "attribute",
"name": "Customer"
},
"listAllElements": true
},
"defaultAnswer": {
"elements": [
{
"display": "Smith:Laurell",
"elementId": "h564"
},
{
"display": "Smith:Sarah",
"elementId": "h565"
}
]
},
"restriction": {
"required": false,
"allowPersonalAnswers": "none",
"min": 1
},
"function": "in",
"id": "FD94DF5EFD7743EEAEF0ED32151A14E8"
}
]
}

Response Code: 200 (The scope filter's definition is updated successfully in the changeset.)