http
GET /accounts/{account_id}/usageRead what an account has used of each plan quota in the current billing period, with its tier, project count, credits spent and warnings; returns usage where a total of -1 means unlimited. Requires account.billing.read.
Servers
JSON
1[2 {3 "url": "https://api.veryfront.com"4 }5]Authentication
JSON
1[2 {3 "bearerAuth": []4 },5 {6 "apiKeyAuth": []7 }8]JSON
1{2 "bearerAuth": {3 "type": "http",4 "scheme": "bearer",5 "bearerFormat": "JWT or API Key",6 "description": "Use a JWT bearer token or a Veryfront API key in the `Authorization` header."7 },8 "apiKeyAuth": {9 "type": "apiKey",10 "in": "header",11 "name": "X-API-Key",12 "description": "Alternative API key header for `vf_<prefix>_<secret>` tokens."13 }14}Parameters
| Name | Location | Required | Description |
|---|---|---|---|
| account_id | path | Yes |
Parameter contracts
JSON
1[2 {3 "schema": {4 "type": "string",5 "format": "uuid"6 },7 "required": true,8 "name": "account_id",9 "in": "path"10 }11]Responses
200
Account usage against the plan quotas; a total of -1 means unlimited.
JSON
1{2 "description": "Account usage against the plan quotas; a total of -1 means unlimited.",3 "content": {4 "application/json": {5 "schema": {6 "type": "object",7 "properties": {8 "account_id": {9 "type": "string",10 "format": "uuid"11 },12 "project_count": {13 "type": "integer",14 "minimum": 015 },16 "credits_spent": {17 "type": "number"18 },19 "storage": {20 "type": "object",21 "properties": {22 "used": {23 "type": "number",24 "description": "Current usage amount."25 },26 "total": {27 "type": "number",28 "description": "Maximum allowed total. A value of -1 means unlimited."29 },30 "remaining": {31 "type": "number",32 "description": "Remaining amount available."33 },34 "percent_used": {35 "type": "number",36 "description": "Percentage of quota used from 0 to 100."37 }38 },39 "required": [40 "used",41 "total",42 "remaining",43 "percent_used"44 ]45 },46 "bandwidth": {47 "type": "object",48 "properties": {49 "used": {50 "type": "number",51 "description": "Current usage amount."52 },53 "total": {54 "type": "number",55 "description": "Maximum allowed total. A value of -1 means unlimited."56 },57 "remaining": {58 "type": "number",59 "description": "Remaining amount available."60 },61 "percent_used": {62 "type": "number",63 "description": "Percentage of quota used from 0 to 100."64 }65 },66 "required": [67 "used",68 "total",69 "remaining",70 "percent_used"71 ]72 },73 "api_calls": {74 "type": "object",75 "properties": {76 "used": {77 "type": "number",78 "description": "Current usage amount."79 },80 "total": {81 "type": "number",82 "description": "Maximum allowed total. A value of -1 means unlimited."83 },84 "remaining": {85 "type": "number",86 "description": "Remaining amount available."87 },88 "percent_used": {89 "type": "number",90 "description": "Percentage of quota used from 0 to 100."91 }92 },93 "required": [94 "used",95 "total",96 "remaining",97 "percent_used"98 ]99 },100 "custom_domains": {101 "type": "object",102 "properties": {103 "used": {104 "type": "number",105 "description": "Current usage amount."106 },107 "total": {108 "type": "number",109 "description": "Maximum allowed total. A value of -1 means unlimited."110 },111 "remaining": {112 "type": "number",113 "description": "Remaining amount available."114 },115 "percent_used": {116 "type": "number",117 "description": "Percentage of quota used from 0 to 100."118 }119 },120 "required": [121 "used",122 "total",123 "remaining",124 "percent_used"125 ]126 },127 "code_exports": {128 "type": "object",129 "properties": {130 "used": {131 "type": "number",132 "description": "Current usage amount."133 },134 "total": {135 "type": "number",136 "description": "Maximum allowed total. A value of -1 means unlimited."137 },138 "remaining": {139 "type": "number",140 "description": "Remaining amount available."141 },142 "percent_used": {143 "type": "number",144 "description": "Percentage of quota used from 0 to 100."145 }146 },147 "required": [148 "used",149 "total",150 "remaining",151 "percent_used"152 ]153 },154 "veryfront_badge": {155 "type": "object",156 "properties": {157 "used": {158 "type": "number",159 "description": "Current usage amount."160 },161 "total": {162 "type": "number",163 "description": "Maximum allowed total. A value of -1 means unlimited."164 },165 "remaining": {166 "type": "number",167 "description": "Remaining amount available."168 },169 "percent_used": {170 "type": "number",171 "description": "Percentage of quota used from 0 to 100."172 }173 },174 "required": [175 "used",176 "total",177 "remaining",178 "percent_used"179 ]180 },181 "period_start": {182 "type": "string",183 "description": "ISO timestamp for the start of the current billing period."184 },185 "period_end": {186 "type": "string",187 "description": "ISO timestamp for the end of the current billing period."188 },189 "tier": {190 "type": "string",191 "description": "Name of the subscription tier the quotas come from."192 },193 "warnings": {194 "type": "array",195 "items": {196 "type": "string"197 },198 "description": "Human-readable warnings for buckets approaching or over their limit. Empty when there are none."199 }200 },201 "required": [202 "account_id",203 "project_count",204 "credits_spent"205 ]206 }207 }208 }209}400
Bad request
JSON
1{2 "description": "Bad request",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}401
Unauthorized
JSON
1{2 "description": "Unauthorized",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}403
Forbidden
JSON
1{2 "description": "Forbidden",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}404
Not found
JSON
1{2 "description": "Not found",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}500
Server error
JSON
1{2 "description": "Server error",3 "content": {4 "application/problem+json": {5 "schema": {6 "$ref": "#/components/schemas/Problem"7 }8 }9 }10}Referenced contracts
components/schemas/Problem
JSON
1{2 "type": "object",3 "properties": {4 "cause": {5 "type": "string",6 "enum": [7 "schedule_concurrency_forbidden",8 "schedule_fire_in_progress",9 "schedule_run_limit_reached"10 ],11 "description": "Schedule admission refusal."12 },13 "idempotency": {14 "type": "object",15 "properties": {16 "state": {17 "type": "string",18 "enum": [19 "in_progress",20 "payload_mismatch",21 "outcome_unknown"22 ]23 },24 "operation": {25 "type": "string",26 "minLength": 127 },28 "retryable": {29 "type": "boolean"30 },31 "retry_after_seconds": {32 "type": [33 "integer",34 "null"35 ],36 "minimum": 037 },38 "expires_at": {39 "type": [40 "string",41 "null"42 ]43 },44 "recovery": {45 "type": "object",46 "properties": {47 "available": {48 "type": "boolean"49 },50 "description": {51 "type": "string"52 },53 "resource_url": {54 "type": "string"55 }56 },57 "required": [58 "available",59 "description"60 ]61 }62 },63 "required": [64 "state",65 "operation",66 "retryable",67 "retry_after_seconds",68 "expires_at"69 ],70 "description": "Replay status, retry timing, and recovery lookup."71 },72 "type": {73 "type": "string",74 "description": "URI reference identifying the problem type",75 "example": "https://api.veryfront.com/errors/validation-failed"76 },77 "title": {78 "type": "string",79 "description": "Short human-readable summary of the problem",80 "example": "Validation Failed"81 },82 "status": {83 "type": "integer",84 "minimum": 100,85 "maximum": 599,86 "description": "HTTP status code",87 "example": 40088 },89 "code": {90 "type": "string",91 "description": "Stable machine-readable error code",92 "example": "RUN_INVALID_INPUT"93 },94 "detail": {95 "type": "string",96 "description": "Human-readable explanation specific to this occurrence",97 "example": "The 'email' field must be a valid email address"98 },99 "instance": {100 "type": "string",101 "description": "URI reference identifying the specific occurrence",102 "example": "/projects/my-project/members"103 },104 "slug": {105 "type": "string",106 "description": "Stable identifier for the problem type",107 "example": "validation-failed"108 },109 "category": {110 "type": "string",111 "enum": [112 "AUTH",113 "RESOURCE",114 "VALIDATION",115 "DATABASE",116 "SUBSCRIPTION",117 "INTEGRATION",118 "INTERNAL"119 ],120 "description": "API error category",121 "example": "VALIDATION"122 },123 "suggestion": {124 "type": "string",125 "description": "Suggested action to resolve the problem",126 "example": "Check the request body and query parameters against the API documentation."127 },128 "errors": {129 "type": "array",130 "items": {131 "type": "object",132 "properties": {133 "field": {134 "type": "string",135 "description": "Field path that caused the error",136 "example": "email"137 },138 "message": {139 "type": "string",140 "description": "Error message for this field",141 "example": "Invalid email format"142 },143 "code": {144 "type": "string",145 "description": "Error code for this field",146 "example": "INVALID_FORMAT"147 }148 },149 "required": [150 "field",151 "message"152 ]153 },154 "description": "Detailed field-level errors for validation failures"155 }156 },157 "required": [158 "type",159 "title",160 "status"161 ]162}Operation contract
JSON
1{2 "operationId": "getUsage",3 "tags": [4 "billing-usage/Usage/Usage"5 ],6 "summary": "Get usage",7 "description": "Read what an account has used of each plan quota in the current billing period, with its tier, project count, credits spent and warnings; returns usage where a total of -1 means unlimited. Requires account.billing.read.",8 "parameters": [9 {10 "schema": {11 "type": "string",12 "format": "uuid"13 },14 "required": true,15 "name": "account_id",16 "in": "path"17 }18 ],19 "responses": {20 "200": {21 "description": "Account usage against the plan quotas; a total of -1 means unlimited.",22 "content": {23 "application/json": {24 "schema": {25 "type": "object",26 "properties": {27 "account_id": {28 "type": "string",29 "format": "uuid"30 },31 "project_count": {32 "type": "integer",33 "minimum": 034 },35 "credits_spent": {36 "type": "number"37 },38 "storage": {39 "type": "object",40 "properties": {41 "used": {42 "type": "number",43 "description": "Current usage amount."44 },45 "total": {46 "type": "number",47 "description": "Maximum allowed total. A value of -1 means unlimited."48 },49 "remaining": {50 "type": "number",51 "description": "Remaining amount available."52 },53 "percent_used": {54 "type": "number",55 "description": "Percentage of quota used from 0 to 100."56 }57 },58 "required": [59 "used",60 "total",61 "remaining",62 "percent_used"63 ]64 },65 "bandwidth": {66 "type": "object",67 "properties": {68 "used": {69 "type": "number",70 "description": "Current usage amount."71 },72 "total": {73 "type": "number",74 "description": "Maximum allowed total. A value of -1 means unlimited."75 },76 "remaining": {77 "type": "number",78 "description": "Remaining amount available."79 },80 "percent_used": {81 "type": "number",82 "description": "Percentage of quota used from 0 to 100."83 }84 },85 "required": [86 "used",87 "total",88 "remaining",89 "percent_used"90 ]91 },92 "api_calls": {93 "type": "object",94 "properties": {95 "used": {96 "type": "number",97 "description": "Current usage amount."98 },99 "total": {100 "type": "number",101 "description": "Maximum allowed total. A value of -1 means unlimited."102 },103 "remaining": {104 "type": "number",105 "description": "Remaining amount available."106 },107 "percent_used": {108 "type": "number",109 "description": "Percentage of quota used from 0 to 100."110 }111 },112 "required": [113 "used",114 "total",115 "remaining",116 "percent_used"117 ]118 },119 "custom_domains": {120 "type": "object",121 "properties": {122 "used": {123 "type": "number",124 "description": "Current usage amount."125 },126 "total": {127 "type": "number",128 "description": "Maximum allowed total. A value of -1 means unlimited."129 },130 "remaining": {131 "type": "number",132 "description": "Remaining amount available."133 },134 "percent_used": {135 "type": "number",136 "description": "Percentage of quota used from 0 to 100."137 }138 },139 "required": [140 "used",141 "total",142 "remaining",143 "percent_used"144 ]145 },146 "code_exports": {147 "type": "object",148 "properties": {149 "used": {150 "type": "number",151 "description": "Current usage amount."152 },153 "total": {154 "type": "number",155 "description": "Maximum allowed total. A value of -1 means unlimited."156 },157 "remaining": {158 "type": "number",159 "description": "Remaining amount available."160 },161 "percent_used": {162 "type": "number",163 "description": "Percentage of quota used from 0 to 100."164 }165 },166 "required": [167 "used",168 "total",169 "remaining",170 "percent_used"171 ]172 },173 "veryfront_badge": {174 "type": "object",175 "properties": {176 "used": {177 "type": "number",178 "description": "Current usage amount."179 },180 "total": {181 "type": "number",182 "description": "Maximum allowed total. A value of -1 means unlimited."183 },184 "remaining": {185 "type": "number",186 "description": "Remaining amount available."187 },188 "percent_used": {189 "type": "number",190 "description": "Percentage of quota used from 0 to 100."191 }192 },193 "required": [194 "used",195 "total",196 "remaining",197 "percent_used"198 ]199 },200 "period_start": {201 "type": "string",202 "description": "ISO timestamp for the start of the current billing period."203 },204 "period_end": {205 "type": "string",206 "description": "ISO timestamp for the end of the current billing period."207 },208 "tier": {209 "type": "string",210 "description": "Name of the subscription tier the quotas come from."211 },212 "warnings": {213 "type": "array",214 "items": {215 "type": "string"216 },217 "description": "Human-readable warnings for buckets approaching or over their limit. Empty when there are none."218 }219 },220 "required": [221 "account_id",222 "project_count",223 "credits_spent"224 ]225 }226 }227 }228 },229 "400": {230 "description": "Bad request",231 "content": {232 "application/problem+json": {233 "schema": {234 "$ref": "#/components/schemas/Problem"235 }236 }237 }238 },239 "401": {240 "description": "Unauthorized",241 "content": {242 "application/problem+json": {243 "schema": {244 "$ref": "#/components/schemas/Problem"245 }246 }247 }248 },249 "403": {250 "description": "Forbidden",251 "content": {252 "application/problem+json": {253 "schema": {254 "$ref": "#/components/schemas/Problem"255 }256 }257 }258 },259 "404": {260 "description": "Not found",261 "content": {262 "application/problem+json": {263 "schema": {264 "$ref": "#/components/schemas/Problem"265 }266 }267 }268 },269 "500": {270 "description": "Server error",271 "content": {272 "application/problem+json": {273 "schema": {274 "$ref": "#/components/schemas/Problem"275 }276 }277 }278 }279 },280 "x-documentation-source-tag": "Account billing",281 "x-canonical-documentation": {282 "domain": "billing-usage",283 "resource": "Usage",284 "subgroup": "Usage",285 "name": "Get usage",286 "description": "Read what an account has used of each plan quota in the current billing period, with its tier, project count, credits spent and warnings; returns usage where a total of -1 means unlimited. Requires account.billing.read.",287 "operationId": "getUsage"288 },289 "x-mint": {290 "href": "/cloud/rest/api-reference/billing-usage-usage-usage/get-usage"291 }292}