About Fastly's Application Programming Interface (API)
Fastly provides an application programming interface (API) that can be accessed via a number of popular interactive clients. The Fastly API allows you to manage Fastly services via remote procedure calls instead of the web interface. This currently includes features such as:
The API features do not include customer account setup, which can only occur through the web interface controls. For examples of each API call in action, including full descriptions of the fields used and examples of requests and responses, see Fastly's API Reference.
Available API clients
The API's main entry point is https://api.fastly.com. It can be accessed via the following interactive clients:
- a Perl module
- a Ruby gem
- two different Python libraries
- a Node.js client
- a Scala client
Fastly's API Client web page contains links to GitHub repositories where these clients can be found. When third-party organizations have supplied these clients, we've noted so on the web page. We also have several integrations available.
Authentication via the API
Nearly all API calls require requests to be authenticated. The Fastly API provides three methods for authenticating API calls: API token, API key, and username-password. Most API calls can be authenticated using an API token or API key alone. Those calls that don't use an API token or API key alone (usually at the account level) typically require using an authenticated session cookie instead. See the API authentication web page for additional information.
|API Token||Allows you to create unique authentication identifiers for the users and applications authorized to interact with your service. You can scope the authorization of tokens to a single service, and you can restrict access to purge all.|
|API Key||Allows the API key located on a customer's account page to be included as a Fastly-Key header. The master API key is scoped to the entire account.|
|Session||Allows you to create a cookie that can be stashed and used in subsequent requests. You can create the cookie with a POST HTTP command issued with the user and password parameters.|
Back to Top