# NexusEndpointRouteBuilderExtensions.MapNexusService(IEndpointRouteBuilder, string, string?)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable.http/microsoft.aspnetcore.builder.nexusendpointroutebuilderextensions/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable.http/microsoft.aspnetcore.builder.nexusendpointroutebuilderextensions/methods/)

[Source](https://github.com/dotnet/orleans/blob/4e887e9c914a2f2647fb3c81de963511521dd9cb/src/Orleans.Durable.Http/NexusEndpointRouteBuilderExtensions.cs#L46-L48)

```csharp
public static RouteGroupBuilder MapNexusService(this IEndpointRouteBuilder endpoints, string service, string? scope = null)
```

Maps the Nexus service `service`, whose operations [NexusEndpointRouteBuilderExtensions](/orleans/docs/api/csharp/microsoft.orleans.durable.http/microsoft.aspnetcore.builder.nexusendpointroutebuilderextensions/) maps.

### Parameters

- `endpoints` (`IEndpointRouteBuilder`): The endpoint route builder, whose prefix is the Nexus endpoint, such as `/nexus`.
- `service` (`string`): The service name, such as `payments.v1`, of URL-unreserved characters.
- `scope` (`string?`): The scope of the service's operations, or `null` for `nexus/{service}`.

### Returns

A group builder which maps the service's operations and configures its endpoints.

### Exceptions

- `System.ArgumentException`: `service` is empty or has characters other than URL-unreserved ones.
