---
title: Minimal APIs endpoints appear as one transaction
source: https://docs.newrelic.com/docs/apm/agents/net-agent/troubleshooting/minimal-api-duplicate-routes-net
---

## Problem [#problem]

If the .NET agent is monitoring an Asp.Net Core “Minimal APIs” application, multiple endpoints may appear as a single web transaction. This is because the endpoints share the same route path even if they have different HTTP request methods.

To differentiate these endpoints, we recommend applying the `SetTransactionName()` API call.

## Solution [#solution]

Add `SetTransactionName()` to give each endpoint a unique transaction name. While your arguments for the API call may vary, we recommend adding `SetTransactionName()` like in the below example:

```cs
// map a minimal API with GET and POST endpoints on the same route
app.MapGet(“/minimalApi”, () =>
{
  NewRelic.Api.Agent.NewRelic.SetTransactionName(null, name: “minimalApi/Get”);
  return Results.Ok(“Get: minimalApi”);
});
app.MapPost(“/minimalApi”, () =>
{
  NewRelic.Api.Agent.NewRelic.SetTransactionName(null, name: “minimalApi/Post”);
  return Results.Ok(“Post: minimalApi”);
});
```

You can read about setting names to transactions in our [SetTransactionName doc](https://docs.newrelic.com/docs/agents/net-agent/net-agent-api/settransactionname-net-agent-api).
