Find Instances

Finds Instances matching your criteria.


Permissions Required

Matching Instances will only be included in the results if you have Find permissions to that Instance. Instances that you do not have permissions to will be excluded from the results.

Method Signature

InstancesPage find();
InstancesPage find(Filter filter);
InstancesPage find(String pageToken);
InstancesPage find(Filter filter, String pageToken);
InstancesPage find(Filter filter, String pageToken, Integer pageSize);


filterFilterThe filter criteria to search by, or null to fetch all Instances.
pageTokenStringThe token of the page to fetch
pageSizeIntegerThe number of Instances to return per page
returnsInstancesPageThe requested page of Instances

You can search for matches among the following attributes of the Where class.

textStringFuzzy matches text attributes of an Instance, including Name and Description.
ownerStringSearch for Instances owned by a specific team member. The email
address of the owner of the Instance must match exactly, apart from casing.
- Running
- Completed
- Cancelled
Find Instances with a specific status
workflowIdStringFind Instances of a specific Workflow


 * This example demonstrates finding all Instances of a specific
 * Workflow owned by a particular user that are still running.
 * This also demonstrates paging through results to collect all
 * matches into a single list.
import org.catalytic.sdk.CatalyticClient;
import org.catalytic.sdk.entities.Workflow;
import java.util.List;
import java.util.ArrayList;

public class Program {
    public static void main(String[] args) throws Exception {
      	// Create and initialize the Catalytic SDK Client
      	CatalyticClient catalytic = new CatalyticClient();
        List<Instance> instances = new ArrayList<>();
        Where where = new Where()
            .and().text().matches("SDK Example")
            .and().owner().is("[email protected]")
      	// Fetch all the pages of results and add the instances to `instances`
        InstancesPage results = catalytic.instances().find(where);
      	// Loop through all the pages of instances and add them to the instances array
      	while(results.getNextPageToken() != null) {
            results = catalytic.instances().find(where, results.getNextPageToken());