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

Get a list of reusable search queries that you can run.

Sample method invocation

GET /rest/bpm/wle/v2/search/queries[?datatype={string}][&systemTypes={string}]

Usage Notes

You can narrow down the list of reusable search queries returned by this REST API using the optional datatype and systemTypes parameters.

Parameters

Optional parameters
NameValue TypeDescription
datatype string
Only returns queries that use this datatype ("TASKS" or "INSTANCES") in the datasource of the query
systemTypes string
A space separated list of systemTypes ("Process", "BPEL" or "Case"): only returns queries that use these systemTypes in the datasource of the query

Request content

None

Response content

A list of reusable search queries.

The default content type is application/json.

MIME type: application/json


Schema
{
	"title": "A list of reusable search queries",
	"description": "A list of reusable search queries",
	"type": "object",
	"properties": {
		"results": {
			"type": "array",
			"description": "The reusable search queries",
			"items": {
				"type": "object",
				"properties": {
					"id": {
						"type": "string",
						"description": "The unique identifier of this search query"
					},
					"metadata": {
						"type": "object",
						"description": "Metadata of the reusable search query",
						"properties": {
							"name": {
								"type": "string",
								"description": "The name of the reusable search query"
							},
							"description": {
								"type": "string",
								"description": "A description of the reusable search query"
							},
							"owner": {
							    "type": "object",
								"description": "The owner of the reusable search query",
					            "properties": {
					                "id": {
						                "type": "string",
						                "description": "The unique name of the user"
					                }
					            }
							},
							"creator": {
                                "type": "object",
                                "description": "The creator of the reusable search query",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "the unique name of the user"
                                    }
                                }
							},
							"lastUpdater": {
                                "type": "object",
                                "description": "The last person that updated the reusable search query",
                                "properties": {
                                    "id": {
                                        "type": "string",
                                        "description": "the unique name of the user"
                                    }
                                }
							},
							"creationDate": {
								"type": "string",
								"description": "The ISO 8601 formated timestamp for the moment the reusable search query"
							},
							"lastUpdateDate": {
								"type": "string",
								"description": "The ISO 8601 formated timestamp for the moment the reusable search query was last updated"
							},
							"sharing": {
								"type": "object",
								"description": "Description about who this reusable search query is shared with",
								"properties": {
									"shared": {
										"type": "boolean",
										"description": "true if this reusable search query is shared, false otherwise"
									},
									"teams": {
										"type": "array",
										"description": "The teams that the reusable search query is shared with.  \nIf shared is true, an empty teams array indicates that the reusable search query is shared with everybody.  \nThe array can optionally include one team to share the reusable search query with.  \nThe teamId must be a team that the user is a member of or manager of.  \nAdministrators can share with any team.  \nSharing with multiple teams may be supported in future releases.",
										"required": false,
										"items": {
											"type": "object",
											"properties": {
												"teamId": {
													"type": "string",
													"description": "The team id."
												},
												"teamName": {
													"type": "string",
													"description": "The team name. Used in returned JSON and ignored if included as part of payload."
												},
												"processAppName": {
													"type": "string",
													"description": "The process app where the team was defined / modeled. Used in returned JSON and ignored if included as part of payload."
												}
											}
										}
									}
								}
							}
						}
					},
					"readonly": {
						"type": "boolean",
						"description": "true if this reusable search query cannot be updated or deleted by the current user, false otherwise"
					},
					"datatype": {
						"description": "The type of data that this reusable search query applies to",
						"required": false,
						"type": "string",
						"enum": ["TASKS",
						"INSTANCES"]
					},
					"systemTypes": {
						"type": "array",
						"description": "The type of systems that this reusable search query applies to",
						"items": {
							"type": "string",
							"enum": ["Process",
							"BPEL",
							"Case"]
						}
					}
				}
			}
		}
	}
}
Example content
{
    "results": [
      {
        "metadata": {
          "owner": {
            "id": "uid=admin,o=defaultWIMFileBasedRealm"
          },
          "creator": {
            "id": "uid=admin,o=defaultWIMFileBasedRealm"
          },
          "lastUpdateDate": "2024-02-20T12:45:28.924Z",
          "lastUpdater": {
            "id": "uid=admin,o=defaultWIMFileBasedRealm"
          },
          "name": "my instances list",
          "description": "A search query that returns my instances list",
          "sharing": {
            "shared": false
          },
          "creationDate": "2024-02-20T12:45:28.924Z"
        },
        "readonly": false,
        "datatype": "INSTANCES",
        "id": "2",
        "systemTypes": [
          "Process",
          "Case"
        ]
      },
      {
        "metadata": {
          "owner": {
            "id": "uid=admin,o=defaultWIMFileBasedRealm"
          },
          "creator": {
            "id": "uid=admin,o=defaultWIMFileBasedRealm"
          },
          "lastUpdateDate": "2024-02-20T12:45:13.050Z",
          "lastUpdater": {
            "id": "uid=admin,o=defaultWIMFileBasedRealm"
          },
          "name": "my tasks list",
          "description": "1 search query that returns my tasks list",
          "sharing": {
            "shared": false
          },
          "creationDate": "2024-02-20T12:45:13.050Z"
        },
        "readonly": false,
        "datatype": "TASKS",
        "id": "1",
        "systemTypes": [
          "Process",
          "BPEL"
        ]
      }
    ]
  }
  

Error Response content

None

Status codes

The method returns one of the following status codes:
CodeDescription
200 OK
Successful operation.
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.
500 Internal Server Error
Internal Server Error. See the details provided.

Available since

24.0.0.0

Parent Topic: Reusable Search Queries Resource