This topic explains how server object interceptors (SOIs) work, describes common use cases, and compares SOIs with server object extensions (SOEs).
What is a server object interceptor?
Server object interceptors (SOIs) allow developers to intercept requests and responses for existing service operations. SOIs can execute custom business logic, modify incoming requests, and process outgoing responses without requiring changes to existing client applications. SOIs can be used with applications such as ArcGIS Pro, Map Viewer, and custom applications developed using the ArcGIS Maps SDK for JavaScript or ArcGIS Maps SDKs for Native Apps.
The following diagram illustrates how an SOI intercepts requests and responses. An SOI can inspect or modify an incoming request, delegate it to the underlying service for processing, and inspect or modify the response before returning it to the client. Because SOIs execute on the server, they can implement centralized request validation, auditing, and access control. Security-related SOIs must enforce their restrictions consistently across all applicable request paths.
Common SOI use cases
SOIs enable developers to implement custom functionality that is not available through standard service operations. Common use cases include:
-
Auditing and notification
SOIs can log information about incoming requests, including operation names, request parameters, and authenticated user identities. They can also detect invalid or unexpected requests and return appropriate error responses.
When implementing audit logging, avoid recording sensitive information such as authentication tokens, passwords, or confidential data.
-
Fine-grained access control
SOIs can use authenticated user information to implement custom access restrictions at the operation or data level.
For example, an SOI can restrict editing operations for specific users while allowing authorized users to edit features through a map service with Feature Access enabled. It can also restrict access to specific layers, fields, or records based on custom authorization rules.
Because SOIs execute on the server, these restrictions can be enforced independently of client applications. Security-related SOIs must consistently enforce authorization across all applicable service operations and request paths.
-
Data filtering and enrichment
SOIs can inspect and modify service requests and responses based on user information, data attributes, or spatial criteria.
For example, an SOI can retrieve information from an external database and add it to the results of a map service query. The enriched response can then be displayed by supported client applications, such as Map Viewer.
SOIs can also add custom watermarks to map images returned by map services to support organizational branding.
-
Request validation
SOIs can validate incoming requests before they are processed by the underlying service.
For example, an SOI can inspect parameters in an
applyrequest and reject requests containing invalid values. Depending on the application's business rules, it can also modify supported parameters before delegating the request to the service.Edits
When to use an SOE or SOI?
Server object extensions (SOEs) and server object interceptors (SOIs) provide different ways to customize ArcGIS Server services.
Server object extensions (SOEs) add custom operations to map or image services. These operations are exposed through additional REST or SOAP endpoints.
SOE developers define the operation's input parameters, processing logic, and response format. Client applications must explicitly invoke the custom operations.
Use an SOE when you need to implement new functionality that is not provided by existing service operations.
SOE operations are synchronous. For long-running processing tasks, consider whether an asynchronous geoprocessing service or another asynchronous workflow would be more appropriate.
Server object interceptors (SOIs) modify the behavior of existing service operations without introducing new operations.
SOIs can inspect or modify incoming requests, delegate processing to the underlying service, and modify outgoing responses. This allows developers to implement auditing, validation, access control, and response enrichment while preserving existing service endpoints.
Multiple SOIs can also be configured in a chain to process requests and responses in a specified order.
Use an SOI when you need to customize existing service behavior without requiring client applications to invoke new endpoints.
Before developing an SOE or SOI, consider whether the required functionality is already available through ArcGIS Server configuration, built-in capabilities, or other supported extensibility options.
The following table compares functionalities of SOEs and SOIs:
Both developing SOEs and SOIs require knowledge of web development, ArcGIS Enterprise or ArcGIS Server management, ArcGIS developer tools, and programming languages such as Java, or a .NET-based language such as C#. Before you invest development efforts on SOEs or SOIs, consider whether there are any built-in solutions available, and whether this is the functionality you need.
How do service interceptors differ from SOIs?
Service interceptors were introduced in ArcGIS Enterprise SDK 12.0. Both service interceptors and server object interceptors (SOIs) allow developers to intercept and customize service requests and responses. However, they operate at different layers of ArcGIS Server and are designed for different use cases.
The following table summarizes their key differences:
| Capability | Service interceptors | SOIs |
|---|---|---|
| Interception layer | REST handler | Server object |
| Supported services | REST-based ArcGIS Server services, including hosted feature services | Map and image services, including supported service extensions |
| Supported requests | REST only | REST, SOAP, and supported OGC requests |
| Access to service internals | No direct access to underlying service objects or data sources | Access to supported service objects, configurations, and underlying data |
| Programming language | Java | Java or .NET |
| Chaining | Supports multiple service interceptors | Supports multiple SOIs |
When to use a service interceptor or SOI
-
Use a service interceptor when you need to apply request validation, auditing, access control, or response modification across multiple REST-based services. Service interceptors are particularly useful when customization does not require direct access to underlying service objects or data sources.
-
Use an SOI when you need to customize existing operations of a map or image service and access its internal objects or data. SOIs are suitable for advanced service-specific functionality, such as layer-level access control, custom map rendering, or data filtering.
Service interceptors and SOIs are complementary and can be used together. For example, a service interceptor can perform request validation or auditing across multiple REST services, while an SOI applies additional layer-level restrictions to a specific map service.
For more information, see Relationship between service interceptors and SOIs.