# usage

```graphql
query Usage {
  usage {
    accountId
    projectCount
    creditsSpent
    storage {
      used
      total
      percentUsed
      remaining
    }
    bandwidth {
      used
      total
      percentUsed
      remaining
    }
    apiCalls {
      used
      total
      percentUsed
      remaining
    }
    customDomains {
      used
      total
      percentUsed
      remaining
    }
    codeExports {
      used
      total
      percentUsed
      remaining
    }
    veryfrontBadge {
      used
      total
      percentUsed
      remaining
    }
    periodStart
    periodEnd
    tier
    warnings
  }
}
```

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.

## Responses

| Status | Description               |
| ------ | ------------------------- |
| 200    | The Usage! in data.usage. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query Usage {\n  usage {\n    accountId\n    projectCount\n    creditsSpent\n    storage {\n      used\n      total\n      percentUsed\n      remaining\n    }\n    bandwidth {\n      used\n      total\n      percentUsed\n      remaining\n    }\n    apiCalls {\n      used\n      total\n      percentUsed\n      remaining\n    }\n    customDomains {\n      used\n      total\n      percentUsed\n      remaining\n    }\n    codeExports {\n      used\n      total\n      percentUsed\n      remaining\n    }\n    veryfrontBadge {\n      used\n      total\n      percentUsed\n      remaining\n    }\n    periodStart\n    periodEnd\n    tier\n    warnings\n  }\n}"
}'
```

## Example response

```json
{
  "data": {
    "usage": {
      "accountId": "string",
      "projectCount": 0,
      "creditsSpent": 0,
      "storage": {
        "used": 0,
        "total": 0,
        "percentUsed": 0,
        "remaining": 0
      },
      "bandwidth": {
        "used": 0,
        "total": 0,
        "percentUsed": 0,
        "remaining": 0
      },
      "apiCalls": {
        "used": 0,
        "total": 0,
        "percentUsed": 0,
        "remaining": 0
      },
      "customDomains": {
        "used": 0,
        "total": 0,
        "percentUsed": 0,
        "remaining": 0
      },
      "codeExports": {
        "used": 0,
        "total": 0,
        "percentUsed": 0,
        "remaining": 0
      },
      "veryfrontBadge": {
        "used": 0,
        "total": 0,
        "percentUsed": 0,
        "remaining": 0
      },
      "periodStart": "string",
      "periodEnd": "string",
      "tier": "string",
      "warnings": [
        "string"
      ]
    }
  }
}
```
