How to set up Moesif with Tyk API Gateway

Looking to step up your API analytics game? Using the Moesif Tyk plugin you can easily leverage Moesif’s diverse offering to do just that!

Tyk Pump, the component used to forward analytics in Tyk, can be easily configured to forward to many different analytics backends including Moesif. Let’s walk through exactly how easy it is to start utilizing Moesif to make sense of your analytics data coming from Tyk in 5 easy steps!

Step #1: Install the Tyk Pump

If not done so already, the first step is to set up an instance of Tyk Pump which has native support for sending data to Moesif in an asynchronous design. The Moesif backend for Tyk pump handles batching and queueing automatically and Tyk Pump sits out of band from your critical path ensuring no impact to your applications. If you’re using a container orchestration layer, there is an official Docker image available on Docker Hub. 

Step #2: Sign up for a free Moesif account

Go to www.moesif.com, and sign up for a free developer account. During the onboarding, you will be provided with a guide for Tyk along with your Application Id. Application Ids are write-only API keys specific to an application in Moesif such as “Development” or “Production”. You can always create more applications in Moesif. 

Step #3: Add Moesif as a backend

In your pump.conf, you’ll need to add the Moesif Application Id and configuration you obtained in the last step. 

"pumps": {
  "moesif": {
    "name": "moesif",
    "meta": {
      "application_id": "Your Moesif Application Id"
    }
  },
}

Step #4: Reload Tyk Pump

You may need to reload the Tyk pump once your configuration is updated to take effect. You should then start seeing data arrive in Moesif. 

Step #5: Start exploring your API analytics in Moesif!

At this point you can start to really dig into the analytics gathered through Tyk within Moesif. Curious about exactly where to start? Check out our post outlining some of Moesif’s powerful features!