Surveys & Streams
Get Stream Quotas
GET
/
v2
/
surveys
/
streams
/
{StreamNumber}
/
quotas
Get Stream Quotas
curl --request GET \
--url https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas \
--header 'Authorization: <authorization>'import requests
url = "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"Status": 0,
"Message": "Success",
"Data": [
{
"StreamNumber": 850,
"StreamUd": "f1789d2b-ac7c-415b-bcb5-8b285e60e698",
"StreamStatus": "Live",
"QuotasCount": 15,
"CalculationType": "Completes",
"StreamQuotas": [
{
"QuotaId": 1459,
"QuotaUd": "cede32b4-6d66-48d8-aaed-a614739adbeb",
"QuotaName": "Male",
"Quota": "100",
"Questions": [
{
"StandardGlobalQuestionID": 43,
"Condition": "Is",
"PreCodes": [
"1"
]
}
],
"QuotaAchieved": "0",
"QuotaRemaining": "100"
},
{
"QuotaId": 1461,
"QuotaUd": "4761e5f8-0eb1-4158-a2a2-7133c241d4fe",
"QuotaName": "18-24",
"Quota": "30",
"Questions": [
{
"StandardGlobalQuestionID": 42,
"Condition": "Is",
"PreCodes": [
"18",
"19",
"20",
"21",
"22",
"23",
"24"
]
}
],
"QuotaAchieved": "0",
"QuotaRemaining": "30"
}
]
}
]
}Returns a Stream’s quotas — the individual target cells, their qualification logic, and how many completes remain.
Path Parameters
| Parameter | Description | Required | Example |
|---|---|---|---|
StreamNumber | The StreamNumber (integer) or StreamUd (UUID) of the stream. | Yes | 850 |
Key Response Fields
| Field | Description |
|---|---|
QuotasCount | Number of individual quotas within the Stream. |
CalculationType | Whether quota targets are counted per Completes or Survey Starts. |
Quota | Desired Completes or Survey Starts for the cell. An empty string ("") means there is no maximum — the quota is open. |
Questions | The qualification logic (StandardGlobalQuestionID, Condition, PreCodes) that defines the cell. |
QuotaAchieved | Completes or Survey Starts achieved in the cell. |
QuotaRemaining | Completes or Survey Starts still needed. Use this as the main indicator of whether more respondents are needed. When QuotaRemaining = 0, pause sample to the cell. |
Nested quotas are supported. Examples can be found on staging Streams3012,3015,3016, and3018. A change toQuotasLastChangedTimestampon the Surveys endpoint signals that you should refresh this Stream’s quotas.
Was this page helpful?
Get Stream Quotas
curl --request GET \
--url https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas \
--header 'Authorization: <authorization>'import requests
url = "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.researchdesk.com/v2/surveys/streams/{StreamNumber}/quotas")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"Status": 0,
"Message": "Success",
"Data": [
{
"StreamNumber": 850,
"StreamUd": "f1789d2b-ac7c-415b-bcb5-8b285e60e698",
"StreamStatus": "Live",
"QuotasCount": 15,
"CalculationType": "Completes",
"StreamQuotas": [
{
"QuotaId": 1459,
"QuotaUd": "cede32b4-6d66-48d8-aaed-a614739adbeb",
"QuotaName": "Male",
"Quota": "100",
"Questions": [
{
"StandardGlobalQuestionID": 43,
"Condition": "Is",
"PreCodes": [
"1"
]
}
],
"QuotaAchieved": "0",
"QuotaRemaining": "100"
},
{
"QuotaId": 1461,
"QuotaUd": "4761e5f8-0eb1-4158-a2a2-7133c241d4fe",
"QuotaName": "18-24",
"Quota": "30",
"Questions": [
{
"StandardGlobalQuestionID": 42,
"Condition": "Is",
"PreCodes": [
"18",
"19",
"20",
"21",
"22",
"23",
"24"
]
}
],
"QuotaAchieved": "0",
"QuotaRemaining": "30"
}
]
}
]
}