Vanguard API Documentation
API Introduction
Vanguard offers a RESTful API accessible through the /api
endpoint (e.g., https://app.vanguardbackup.com/api
). This documentation provides an overview of the API, its endpoints, and best practices for usage.
For authentication details, including how to obtain and use API tokens, please refer to the Authentication documentation.
Response Codes
Code | Description |
---|---|
200 | Success |
201 | Resource created |
202 | Request accepted |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | Not found |
409 | Conflict |
422 | Unprocessable entity |
429 | Too many requests |
500 | Internal server error |
Endpoints
You can find documentation for the endpoints below:
Rate Limiting
The API is rate-limited to prevent abuse. Current limits are:
- 60 requests per minute for most endpoints
- 5 requests per minute for resource-intensive operations (e.g., initiating backups)
If you exceed these limits, you'll receive a 429 Too Many Requests response.
SDKs
To make integration easier, Vanguard provides official SDKs for popular programming languages. Currently, we support:
- PHP SDK: GitHub Repository
These SDKs provide a convenient wrapper around our API, handling authentication, request formatting, and response parsing for you. We recommend using them when available for your preferred language.
Best Practices
- Use appropriate scopes: Only request the minimal set of permissions your application needs. See the Authentication documentation for details on available scopes.
- Handle rate limits: Implement exponential backoff when you hit rate limits.
- Paginate results: Use pagination parameters to limit the amount of data returned in list endpoints.
- Error handling: Be prepared to handle all possible HTTP status codes.
- Keep tokens secure: Never expose your API tokens in client-side code or public repositories. Refer to the API Token Security best practices for more information.
For more detailed information on authentication and API token management, please see the Authentication documentation.