REST interface for BPD-related resources - Reusable Search Queries Resource - POST Method

Create a new search query that can be reused.

Sample method invocation

POST /rest/bpm/wle/v2/search/queries[?fieldValidationBypass={boolean}]

Usage Notes

Create a new reusable search query.

Parameters

Optional parameters
NameValue TypeDescription
fieldValidationBypass boolean
Specifies that field name validation should be suppressed, so that saved search definitions can be created even if a business data field is not yet known. If this parameter is not specified, false is used as the default value.

Request content

A reusable search query.

The default content type is application/json.

MIME type: application/json

Example content
{
  "jsonFormat": "v2",
  "metadata": {
    "name": "my instances list",
    "description": "a search query that returns my instances list",
    "sharing": {
      "shared": false
    }
  },
  "datasource": {
    "datatype": "INSTANCES",
    "systemTypes": [
      "Process",
      "Case"
    ]
  },
  "population": {
    "target": "SELF"
  },
  "filters": {
    "interaction": "all",
    "json_query": {
      "and": [
        {
          "field": {
            "name": "taskPriority",
            "kind": "System"
          },
          "operator": "LessThan",
          "value": 50
        },
        {
          "field": {
            "name": "amount",
            "kind": "Instance"
          },
          "operator": "GreaterThan",
          "value": 10000
        }
      ]
    }
  },
  "output": {
    "includeAllBusinessData": false,
    "fields": [
      {
        "name": "instanceProcessApp",
        "kind": "System"
      },
      {
        "name": "amount",
        "kind": "Instance"
      },
      {
        "name": "awaitingReview",
        "kind": "Task"
      }
    ],
    "usersFullName": true,
    "sort": [
      {
        "field": {
          "name": "instanceDueDate",
          "kind": "System"
        },
        "order": "ASC"
      }
    ],
    "alphabeticalSort": false,
    "size": 25,
    "stats": {
      "type": "Basic"
    }
  }
}

Response content

The reusable search query (with generated id and additional metadata).

The default content type is application/json.

MIME type: application/json

Example content
{
  "jsonFormat": "v2",
  "metadata": {
    "owner": {
      "id": "uid=fdadmin,o=defaultWIMFileBasedRealm"
    },
    "creator": {
      "id": "uid=fdadmin,o=defaultWIMFileBasedRealm"
    },
    "lastUpdateDate": "2025-06-25T09:21:34.976Z",
    "lastUpdater": {
      "id": "uid=fdadmin,o=defaultWIMFileBasedRealm"
    },
    "name": "my tasks list v2",
    "description": "A search query that returns my tasks list",
    "sharing": {
      "shared": false
    },
    "creationDate": "2025-06-25T09:21:34.976Z"
  },
  "output": {
    "alphabeticalSort": false,
    "size": 25,
    "includeAllBusinessData": false,
    "stats": {
      "type": "Basic"
    },
    "usersFullName": true,
    "sort": [
      {
        "field": {
          "kind": "System",
          "name": "taskDueDate"
        },
        "order": "ASC"
      },
      {
        "field": {
          "kind": "Instance",
          "name": "variable1"
        },
        "order": "DESC"
      },
      {
        "field": {
          "kind": "Task",
          "name": "variable2"
        },
        "order": "DESC"
      }
    ],
    "fields": [
      {
        "kind": "System",
        "name": "instanceProcessApp"
      },
      {
        "kind": "Instance",
        "name": "amount"
      },
      {
        "kind": "Task",
        "name": "awaitingReview"
      }
    ]
  },
  "datasource": {
    "datatype": "TASKS",
    "systemFilter": {
      "excludes": [],
      "includes": []
    },
    "systemTypes": [
      "Process",
      "BPEL"
    ]
  },
  "id": "3",
  "filters": {
    "json_query": {
      "and": [
        {
          "field": {
            "kind": "System",
            "name": "taskPriority"
          },
          "value": 50,
          "operator": "LessThan"
        },
        {
          "field": {
            "kind": "Instance",
            "name": "amount"
          },
          "value": 10000,
          "operator": "GreaterThan"
        }
      ]
    },
    "interaction": "all"
  },
  "population": {
    "target": "SELF"
  }
}

Error Response content

None

Status codes

The method returns one of the following status codes:
CodeDescription
201 Created
Created.
400 Bad Request
Bad Request
403 Forbidden
The caller is not authorized to perform this operation.
404 Not Found
The saved search definition does not exist.
406 Not AcceptableThe requested content type or content encoding is not supported.
409 Conflict
Bad Request. See the details provided.
415 Unsupported Media TypeThe content type or content encoding of the request is not supported.
500 Internal Server Error
Internal Server Error. See the details provided.

Available since

24.0.0.0

Parent Topic: Reusable Search Queries Resource