Searches execution results and data

<< Click to Display Table of Contents >>

Navigation:  Bizagi API > Data services > Searches data >

Searches execution results and data

Overview

Bizagi features an OData service which handles aspects of the Experience design.

Through the Searches URI, you may handle data related to searches provided to Stakeholders, as described at Searches data.

This section describes how to use and execute a given search, and explore its results.

 

Resource URL

Start off from the following URL:

[your_bizagi_project_url]/odata/data/searches([search_ID]):

 

Consider:

[search_ID]: The ID of a specific search, as returned when obtaining the Searches data.

[your_bizagi_project_url]: Corresponds to the URL where end users access the Bizagi Work portal.

For instance for an on-premise Bizagi project, such URL would be:

https://[your_server]/[your_project]/oauth2/server/token

While for Bizagi Cloud projects, such URL would be:

https://[project_environment]-[your_project]-[your_company].bizagi.com/oauth2/server/token

 

Possibilities with a given search

The following options are available once you are working with a specific search:

 

1.Execute it by sending out filters (parameters).

Invocation for these results is an HTTP POST action given that you need to send out parameters, as illustrated at Execute a search by sending out parameters.

 

2.Execute it to obtain default results without specifying filters (parameters).

Invocation for these results is an HTTP GET action given that you do not send parameters, as illustrated at Execute a search without specifying parameters.

 

Examples

For both scenarios above, consider these examples.

 

1. Execute a search by sending out parameters.

Consider the following URL:

[your_bizagi_project_url]/odata/data/searches([value_ID])/performSearch

 

And include the following JSON structure to send parameters in the body:

{

       "startParameters": [

        {

            "xpath": "[xpath_name]",

            "searchType": "[searchMode]",

            "value": "[value_for_xpath]"

        }

    ]

}

 

Consider:

[xpath_name]: The name of the xpath as expected by parameters of that search.

 

OData_DSearches3

 

[searchMode]: Either approx (for an approximate search based on text), or exact (for a precise match).

[value_for_xpath]: The value you want to use as a filter for such xpath parameter.

 

Notice if you have more than 1 parameter, you would use:

{

       "startParameters": [

        {

            "xpath": "[xpath1_name]",

            "searchType": "[searchMode]",

            "value": "[value_for_xpath1]"

        },

        {

            "xpath": "[xpath2_name]",

            "searchType": "[searchMode]",

            "value": "[value_for_xpath2]"

        }

    ]

}

 

To filter the search with parameters, consider the notes for the different data types, as described at Values and formats for data types.

 

The following image illustrates data in the body you can send in an HTTP POST and the invocation's result:

 

OData_DSearches5

 

Returned results consider (inside of the value element):

@odata.id: The unique URL to access that specific record.

Id: A string-based GUID representing the URI of that specific record.

Parameters: The list of parameters associated to information of that specific record.

Such parameters include sets of information having:

oXpath: The Xpath to that attribute parting from the process entity.

oValue: The value that such Xpath has for that record.

 

note_pin

In addition to the above, for every set of results returned by the OData services, the successful response includes a set of standard properties which are preceded by the @ sign. Such properties are described at Properties and querying options.

 

For a given search, you may further execute that search and explore results (for instance to execute actions available for a result).

For more information about how to continue to execute searches and navigate with their results, refer to Searches results' actions data.

 

2. Execute a search without specifying parameters.

Consider the following URL:

[your_bizagi_project_url]/odata/data/searches([search_ID])/results 

 

The following image illustrates how you can use an HTTP GET for this resource:

 

OData_DSearches7

 

Returned results consider (inside of the value element):

@odata.id: The unique URL to access that specific record.

Id: A string-based GUID representing the URI of that specific record.

Parameters: The list of parameters associated to information of that specific record.

Such parameters include sets of information having:

oXpath: The Xpath to that attribute parting from the process entity.

oValue: The value that such Xpath has for that record.

 

note_pin

In addition to the above, for every set of results returned by the OData services, the successful response includes a set of standard properties which are preceded by the @ sign. Such properties are described at Properties and querying options.

 

Notice how through the @odata.id property, you can obtain a specific record's detail only, instead of a full list.

For example using:

[your_bizagi_project_url]/odata/data/searches([search_ID])/results(result_ID)

 

OData_DSearches6

 

You may also further navigate and explore that specific result to for instance, execute an associated action for it.

For more information about how to continue to navigate to actions which trigger processes from results of searches, refer to Searches results' actions data.