page ApiBlockDemo { state nameFilter = "a" state found = "" state failed = "" client { api searchDirectory POST /api/directory { request { body { name?: string } } response { return data.data.users } error { return [] } } } functions { client async function search(): Promise { const users = await api.searchDirectory({ name: nameFilter }) found = users.map((user) => user.name).join(", ") } } view {

{found}

{failed}

} }