The API Analytics panel allows you to get customer-centric insights into API usage and performance. Moesif is built on what is called high-cardinality analytics. This means you can filter and aggregate billions of API calls on pretty much any API field even if it’s a high cardinality field like a session token or user id.
In addition to various views like Time Series, Heatmap, and Segmentation, API analytics also has a live API log to inspect API traffic in real-time.
Search filters are broken into three categories, API call filters, user filters, and company filters.
- API call filters enable you to filter by any API call property like the request URI, response status, HTTP headers, and even fields in the body.
- User filters enable you to filter by a specific user id or other demographic info.
- Company filters similar to user filters but enables filtering at the account level (Useful for B2B companies)
Besides the Moesif predefined fields, you can also filter on any custom fields that you set as part of the event or user custom metadata.
The Moesif predefined fields are marked with
You can select different search views such as Live API Log, Segmentation, Time Series, Geo Heatmap, and Table View via the secondary navigation the the top.
API call filters
|Timeframe||Timeframe filters by the
|Event Id||Each API call is tagged with an event id. If you know the event id (i.e. you printed it in debug logs), you can enter it here.|
|API Key/Session Token||The API key or session token used when making the API call such as a token in the Authorization request header. View identification of users|
|Elapsed Time (ms)||Range filter for the duration of the API call.|
|Request URI Route||Moesif will detect what your URI route/template is from raw URIs. For example, the URI
|Request HTTP Verb||The HTTP Verb or Method such as
|Request IP Address||At the moment, Moesif supports filtering by IPv4 addresses.|
|Request City, Request Region, Request Country||These filters are for the location of the requesting client via geo ip lookup|
|Request Timezone||Timezone of the requesting client via geo IP lookup|
|API Version||If you set an API version using the SDKs, you can filter on version.|
|User Agent, OS, Device||These filters are for the data in the request’s User-Agent header.|
|Response Code||This is the HTTP status code such as 500 or 404|
|request.query.[Header Key]||You can filter on any URL query parameter such as pagination parameters|
|request.headers.[Header Key]||You can filter on any HTTP request header such as Content-Type|
|response.headers.[Header Key]||Like request, can filter on any HTTP response header such as Content-Type|
|metadata.[field key]||Custom fields set in the event metadata|
If your API is a GraphQL API, most will automatically add a secondary set of filters called GraphQL Query Filters, parsed from the GraphQL query.
|User Id||If you need to bring up API calls for a specific end-user, you can enter the user id here. You should call
|User Name||Filter by associated user’s name after setting it in the user metadata|
|User Phone||Filter by associated user’s phone number after setting it in the user metadata|
|User Email||Filter by associated user’s email after setting it in the user metadata|
|user.campaign.[field key]||Referrer and UTM parameters to track effectiveness of your acquisition channels. Set automatically by moesif-browser-js, but not with server side SDKs|
|user.metadata.[field key]||user demographics or other properties you store in the user metadata|
|Company Id||If you need to bring up API calls for a specific end-company, you can enter the company id here. You should call
|Company DomainName||Filter by associated company’s website domain after setting it in the company metadata|
|company.campaign.[field key]||Referrer and UTM parameters to track effectiveness of your acquisition channels. Set automatically by moesif-browser-js, but not with server side SDKs|
|company.metadata.[field key]||company demographics or other properties you store in the company metadata|
API protocol support
Moesif supports a variety of API protocols including RESTful, GraphQL, and Ethereum Web3 (JSON-RPC) APIs. Please see the documentation for GraphQL Support and JSON-RPC Support for protcol specific features.
Moesif persists any active search criteria to the browser window’s URL, so that you can pass your browser tab’s URL to a teammate and they will also see the same filters applied by you without requiring them to re-enter those filter parameters.
Moesif allows you to select specific data to share with the partners or customers without exposing all your API data. After selecting the relevant data, click on the create shared link button, which will create a new workspace that can be accessed by the publicly accessible link. For more information, view workspace documentation.