How it works?

Treblle is an SDK that you add on top of your API. Select a platform below to see how to get started

Step 1

Install Treblle via NPM

Run command

npm install treblle

You can ⭐ our Github repo to stay up to date with new updates

View on Github

Go to Step 2
Step 2

Create a custom middleware

Create middlewares/treblle/index.js

const { strapiTreblle } = require("treblle");
 
module.exports = (strapi) => {
return {
initialize() {
strapi.app.use(
strapiTreblle({
apiKey: "_YOUR_API_KEY_",
projectId: "_YOUR_PROJECT_ID_",
})
);
},
};
};

HEADS UP: You need to create an account to get your API KEY and PROJECT ID

Go to Step 3
Step 3

Enable Treblle on your API

Edit config/middleware.js

module.exports = {
load: {
before: ["treblle", "othermiddleware"],
},
settings: {
treblle: {
enabled: true,
},
},
};
Go to Step 4
Done

🎉 You're all set! 🎉

You and your team just got these amazing features:

  • Real-time API monitoring
  • Auto-generated API documenation
  • API analytics
  • Powerfull request search and filtering
  • 1-click API testing
  • Real-time problem detection
  • OpenAPI Specification support
  • Location based request tracking
  • Smart URL parameters detection
  • and many more..
Optional

Configuration params

Debug mode

const { strapiTreblle } = require("treblle");
 
module.exports = (strapi) => {
return {
initialize() {
strapi.app.use(
strapiTreblle({
apiKey: "_YOUR_API_KEY_",
projectId: "_YOUR_PROJECT_ID_",
showErrors: false, // Set true to enable debug mode
})
);
},
};
};

A boolean that allows you to debug Treblle locally - false by default

Mask sensitive data

const { strapiTreblle } = require("treblle");
 
module.exports = (strapi) => {
return {
initialize() {
strapi.app.use(
strapiTreblle({
apiKey: "_YOUR_API_KEY_",
projectId: "_YOUR_PROJECT_ID_",
additionalFieldsToMask: ["secret", "private", "user_ssn"]
})
);
},
};
};

PRO TIP: Data is masked before it even leaves your server

Need help getting started with Treblle on your API?

Book a meeting