Queues
POST /queues/{queueId}/admit
Admit a consumer to the queue
POST
/
queues
/
{queueId}
/
admit
cURL
curl --request POST \
--url https://consumer.fanfare.io/api/queues/{queueId}/admit \
--header 'Content-Type: application/json' \
--data '
{
"consumerId": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({consumerId: '<string>'})
};
fetch('https://consumer.fanfare.io/api/queues/{queueId}/admit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://consumer.fanfare.io/api/queues/{queueId}/admit"
payload = { "consumerId": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://consumer.fanfare.io/api/queues/{queueId}/admit"
payload := strings.NewReader("{\n \"consumerId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"estimatedWaitTimeInSeconds": 123,
"position": 123,
"status": "QUEUED",
"positionDisplayMode": "precise"
}{
"error": "validation_error",
"issues": [
{
"expected": "<string>",
"kind": "<string>",
"message": "<string>",
"path": [
{
"input": "<unknown>",
"key": "<string>",
"origin": "<string>",
"type": "<string>"
}
],
"received": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Path Parameters
Body
application/json
⌘I
cURL
curl --request POST \
--url https://consumer.fanfare.io/api/queues/{queueId}/admit \
--header 'Content-Type: application/json' \
--data '
{
"consumerId": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({consumerId: '<string>'})
};
fetch('https://consumer.fanfare.io/api/queues/{queueId}/admit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://consumer.fanfare.io/api/queues/{queueId}/admit"
payload = { "consumerId": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://consumer.fanfare.io/api/queues/{queueId}/admit"
payload := strings.NewReader("{\n \"consumerId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"estimatedWaitTimeInSeconds": 123,
"position": 123,
"status": "QUEUED",
"positionDisplayMode": "precise"
}{
"error": "validation_error",
"issues": [
{
"expected": "<string>",
"kind": "<string>",
"message": "<string>",
"path": [
{
"input": "<unknown>",
"key": "<string>",
"origin": "<string>",
"type": "<string>"
}
],
"received": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}