Parameters for filtering, paginating, projecting, and sorting workflow documents. HTTP queries for the parameter 'in' take the form of '?in[name]=my-workflow'. However, the equivalent task query would be '{ `in`: { `name`: `my-workflow` } }'. Same thing applies for the parameters 'not-in', 'equals', 'contains', 'starts-with', and 'ends-with'.
{
"type": "object",
"properties": {
"options": {
"title": "options",
"type": "object",
"properties": {
"limit": {
"type": "integer",
"description": "Number of results to return. Used for pagination.",
"default": 25,
"minimum": 0,
"examples": [
1,
10,
50
]
},
"skip": {
"type": "integer",
"description": "Number of results to skip. Used for pagination.",
"default": 0,
"minimum": 0,
"examples": [
1,
10,
50
]
},
"order": {
"type": "integer",
"description": "Sort direction, 1 for ascending and -1 for descending.",
"default": 1,
"enum": [
-1,
1
]
},
"sort": {
"type": "string",
"description": "Field to sort by",
"default": "name",
"enum": [
"name"
]
},
"include": {
"type": "string",
"description": "Inclusive projection operator formatted as a comma-delineated list. '_id' will be included implicitly unless excluded with 'exclude=_id'. May only be used in conjunction with 'exclude' when 'exclude=_id'.",
"examples": [
"name",
"description",
"name,description"
]
},
"exclude": {
"type": "string",
"description": "Exclusive projection operator formatted as a comma-delineated list. May only be used in conjunction with 'include' when 'exclude=_id'.",
"examples": [
"_id",
"description",
"_id,description"
]
},
"expand": {
"type": "string",
"title": "List of fields to get expanded data",
"description": "Sets the fields to expand. Generally, these are fields like \"metrics.user\", \"metrics.owner\", \"created_by\", etc",
"items": {
"type": "string",
"examples": [
"created_by,user,owner"
]
}
},
"in": {
"description": "Search for fields exactly matching one of the given list options",
"type": "string",
"examples": [
"in[name]=my-workflow,or-this-workflow&in[type]=automation"
]
},
"not-in": {
"description": "Search for fields not exactly matching one of the given list options",
"type": "string",
"examples": [
"not-in[name]=my-workflow,not-this-workflow"
]
},
"equals": {
"description": "Returns results where the specified fields exactly match the given match string(s).",
"type": "string",
"examples": [
"equals[name]=my-workflow"
]
},
"contains": {
"description": "Returns results where the specified fields contain the given match string(s).",
"type": "string",
"examples": [
"contains[name]=workflow"
]
},
"starts-with": {
"description": "Returns results where the specified fields start with the given match string(s).",
"type": "string",
"examples": [
"starts-with[name]=my-"
]
},
"ends-with": {
"description": "Returns results where the specified fields end in the given match string(s).",
"type": "string",
"examples": [
"ends-with[name]=-workflow"
]
}
}
}
},
"required": [
"options"
],
"additionalProperties": false
}
{
"title": "result",
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "workflowDocument"
}
},
"total": {
"type": "integer",
"description": "Total number of documents matching the given query parameters."
},
"start": {
"type": "integer",
"description": "Search index of first document in the items array."
},
"end": {
"type": "integer",
"description": "Search index of the last document in the items array."
},
"count": {
"type": "integer",
"description": "Length of the items array."
},
"next": {
"type": [
"string",
"null"
],
"description": "URI pointing to the next set of paginated results. Preserves previous search and projection parameters. Null if returning the last page of results."
},
"previous": {
"type": [
"string",
"null"
],
"description": "URI pointing to the previous set of paginated results. Preserves previous search and projection parameters. Null if returning the first page of results."
}
}
}