#[SOLVED] How would you use listExecutions?

5 messages · Page 1 of 1 (latest)

silk token
#

Here is the docs for

functionId: string,
queries?: string[],
search?: string,
): Promise<Models.ExecutionList>```

I understand functionId, but what about queries and search? What are you able to query and search for? The logs, the request? This function seems awesome, but I have no idea how you'd use it unlike using listDocuments which is self explainable.
#

How would you use listExecutions?

#

Image a document has an event that invokes the function called. Is there meta-data attached to the execution of the documentId that invoked it or something of the link. I have been staing away from Appwrite functions but I am starting to dip my toes into it.

dusky sierra
#

So it depends on how you call listExecutions, if you use Client SDKs, you get the list of executions that the current logged-in user made (executed function). On Server Side SDKs, you get all the executions. Iirc, most of the attributes support the queries.

Status, Trigger, Method, Status Code, Created [date], Execution ID, Path, Duration, should be the acceptable query params.

See the console dashboard as well that includes these.

silk token
#

Oh ok, thanks man. Didn't know the that, i'll set up a test scenario to test further. Thank you.