The next approval waiting on you after this one
/automation-approval/{id}/next
The caller’s own pending queue, in `sort` order and narrowed by the same filters as the inbox, skipping requests the caller has already voted on or cannot answer. Wraps to the top when nothing is left after this one; `next` is null when nothing is waiting.
Path Parameters
Resource id
Query Parameters
Only requests on behalf of this workflow owner.
expiring (soonest deadline first), oldest or newest (by when it was raised; the default). A cursor only continues the sort it was made for.
expiringoldestnewest
Matches the approval title and message. LIKE wildcards are matched literally. Max 200 characters.
Response Body
curl -X GET 'https://api.elaichi.ai/automation-approval/<id>/next' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json'const response = await fetch('https://api.elaichi.ai/automation-approval/<id>/next', {
method: 'GET',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/automation-approval/<id>/next"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())