Count access requests waiting on a decision
/access-request/pending-count
How many requests are pending in the organization, not counting the caller’s own — exactly the ones the caller could decide (`can_resolve` is false on your own request). Requires `member:manage`, the permission the queue and the decision both gate on. One indexed count, for a badge or a digest; the requests themselves are `GET /access-request`.
Response Body
curl -X GET 'https://api.elaichi.ai/access-request/pending-count' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json'const response = await fetch('https://api.elaichi.ai/access-request/pending-count', {
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/access-request/pending-count"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())