Get the pre-test quota
curl --request GET \
--url https://myunite.ai/api/v1/quota \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://myunite.ai/api/v1/quota', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://myunite.ai/api/v1/quota"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "quota",
"balance": 123,
"allowance": 123,
"resetsAt": "<string>"
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}Quota
Get the pre-test quota
Returns how many pre-tests your workspace can still run in the current period.
Requires the pretests:read scope.
GET
/
quota
Get the pre-test quota
curl --request GET \
--url https://myunite.ai/api/v1/quota \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://myunite.ai/api/v1/quota', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://myunite.ai/api/v1/quota"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "quota",
"balance": 123,
"allowance": 123,
"resetsAt": "<string>"
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}{
"error": {
"code": "invalid_api_key",
"message": "<string>",
"requestId": "<string>",
"docUrl": "<string>",
"param": "<string>"
}
}