- Node 18.x+
- Install the dependencies by running
npm install
from within theexamples/nodejs
directory. - A Calibre API token
Each example can be run by executing it as a script, eg: CALIBRE_API_TOKEN=YOUR_TOKEN_HERE examples/nodejs/create-test.js
.
- create-test.js - Creates a one-off test for a given URL
- list-agent-locations.js - Prints a list of Calibre’s test locations
- world.js - Create a one-off test for a given URL from every Calibre test location
- bulk-page-import.js - Adds pages to a pre-existing site from an array.
- get-all-pulse-metrics.js - Iterates through every site and page in an account, returns the last 7 days of 'consistently-interactive' metrics for each.
- graphql-request - Make a request to the Calibre GraphQL API
- sites
- create.js - Creates a site
- create-site-webhook-results.js - Creates a site & posts snapshot results to webhook URL
- delete.js - Deletes a given site
- list.js - Lists all sites
- get.js - Get a given site
- update - Updates the name for a given site
- update - Updates the headers and cookies for a given site
- update - Updates the authentication settings for a given site
- deploys
- snapshots
- integrations
- metric-budgets
- agent-settings
To check what API functionality is available, check index.js at the root of this repository. If you spot something note quite right, or have a question, please log a new issue or contact Calibre support. If you’ve built or adapated an example for your usecase, be sure to share it in a new issue ✌️