Menu QaldyDocs

capguard

3 routes, from the API’s own OpenAPI document.

3 routes. Every path starts at https://cloud-api.qaldy.com. Sign-in, tokens, errors and limits are on the overview.

Routes

MethodPathWhat it does
GET/​v1/​apps/​{id}/​shieldAn app's limits against floods and its traffic over the last week
PUT/​v1/​apps/​{id}/​shieldChange an app's limits, or wake it after a flood (workspace admins)
GET/​v1/​workspaces/​{ws}/​capguardWhat the spending cap holds right now, what waits, and what is asleep

Reference

GET /v1/apps/{id}/shield

An app's limits against floods and its traffic over the last week.

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: can_edit on the app
ParameterInTypeRequiredNotes
idpathstringyes1 to 128 characters

Response 200

FieldTypeRequiredNotes
appIdstringyesat least 1 characters
settingsobjectyes
settings.dailyCapinteger or nullyes100 to 1000000000
settings.perVisitorPerMinintegeryes10 to 6000
settings.perAppPerMinintegeryes60 to 120000
settings.blockCrawlersbooleanyes
settings.sleepUnderAttackbooleanyes
isDefaultbooleanyes
suggestedDailyCapintegeryesat least 100
asleepobject or nullyes
asleep.reason"cap" · "daily_cap" · "attack"yes
asleep.untilstring (date-time) or nullyes
todayobjectyes
today.daystring (date)yes
today.forwardedintegeryesat least 0
today.throttledintegeryesat least 0
today.blockedintegeryesat least 0
today.asleepintegeryesat least 0
today.dailyCappedintegeryesat least 0
last7object[]yesup to 14 items
last7[].daystring (date)yes
last7[].forwardedintegeryesat least 0
last7[].throttledintegeryesat least 0
last7[].blockedintegeryesat least 0
last7[].asleepintegeryesat least 0
last7[].dailyCappedintegeryesat least 0
canChangebooleanyes
notesstring[]yes

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

PUT /v1/apps/{id}/shield

Change an app's limits, or wake it after a flood (workspace admins).

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: workspace admin (and can_edit)
ParameterInTypeRequiredNotes
idpathstringyes1 to 128 characters

Request body (application/json)

FieldTypeRequiredNotes
settingsobject
settings.dailyCapinteger or null100 to 1000000000
settings.perVisitorPerMininteger10 to 6000
settings.perAppPerMininteger60 to 120000
settings.blockCrawlersboolean
settings.sleepUnderAttackboolean
wakeboolean

Response 200

FieldTypeRequiredNotes
appIdstringyesat least 1 characters
settingsobjectyes
settings.dailyCapinteger or nullyes100 to 1000000000
settings.perVisitorPerMinintegeryes10 to 6000
settings.perAppPerMinintegeryes60 to 120000
settings.blockCrawlersbooleanyes
settings.sleepUnderAttackbooleanyes
isDefaultbooleanyes
suggestedDailyCapintegeryesat least 100
asleepobject or nullyes
asleep.reason"cap" · "daily_cap" · "attack"yes
asleep.untilstring (date-time) or nullyes
todayobjectyes
today.daystring (date)yes
today.forwardedintegeryesat least 0
today.throttledintegeryesat least 0
today.blockedintegeryesat least 0
today.asleepintegeryesat least 0
today.dailyCappedintegeryesat least 0
last7object[]yesup to 14 items
last7[].daystring (date)yes
last7[].forwardedintegeryesat least 0
last7[].throttledintegeryesat least 0
last7[].blockedintegeryesat least 0
last7[].asleepintegeryesat least 0
last7[].dailyCappedintegeryesat least 0
canChangebooleanyes
notesstring[]yes

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

GET /v1/workspaces/{ws}/capguard

What the spending cap holds right now, what waits, and what is asleep.

  • Authentication: the console’s session cookie.
  • Token: not available. This route is for a signed-in person in the console (403 console_only for a token).
  • Who: member
ParameterInTypeRequiredNotes
wspathstringyes1 to 128 characters

Response 200

FieldTypeRequiredNotes
workspaceIdstringyesat least 1 characters
asOfstring (date-time)yes
hardCapbooleanyes
unitsobject[]yes
units[].kind"requests" · "runs" · "ai_credits"yes
units[].stops"apps" · "runs" · "builds"yes
units[].usednumberyesat least 0
units[].limitnumberyesat least 0
units[].graceLimitnumberyesat least 0
units[].remainingnumberyesat least 0
units[].pctnumberyes0 to 1000
units[].level"ok" · "warn" · "held" · "off"yes
holdsobjectyes
holds.appsobject or nullyes
holds.runsobject or nullyes
holds.buildsobject or nullyes
runsobjectyes
runs.waitingintegeryesat least 0
runs.oldestAtstring (date-time) or nullyes
runs.dropsAtstring (date-time) or nullyes
runs.droppedLastWeekintegeryesat least 0
runs.foldedintegeryesat least 0
sleepingAppsobject[]yes
sleepingApps[].appIdstringyesat least 1 characters
sleepingApps[].namestringyesat least 1 characters
sleepingApps[].reason"cap" · "daily_cap" · "attack"yes
sleepingApps[].untilstring (date-time) or nullyes
enforcedWithinSecondsintegeryesat least 1
notesstring[]yes

Errors: 400, 401, 403, 404, 409, 429 (the error format is on the overview).

Type to search. Up and down to choose, Enter to open, Esc to close.