### Install mkcert on Windows Source: https://github.com/particular/servicecontrol/blob/master/docs/reverseproxy-testing.md Install mkcert on Windows using Chocolatey or Scoop package managers. After installation, run 'mkcert -install' to add the local CA to your system's trust store. ```cmd choco install mkcert ``` ```cmd scoop install mkcert ``` -------------------------------- ### Start ServiceControl Service Source: https://github.com/particular/servicecontrol/wiki/Multi-Transport-Support After re-installation, start the ServiceControl service to begin using the new transport. ```bash net start Particular.ServiceControl ``` -------------------------------- ### Install mkcert on Windows using Scoop Source: https://github.com/particular/servicecontrol/blob/master/docs/https-testing.md Installs mkcert using the Scoop package manager on Windows. ```powershell scoop install mkcert ``` -------------------------------- ### Directory Structure after Setup Source: https://github.com/particular/servicecontrol/blob/master/docs/reverseproxy-testing.md This shows the expected file and directory structure within the .local folder after completing the reverse proxy setup. ```text .local/ ├── compose.yml ├── nginx.conf └── certs/ ├── local-platform.pem └── local-platform-key.pem ``` -------------------------------- ### Install mkcert on Windows using Chocolatey Source: https://github.com/particular/servicecontrol/blob/master/docs/https-testing.md Installs mkcert using the Chocolatey package manager on Windows. ```powershell choco install mkcert ``` -------------------------------- ### Start Containerized Services with Docker Compose Source: https://github.com/particular/servicecontrol/blob/master/docs/testing.md Navigate to the test directory and run this command to start the containerized services defined in the docker-compose.yml file. Ensure the .env file is configured with the correct PR-based tag. ```shell docker compose up -d ``` -------------------------------- ### Install mkcert on macOS using Homebrew Source: https://github.com/particular/servicecontrol/blob/master/docs/https-testing.md Installs mkcert using the Homebrew package manager on macOS. ```bash brew install mkcert ``` -------------------------------- ### Install mkcert on Linux Source: https://github.com/particular/servicecontrol/blob/master/docs/https-testing.md Installs mkcert on Debian/Ubuntu and Arch Linux systems. Requires libnss3-tools for Debian/Ubuntu. ```bash # Debian/Ubuntu sudo apt install libnss3-tools # Then download from https://github.com/FiloSottile/mkcert/releases # Arch Linux sudo pacman -S mkcert ``` -------------------------------- ### Install mkcert Root CA Source: https://github.com/particular/servicecontrol/blob/master/docs/reverseproxy-testing.md Install mkcert's root Certificate Authority to avoid certificate errors in the browser. ```bash mkcert -install ``` -------------------------------- ### Start NGINX Reverse Proxy with Docker Compose Source: https://github.com/particular/servicecontrol/blob/master/docs/reverseproxy-testing.md Use this command to start the NGINX reverse proxy service defined in your Docker Compose file. ```cmd docker compose -f .local/compose.yml up -d ``` -------------------------------- ### Get Configuration Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the general configuration for ServiceControl. ```APIDOC ## GET /configuration ### Description Retrieves the general configuration for ServiceControl. ### Method GET ### Endpoint /configuration ``` -------------------------------- ### Run Basic ServiceControl Container Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl/Container-README.md This command demonstrates the most basic way to start a ServiceControl container using Docker. It configures essential environment variables for transport type, connection strings, and remote instances, and enables integrated ServicePulse. ```shell docker run -d --name servicecontrol -p 33333:33333 \ -e TRANSPORTTYPE=RabbitMQ.QuorumConventionalRouting \ -e CONNECTIONSTRING="host=rabbitmq" \ -e RAVENDB_CONNECTIONSTRING="http://servicecontrol-db:8080" \ -e REMOTEINSTANCES='[{"api_uri":"http://audit:44444/api"}]' \ -e ENABLEINTEGRATEDSERVICEPULSE="true" \ particular/servicecontrol:latest --setup-and-run ``` -------------------------------- ### Test Startup Failure with Missing Authentication Settings Source: https://github.com/particular/servicecontrol/blob/master/docs/authentication-testing.md Configure environment variables with missing required authentication settings for ServiceControl, ServiceControl.Audit, and ServiceControl.Monitoring. This scenario tests that the application fails to start. ```cmd rem ServiceControl (Primary) set SERVICECONTROL_AUTHENTICATION_ENABLED=true set SERVICECONTROL_AUTHENTICATION_AUTHORITY= set SERVICECONTROL_AUTHENTICATION_AUDIENCE=api://servicecontrol-test set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_CLIENTID=test-client-id set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_AUTHORITY= set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES=["api://servicecontrol-test/access_as_user"] set SERVICECONTROL_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUTHENTICATION_VALIDATEAUDIENCE= rem ServiceControl.Audit set SERVICECONTROL_AUDIT_AUTHENTICATION_ENABLED=true set SERVICECONTROL_AUDIT_AUTHENTICATION_AUTHORITY= set SERVICECONTROL_AUDIT_AUTHENTICATION_AUDIENCE=api://servicecontrol-test set SERVICECONTROL_AUDIT_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEAUDIENCE= rem ServiceControl.Monitoring set MONITORING_AUTHENTICATION_ENABLED=true set MONITORING_AUTHENTICATION_AUTHORITY= set MONITORING_AUTHENTICATION_AUDIENCE=api://servicecontrol-test set MONITORING_AUTHENTICATION_REQUIREHTTPSMETADATA= set MONITORING_AUTHENTICATION_VALIDATEISSUER= set MONITORING_AUTHENTICATION_VALIDATEAUDIENCE= dotnet run ``` -------------------------------- ### Get Instance Info Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves configuration information for the current ServiceControl instance. ```APIDOC ## GET /instance-info ### Description Retrieves configuration details for the ServiceControl instance. ### Method GET ### Endpoint /instance-info ``` -------------------------------- ### Get Endpoint Settings Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the settings for all endpoints. ```APIDOC ## GET /endpointssettings ### Description Retrieves the settings for all endpoints. ### Method GET ### Endpoint /endpointssettings ``` -------------------------------- ### Generate PFX Certificates with mkcert Source: https://github.com/particular/servicecontrol/blob/master/docs/https-testing.md Generates a PFX certificate for localhost and other specified hostnames using mkcert. This command requires mkcert to be installed and the local CA to be trusted. ```bash # Install mkcert's root CA (one-time setup) mkcert -install # Navigate to the certs folder cd .local/certs # Generate PFX certificate for localhost mkcert -p12-file localhost.pfx -pkcs12 localhost 127.0.0.1 ::1 servicecontrol servicecontrol-audit servicecontrol-monitor ``` -------------------------------- ### Configure Combined Proxies and Networks Source: https://github.com/particular/servicecontrol/blob/master/docs/forward-headers-testing.md Enable forwarded headers processing and configure specific known proxies and networks for ServiceControl, its Audit component, and Monitoring. This setup allows for granular control over which forwarded headers are trusted. ```cmd rem ServiceControl (Primary) set SERVICECONTROL_FORWARDEDHEADERS_ENABLED=true set SERVICECONTROL_FORWARDEDHEADERS_TRUSTALLPROXIES= set SERVICECONTROL_FORWARDEDHEADERS_KNOWNPROXIES=192.168.1.100 set SERVICECONTROL_FORWARDEDHEADERS_KNOWNNETWORKS=127.0.0.0/8,::1/128 rem ServiceControl.Audit set SERVICECONTROL_AUDIT_FORWARDEDHEADERS_ENABLED=true set SERVICECONTROL_AUDIT_FORWARDEDHEADERS_TRUSTALLPROXIES= set SERVICECONTROL_AUDIT_FORWARDEDHEADERS_KNOWNPROXIES=192.168.1.100 set SERVICECONTROL_AUDIT_FORWARDEDHEADERS_KNOWNNETWORKS=127.0.0.0/8,::1/128 rem ServiceControl.Monitoring set MONITORING_FORWARDEDHEADERS_ENABLED=true set MONITORING_FORWARDEDHEADERS_TRUSTALLPROXIES= set MONITORING_FORWARDEDHEADERS_KNOWNPROXIES=192.168.1.100 set MONITORING_FORWARDEDHEADERS_KNOWNNETWORKS=127.0.0.0/8,::1/128 dotnet run ``` -------------------------------- ### Get License Information Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves license information, with an option to refresh it. ```APIDOC ## GET /license ### Description Retrieves the ServiceControl license information. Can optionally refresh the license. ### Method GET ### Endpoint /license ### Parameters #### Query Parameters - **refresh** (Boolean) - Optional - If true, refreshes the license information before returning. - **clientName** (String) - Optional - The name of the client for license retrieval. - **cancellationToken** (CancellationToken) - Optional - Token to signal cancellation. ``` -------------------------------- ### Configure Mixed Authentication (Remotes Only) Source: https://github.com/particular/servicecontrol/blob/master/docs/authentication-testing.md Set environment variables to configure ServiceControl instances with mixed authentication settings. The primary instance is configured without authentication, while Audit and Monitoring instances have authentication enabled. This setup is used for testing scenario 13. ```cmd rem ServiceControl (Primary) - WITHOUT authentication set SERVICECONTROL_HTTPS_ENABLED=true set SERVICECONTROL_HTTPS_CERTIFICATEPATH=C:\path\to\cert\cert.pfx set SERVICECONTROL_HTTPS_CERTIFICATEPASSWORD=changeit set SERVICECONTROL_AUTHENTICATION_ENABLED= set SERVICECONTROL_AUTHENTICATION_AUTHORITY= set SERVICECONTROL_AUTHENTICATION_AUDIENCE= set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_CLIENTID= set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_AUTHORITY= set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES= set SERVICECONTROL_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUTHENTICATION_VALIDATEAUDIENCE= set SERVICECONTROL_REMOTEINSTANCES=[{"api_uri":"https://localhost:44444"}] rem ServiceControl.Audit - WITH authentication set SERVICECONTROL_AUDIT_HTTPS_ENABLED=true set SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPATH=C:\path\to\cert\cert.pfx set SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPASSWORD=changeit set SERVICECONTROL_AUDIT_AUTHENTICATION_ENABLED=true set SERVICECONTROL_AUDIT_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/{tenantId} set SERVICECONTROL_AUDIT_AUTHENTICATION_AUDIENCE=api://{servicecontrol-audience} set SERVICECONTROL_AUDIT_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEAUDIENCE= rem ServiceControl.Monitoring - WITH authentication set MONITORING_HTTPS_ENABLED=true set MONITORING_HTTPS_CERTIFICATEPATH=C:\path\to\cert\cert.pfx set MONITORING_HTTPS_CERTIFICATEPASSWORD=changeit set MONITORING_AUTHENTICATION_ENABLED=true set MONITORING_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/{tenantId} set MONITORING_AUTHENTICATION_AUDIENCE=api://{servicecontrol-audience} set MONITORING_AUTHENTICATION_REQUIREHTTPSMETADATA= set MONITORING_AUTHENTICATION_VALIDATEISSUER= set MONITORING_AUTHENTICATION_VALIDATEAUDIENCE= dotnet run ``` -------------------------------- ### Example of Assembly Version Mismatch Error Source: https://github.com/particular/servicecontrol/blob/master/docs/packaging.md This error message indicates a conflict where the same assembly exists in different locations (e.g., instance folder and transport) with differing versions. It suggests adding the problematic package to Directory.Packages.props to enforce a consistent version across the project. ```text Component assembly version mismatch detected Expected: But was: < "System.Memory.dll has a different version in Instance/ServiceControl compared to Transports/RabbitMQ. Add the package to Directory.Packages.props to ensure the same version is used everywhere: 4.6.31308.01 | 4.6.28619.01", "System.Memory.dll has a different version in Transports/RabbitMQ compared to Instance/ServiceControl. Add the package to Directory.Packages.props to ensure the same version is used everywhere: 4.6.28619.01 | 4.6.31308.01" > ``` -------------------------------- ### PromQL Query for Ingestion Rate Source: https://github.com/particular/servicecontrol/blob/master/docs/telemetry.md Example PromQL query to calculate the ingestion rate of audit messages over a 5-minute window, grouped by exported job. ```promql sum (rate(sc_audit_ingestion_message_duration_seconds_count[5m])) by (exported_job) ``` -------------------------------- ### Get Connection Details Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the current connection details for ServiceControl. ```APIDOC ## GET /connection ### Description Retrieves the current connection details for ServiceControl. ### Method GET ### Endpoint /connection ``` -------------------------------- ### Get Edit Configuration Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the configuration for editing failed messages. ```APIDOC ## GET /edit/config ### Description Retrieves the configuration for editing failed messages. ### Method GET ### Endpoint /edit/config ``` -------------------------------- ### Run ServiceControl RavenDB Container Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.RavenDB/Container-README.md Basic usage of the `docker run` command to start the ServiceControl RavenDB container. Mounts volumes for configuration and data persistence. For advanced usage, refer to the official container documentation. ```shell docker run -d --name servicecontrol-db \ -v db-config:/etc/ravendb \ -v db-data:/var/lib/ravendb/data \ particular/servicecontrol-ravendb:latest ``` -------------------------------- ### PromQL Query for Failure Rate Source: https://github.com/particular/servicecontrol/blob/master/docs/telemetry.md Example PromQL query to calculate the failure rate of audit messages over a 5-minute window, grouped by exported job and result. ```promql sum(rate(sc_audit_ingestion_failures_total[5m])) by (exported_job,result) ``` -------------------------------- ### PromQL Query for Message Duration Quantile Source: https://github.com/particular/servicecontrol/blob/master/docs/telemetry.md Example PromQL query to calculate the 90th percentile of audit message processing duration over a 5-minute window, grouped by histogram buckets and exported job. ```promql histogram_quantile(0.9,sum(rate(sc_audit_ingestion_message_duration_seconds_bucket[5m])) by (le,exported_job)) ``` -------------------------------- ### Get Event Log Items Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a paginated list of event log items. ```APIDOC ## GET /eventlogitems ### Description Retrieves a paginated list of items from the event log. ### Method GET ### Endpoint /eventlogitems ### Parameters #### Query Parameters - **pagingInfo** (PagingInfo) - Optional - Information for pagination. ``` -------------------------------- ### Initialize Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.Transports.Tests/ApprovalFiles/APIApprovals.ServiceControlTransport.approved.txt Initializes the service with the provided settings. ```APIDOC ## Initialize ### Description Initializes the service with the provided settings. ### Method N/A (Method signature provided) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body - **settings** (ReadOnlyDictionary) - Required - A dictionary of settings for initialization. ### Request Example N/A ### Response #### Success Response N/A #### Response Example N/A ``` -------------------------------- ### Set Environment Variables for ServiceControl Forwarded Headers Testing Source: https://github.com/particular/servicecontrol/blob/master/docs/forward-headers-testing.md Before running tests, set these environment variables to configure the behavior of forwarded headers for ServiceControl and its related services. This setup is for Group A testing, which uses default or TrustAllProxies=true settings. ```cmd rem Cleanup and start - ServiceControl (Primary) set SERVICECONTROL_FORWARDEDHEADERS_ENABLED= set SERVICECONTROL_FORWARDEDHEADERS_TRUSTALLPROXIES= set SERVICECONTROL_FORWARDEDHEADERS_KNOWNPROXIES= set SERVICECONTROL_FORWARDEDHEADERS_KNOWNNETWORKS= rem ServiceControl.Audit set SERVICECONTROL_AUDIT_FORWARDEDHEADERS_ENABLED= set SERVICECONTROL_AUDIT_FORWARDEDHEADERS_TRUSTALLPROXIES= set SERVICECONTROL_AUDIT_FORWARDEDHEADERS_KNOWNPROXIES= set SERVICECONTROL_AUDIT_FORWARDEDHEADERS_KNOWNNETWORKS= rem ServiceControl.Monitoring set MONITORING_FORWARDEDHEADERS_ENABLED= set MONITORING_FORWARDEDHEADERS_TRUSTALLPROXIES= set MONITORING_FORWARDEDHEADERS_KNOWNPROXIES= set MONITORING_FORWARDEDHEADERS_KNOWNNETWORKS= dotnet run ``` -------------------------------- ### Run Basic Monitoring Container with Docker Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.Monitoring/Container-README.md This is the most basic way to create a monitoring container using Docker. It assumes a RabbitMQ message broker is also hosted in a Docker container with default credentials. Ensure the TRANSPORTTYPE and CONNECTIONSTRING environment variables are correctly set for your environment. ```shell docker run -d --name monitoring -p 33633:33633 \ -e TRANSPORTTYPE=RabbitMQ.QuorumConventionalRouting \ -e CONNECTIONSTRING="host=rabbitmq" \ particular/servicecontrol-monitoring:latest --setup-and-run ``` -------------------------------- ### Create Local Development Folders Source: https://github.com/particular/servicecontrol/blob/master/docs/https-testing.md Creates the necessary `.local` and `.local/certs` directories in the repository root for storing local development assets. This folder is gitignored. ```bash mkdir .local mkdir .local/certs ``` -------------------------------- ### Get Errors Summary Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a summary of all errors. ```APIDOC ## GET /errors/summary ### Description Retrieves a summary of all errors within the system. ### Method GET ### Endpoint /errors/summary ``` -------------------------------- ### Get Errors Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a list of all failed messages. ```APIDOC ## GET /errors ### Description Retrieves a list of all failed messages. ### Method GET ### Endpoint /errors ### Parameters #### Query Parameters - **pagingInfo** (PagingInfo) - Optional - Information for pagination. - **sortInfo** (SortInfo) - Optional - Information for sorting. - **status** (String) - Optional - The status to filter errors by. - **modified** (String) - Optional - The modification date to filter by. - **queueAddress** (String) - Optional - The address of the queue to filter errors by. ``` -------------------------------- ### Configure Hosts File Entries Source: https://github.com/particular/servicecontrol/blob/master/docs/reverseproxy-testing.md Add these entries to your hosts file to map domain names to the local loopback address for reverse proxy testing. ```text 127.0.0.1 servicecontrol.localhost 127.0.0.1 servicecontrol-audit.localhost 127.0.0.1 servicecontrol-monitor.localhost ``` -------------------------------- ### Get Known Endpoints Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a list of known endpoints. ```APIDOC ## GET /endpoints/known ### Description Retrieves a list of known endpoints. ### Method GET ### Endpoint /endpoints/known ### Parameters #### Query Parameters - **pagingInfo** (PagingInfo) - Optional - Information for pagination. ``` -------------------------------- ### Configure ServiceControl with Authentication (CMD) Source: https://github.com/particular/servicecontrol/blob/master/docs/authentication-testing.md Set environment variables to enable HTTPS and authentication for the primary ServiceControl instance. Ensure to replace placeholders like {tenantId} and {servicecontrol-clientid} with your actual values. This configuration is for testing purposes and not recommended for production. ```cmd rem ServiceControl (Primary) - WITH authentication set SERVICECONTROL_HTTPS_ENABLED=true set SERVICECONTROL_HTTPS_CERTIFICATEPATH=C:\path\to\cert\cert.pfx set SERVICECONTROL_HTTPS_CERTIFICATEPASSWORD=changeit set SERVICECONTROL_AUTHENTICATION_ENABLED=true set SERVICECONTROL_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/{tenantId} set SERVICECONTROL_AUTHENTICATION_AUDIENCE=api://{servicecontrol-audience} set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_CLIENTID={servicepulse-clientid} set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_AUTHORITY=https://login.microsoftonline.com/{tenantId}/v2.0 set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES=["api://{servicecontrol-audience}/access_as_user"] set SERVICECONTROL_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUTHENTICATION_VALIDATEAUDIENCE= set SERVICECONTROL_REMOTEINSTANCES=[{"api_uri":"https://localhost:44444"}] ``` ```cmd rem ServiceControl.Audit - WITHOUT authentication set SERVICECONTROL_AUDIT_HTTPS_ENABLED=true set SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPATH=C:\path\to\cert\cert.pfx set SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPASSWORD=changeit set SERVICECONTROL_AUDIT_AUTHENTICATION_ENABLED= set SERVICECONTROL_AUDIT_AUTHENTICATION_AUTHORITY= set SERVICECONTROL_AUDIT_AUTHENTICATION_AUDIENCE= set SERVICECONTROL_AUDIT_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEAUDIENCE= ``` ```cmd rem ServiceControl.Monitoring - WITHOUT authentication set MONITORING_HTTPS_ENABLED=true set MONITORING_HTTPS_CERTIFICATEPATH=C:\path\to\cert\cert.pfx set MONITORING_HTTPS_CERTIFICATEPASSWORD=changeit set MONITORING_AUTHENTICATION_ENABLED= set MONITORING_AUTHENTICATION_AUTHORITY= set MONITORING_AUTHENTICATION_AUDIENCE= set MONITORING_AUTHENTICATION_REQUIREHTTPSMETADATA= set MONITORING_AUTHENTICATION_VALIDATEISSUER= set MONITORING_AUTHENTICATION_VALIDATEAUDIENCE= ``` ```cmd dotnet run ``` -------------------------------- ### Get Messages for Endpoint Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves messages for a specific endpoint. ```APIDOC ## GET /endpoints/{endpoint}/messages ### Description Retrieves messages for a specific endpoint. ### Method GET ### Endpoint /endpoints/{endpoint}/messages ### Parameters #### Path Parameters - **endpoint** (String) - Required - The name of the endpoint. #### Query Parameters - **pagingInfo** (PagingInfo) - Optional - Information for pagination. - **sortInfo** (SortInfo) - Optional - Information for sorting. - **includeSystemMessages** (Boolean) - Optional - Whether to include system messages. ``` -------------------------------- ### Get Endpoints Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a list of all endpoints monitored by ServiceControl. ```APIDOC ## GET /endpoints ### Description Retrieves a list of all endpoints monitored by ServiceControl. ### Method GET ### Endpoint /endpoints ``` -------------------------------- ### Configure Authentication for ServiceControl Instances Source: https://github.com/particular/servicecontrol/blob/master/docs/authentication-testing.md Set environment variables to enable authentication and define its parameters for ServiceControl, Audit, and Monitoring services. Restart the instance after applying these settings. ```cmd rem ServiceControl (Primary) set SERVICECONTROL_AUTHENTICATION_ENABLED=true set SERVICECONTROL_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/common/v2.0 set SERVICECONTROL_AUTHENTICATION_AUDIENCE=api://servicecontrol-test set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_CLIENTID=test-client-id set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_AUTHORITY=https://login.microsoftonline.com/common/v2.0 set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES=["api://servicecontrol-test/access_as_user"] set SERVICECONTROL_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUTHENTICATION_VALIDATEAUDIENCE= rem ServiceControl.Audit set SERVICECONTROL_AUDIT_AUTHENTICATION_ENABLED=true set SERVICECONTROL_AUDIT_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/common/v2.0 set SERVICECONTROL_AUDIT_AUTHENTICATION_AUDIENCE=api://servicecontrol-test set SERVICECONTROL_AUDIT_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEAUDIENCE= rem ServiceControl.Monitoring set MONITORING_AUTHENTICATION_ENABLED=true set MONITORING_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/common/v2.0 set MONITORING_AUTHENTICATION_AUDIENCE=api://servicecontrol-test set MONITORING_AUTHENTICATION_REQUIREHTTPSMETADATA= set MONITORING_AUTHENTICATION_VALIDATEISSUER= set MONITORING_AUTHENTICATION_VALIDATEAUDIENCE= dotnet run ``` -------------------------------- ### Get Custom Checks Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a list of custom checks. ```APIDOC ## GET /customchecks ### Description Retrieves a list of custom checks. ### Method GET ### Endpoint /customchecks ### Parameters #### Query Parameters - **pagingInfo** (PagingInfo) - Optional - Information for pagination. - **status** (String) - Optional - The status to filter custom checks by. ``` -------------------------------- ### Get Messages by Conversation Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves messages for a specific conversation. ```APIDOC ## GET /conversations/{conversationId:required:minlength(1)} ### Description Retrieves messages for a specific conversation. ### Method GET ### Endpoint /conversations/{conversationId:required:minlength(1)} ### Parameters #### Path Parameters - **conversationId** (String) - Required - The ID of the conversation. #### Query Parameters - **pagingInfo** (PagingInfo) - Optional - Information for pagination. - **sortInfo** (SortInfo) - Optional - Information for sorting. - **includeSystemMessages** (Boolean) - Optional - Whether to include system messages. ``` -------------------------------- ### Get Remote Configuration Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the remote configuration for ServiceControl. ```APIDOC ## GET /configuration/remotes ### Description Retrieves the remote configuration for ServiceControl. ### Method GET ### Endpoint /configuration/remotes ``` -------------------------------- ### Enable and Configure RavenDB Telemetry Source: https://github.com/particular/servicecontrol/blob/master/docs/telemetry.md Environment variables to enable RavenDB telemetry emission via gRPC to a local OTEL collector. Requires a RavenDB developer license. ```yaml environment: RAVEN_Monitoring_OpenTelemetry_Enabled: true RAVEN_Monitoring_OpenTelemetry_OpenTelemetryProtocol_Enabled: true RAVEN_Monitoring_OpenTelemetry_OpenTelemetryProtocol_Protocol: gRPC RAVEN_Monitoring_OpenTelemetry_OpenTelemetryProtocol_Endpoint: http://host.docker.internal:4317 ``` -------------------------------- ### Get Authentication Configuration Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the authentication configuration for ServiceControl. ```APIDOC ## GET /configuration ### Description Retrieves the authentication configuration for ServiceControl. ### Method GET ### Endpoint /configuration ``` -------------------------------- ### Generate Local Development SSL Certificates Source: https://github.com/particular/servicecontrol/blob/master/docs/reverseproxy-testing.md Generate trusted local development SSL certificates using mkcert for the specified hostnames. Ensure you are in the '.local\certs' directory before running the command. ```bash mkcert -install cd .local\certs mkcert -cert-file local-platform.pem -key-file local-platform-key.pem servicecontrol.localhost servicecontrol-audit.localhost servicecontrol-monitor.localhost localhost ``` -------------------------------- ### Get Masks Source: https://github.com/particular/servicecontrol/blob/master/src/Particular.LicensingComponent.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the masks used for throughput settings. ```APIDOC ## GET /settings/masks ### Description Retrieves the masks used for throughput settings. ### Method GET ### Endpoint /settings/masks ``` -------------------------------- ### Get Endpoint Throughput Source: https://github.com/particular/servicecontrol/blob/master/src/Particular.LicensingComponent.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves information about endpoint throughput. ```APIDOC ## GET /endpoints ### Description Retrieves information about endpoint throughput. ### Method GET ### Endpoint /endpoints ``` -------------------------------- ### Run Basic ServiceControl Audit Container Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.Audit/Container-README.md This command demonstrates the most basic way to create and run an audit container using Docker. It assumes a RabbitMQ message broker is also running in Docker with default credentials. Ensure the necessary environment variables for transport type, connection string, and RavenDB connection string are set. ```shell docker run -d --name audit -p 44444:44444 \ -e TRANSPORTTYPE=RabbitMQ.QuorumConventionalRouting \ -e CONNECTIONSTRING="host=rabbitmq" \ -e RAVENDB_CONNECTIONSTRING="http://audit-db:8080" \ particular/servicecontrol-audit:latest --setup-and-run ``` -------------------------------- ### Get Retry History Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the retry history for message recoverability. ```APIDOC ## GET /recoverability/history ### Description Retrieves the history of retry operations for message recoverability. ### Method GET ### Endpoint /recoverability/history ``` -------------------------------- ### HasInitialisationErrors Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.Transports.Tests/ApprovalFiles/APIApprovals.ServiceControlTransport.approved.txt Checks if the service has any initialization errors. ```APIDOC ## HasInitialisationErrors ### Description Checks if the service has any initialization errors. ### Method N/A (Method signature provided) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response - **bool** - True if there are initialization errors, false otherwise. - **string** - An error message if initialization errors exist. #### Response Example N/A ``` -------------------------------- ### Get Message Body Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the body of a specific message by its ID. ```APIDOC ## GET /messages/{id}/body ### Description Retrieves the body content of a specific message using its ID. ### Method GET ### Endpoint /messages/{id}/body ### Parameters #### Path Parameters - **id** (String) - Required - The ID of the message whose body to retrieve. #### Query Parameters - **instanceId** (String) - Optional - The ID of the ServiceControl instance. ``` -------------------------------- ### Get Messages Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a list of messages with support for pagination and sorting. ```APIDOC ## GET /messages ### Description Retrieves a list of messages, supporting pagination, sorting, and filtering system messages. ### Method GET ### Endpoint /messages ### Parameters #### Query Parameters - **pagingInfo** (PagingInfo) - Optional - Information for pagination. - **sortInfo** (SortInfo) - Optional - Information for sorting. - **includeSystemMessages** (Boolean) - Optional - Whether to include system messages. ``` -------------------------------- ### Authenticate to GitHub Container Registry Source: https://github.com/particular/servicecontrol/blob/master/docs/testing.md Use this command to log in to the GitHub Container Registry using your personal access token. You will be prompted for your username (email) and password (token). ```shell docker login ghcr.io ``` -------------------------------- ### Test Direct Access (No Proxy) with curl Source: https://github.com/particular/servicecontrol/blob/master/docs/forward-headers-testing.md Verify direct request handling without any forwarded headers. This simulates access when no reverse proxy is involved. Expected output shows unchanged request values. ```cmd rem ServiceControl (Primary) curl http://localhost:33333/debug/request-info | json rem ServiceControl.Audit curl http://localhost:44444/debug/request-info | json rem ServiceControl.Monitoring curl http://localhost:33633/debug/request-info | json ``` -------------------------------- ### Get Heartbeat Stats Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves statistics related to system heartbeats. ```APIDOC ## GET /heartbeats/stats ### Description Retrieves statistics about the system's heartbeats. ### Method GET ### Endpoint /heartbeats/stats ``` -------------------------------- ### Get Supported Operations for Endpoints Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the supported operations for endpoints. ```APIDOC ## OPTIONS /endpoints ### Description Retrieves the supported operations for endpoints. ### Method OPTIONS ### Endpoint /endpoints ``` -------------------------------- ### Test Multiple X-Forwarded Headers with Curl Source: https://github.com/particular/servicecontrol/blob/master/docs/forward-headers-testing.md Use these curl commands to test ServiceControl's handling of multiple X-Forwarded-Proto, X-Forwarded-Host, and X-Forwarded-For values. This simulates environments with multiple proxy servers. ```cmd rem ServiceControl (Primary) curl -H "X-Forwarded-Proto: https, http" -H "X-Forwarded-Host: example.com, internal.proxy.local" -H "X-Forwarded-For: 203.0.113.50, 10.0.0.1" http://localhost:33333/debug/request-info | json rem ServiceControl.Audit curl -H "X-Forwarded-Proto: https, http" -H "X-Forwarded-Host: example.com, internal.proxy.local" -H "X-Forwarded-For: 203.0.113.50, 10.0.0.1" http://localhost:44444/debug/request-info | json rem ServiceControl.Monitoring curl -H "X-Forwarded-Proto: https, http" -H "X-Forwarded-Host: example.com, internal.proxy.local" -H "X-Forwarded-For: 203.0.113.50, 10.0.0.1" http://localhost:33633/debug/request-info | json ``` -------------------------------- ### Get Throughput Settings Information Source: https://github.com/particular/servicecontrol/blob/master/src/Particular.LicensingComponent.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves information about throughput settings. ```APIDOC ## GET /settings/info ### Description Retrieves information about throughput settings. ### Method GET ### Endpoint /settings/info ``` -------------------------------- ### Test Partial Headers (Proto Only) with curl Source: https://github.com/particular/servicecontrol/blob/master/docs/forward-headers-testing.md Use these curl commands to test the independent processing of forwarded headers. Sending only X-Forwarded-Proto updates the scheme while host and remoteIpAddress remain unchanged. ```cmd rem ServiceControl (Primary) curl -H "X-Forwarded-Proto: https" http://localhost:33333/debug/request-info | json rem ServiceControl.Audit curl -H "X-Forwarded-Proto: https" http://localhost:44444/debug/request-info | json rem ServiceControl.Monitoring curl -H "X-Forwarded-Proto: https" http://localhost:33633/debug/request-info | json ``` -------------------------------- ### Get Throughput Report File Source: https://github.com/particular/servicecontrol/blob/master/src/Particular.LicensingComponent.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the throughput report file. ```APIDOC ## GET /report/file ### Description Retrieves the throughput report file. ### Method GET ### Endpoint /report/file ### Parameters #### Query Parameters - **spVersion** (String) - Required - The version of the service provider. ``` -------------------------------- ### Check Remote Instances Configuration Endpoint Source: https://github.com/particular/servicecontrol/blob/master/docs/authentication-testing.md Use this command to check the configuration endpoint of remote instances. It verifies that the `/api/configuration` endpoint is accessible and logs requests. ```bash curl --ssl-no-revoke -H "Authorization: Bearer %TOKEN%" https://localhost:33333/api/configuration/remotes | json ``` -------------------------------- ### Expected Output for Partial Headers (Proto Only) Source: https://github.com/particular/servicecontrol/blob/master/docs/forward-headers-testing.md This JSON output shows the result of sending only the X-Forwarded-Proto header. Only the 'scheme' is updated to 'https', while 'host' and 'remoteIpAddress' retain their default values. ```json { "processed": { "scheme": "https", "host": "localhost:33333", "remoteIpAddress": "::1" }, "rawHeaders": { "xForwardedFor": "", "xForwardedProto": "", "xForwardedHost": "" }, "configuration": { "enabled": true, "trustAllProxies": true, "knownProxies": [], "knownNetworks": [] } } ``` -------------------------------- ### Get Sagas Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves saga information by its ID, including pagination details. ```APIDOC ## GET /sagas/{id} ### Description Retrieves saga information by its ID. ### Method GET ### Endpoint /sagas/{id} ### Parameters #### Path Parameters - **id** (guid) - Required - The ID of the saga to retrieve. #### Query Parameters - **pagingInfo** (object) - Optional - Information for pagination. ``` -------------------------------- ### Configure ServiceControl for HTTPS Source: https://github.com/particular/servicecontrol/blob/master/docs/https-testing.md Set environment variables to enable HTTPS for ServiceControl, ServiceControl.Audit, and ServiceControl.Monitoring. This includes specifying certificate paths, passwords, and other HTTPS-related settings. ```cmd rem ServiceControl (Primary) set SERVICECONTROL_HTTPS_ENABLED=true set SERVICECONTROL_HTTPS_CERTIFICATEPATH=C:\path\to\ServiceControl\.local\certs\localhost.pfx set SERVICECONTROL_HTTPS_CERTIFICATEPASSWORD=changeit set SERVICECONTROL_HTTPS_REDIRECTHTTPTOHTTPS= set SERVICECONTROL_HTTPS_PORT= set SERVICECONTROL_HTTPS_ENABLEHSTS= set SERVICECONTROL_FORWARDEDHEADERS_ENABLED=false set SERVICECONTROL_REMOTEINSTANCES=[{"api_uri":"https://localhost:44444"}] rem ServiceControl.Audit set SERVICECONTROL_AUDIT_HTTPS_ENABLED=true set SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPATH=C:\path\to\ServiceControl\.local\certs\localhost.pfx set SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPASSWORD=changeit set SERVICECONTROL_AUDIT_HTTPS_REDIRECTHTTPTOHTTPS= set SERVICECONTROL_AUDIT_HTTPS_PORT= set SERVICECONTROL_AUDIT_HTTPS_ENABLEHSTS= set SERVICECONTROL_AUDIT_FORWARDEDHEADERS_ENABLED=false rem ServiceControl.Monitoring set MONITORING_HTTPS_ENABLED=true set MONITORING_HTTPS_CERTIFICATEPATH=C:\path\to\ServiceControl\.local\certs\localhost.pfx set MONITORING_HTTPS_CERTIFICATEPASSWORD=changeit set MONITORING_HTTPS_REDIRECTHTTPTOHTTPS= set MONITORING_HTTPS_PORT= set MONITORING_HTTPS_ENABLEHSTS= set MONITORING_FORWARDEDHEADERS_ENABLED=false dotnet run ``` -------------------------------- ### Get Failure Groups Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves all failure groups, optionally filtered by a classifier. ```APIDOC ## GET /recoverability/groups/{classifier?} ### Description Retrieves all failure groups, with an option to filter by a specific classifier. ### Method GET ### Endpoint /recoverability/groups/{classifier?} ### Parameters #### Path Parameters - **classifier** (String) - Optional - The classifier to filter failure groups by. #### Query Parameters - **classifierFilter** (String) - Optional - An additional filter for classifiers. ``` -------------------------------- ### Get Supported Classifiers Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a list of supported classifiers for message recoverability. ```APIDOC ## GET /recoverability/classifiers ### Description Retrieves a list of supported classifiers that can be used for message recoverability. ### Method GET ### Endpoint /recoverability/classifiers ``` -------------------------------- ### Test Basic HTTPS Connectivity with curl Source: https://github.com/particular/servicecontrol/blob/master/docs/https-testing.md Verify that HTTPS is functioning correctly by sending requests to ServiceControl, ServiceControl.Audit, and ServiceControl.Monitoring using curl. The `--ssl-no-revoke` flag is necessary on Windows for mkcert certificates. ```cmd rem ServiceControl (Primary) curl --ssl-no-revoke -v https://localhost:33333/api 2>&1 | findstr /C:"HTTP/" /C:"SSL" rem ServiceControl.Audit curl --ssl-no-revoke -v https://localhost:44444/api 2>&1 | findstr /C:"HTTP/" /C:"SSL" rem ServiceControl.Monitoring curl --ssl-no-revoke -v https://localhost:33633/ 2>&1 | findstr /C:"HTTP/" /C:"SSL" ``` -------------------------------- ### Get Email Notifications Settings Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves the current email notification settings. ```APIDOC ## GET /notifications/email ### Description Retrieves the current configuration for email notifications. ### Method GET ### Endpoint /notifications/email ``` -------------------------------- ### Enable Debug Logs for ServiceControl Instances Source: https://github.com/particular/servicecontrol/blob/master/docs/https-testing.md Set the LogLevel environment variable to 'Debug' to enable detailed logging for troubleshooting HTTPS configuration and certificate loading. ```cmd rem ServiceControl Primary set SERVICECONTROL_LOGLEVEL=Debug rem ServiceControl.Audit set SERVICECONTROL_AUDIT_LOGLEVEL=Debug rem ServiceControl.Monitoring set MONITORING_LOGLEVEL=Debug ``` -------------------------------- ### Create New ServiceControl Instance Source: https://github.com/particular/servicecontrol/blob/master/README.md This PowerShell command creates a new ServiceControl instance with specified configuration parameters. Adjust paths, ports, and connection strings as needed for your environment. ```powershell $serviceControlInstance = New-ServiceControlInstance ` -Name 'Test.DEV.ServiceControl' ` -InstallPath C:\ServiceControl\Bin ` -DBPath C:\ServiceControl\DB ` -LogPath C:\ServiceControl\Logs ` -Port 44334 ` -DatabaseMaintenancePort 44335 ` -Transport 'RabbitMQ - Direct routing topology (quorum queues)' ` -ConnectionString 'host=localhost;username=guest;password=guest' ` -ErrorQueue errormq ` -ErrorRetentionPeriod 10:00:00:00 ` -Acknowledgements RabbitMQBrokerVersion310 ``` -------------------------------- ### Configure ServiceControl Instances Source: https://github.com/particular/servicecontrol/blob/master/docs/authentication-testing.md This script sets environment variables to configure ServiceControl instances, including authentication settings for primary, audit, and monitoring services. It's used to test scatter-gather with mismatched authentication configurations. ```batch rem ServiceControl (Primary) set SERVICECONTROL_HTTPS_ENABLED=true set SERVICECONTROL_HTTPS_CERTIFICATEPATH=C:\path\to\cert\cert.pfx set SERVICECONTROL_HTTPS_CERTIFICATEPASSWORD=changeit set SERVICECONTROL_AUTHENTICATION_ENABLED=true set SERVICECONTROL_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/{tenantId} set SERVICECONTROL_AUTHENTICATION_AUDIENCE=api://{servicecontrol-audience} set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_CLIENTID={servicepulse-clientid} set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_AUTHORITY=https://login.microsoftonline.com/{tenantId}/v2.0 set SERVICECONTROL_AUTHENTICATION_SERVICEPULSE_APISCOPES=["api://{servicecontrol-audience}/access_as_user"] set SERVICECONTROL_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUTHENTICATION_VALIDATEAUDIENCE= set SERVICECONTROL_REMOTEINSTANCES=[{"api_uri":"https://localhost:44444"}] rem ServiceControl.Audit (DIFFERENT audience) set SERVICECONTROL_AUDIT_HTTPS_ENABLED=true set SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPATH=C:\path\to\cert\cert.pfx set SERVICECONTROL_AUDIT_HTTPS_CERTIFICATEPASSWORD=changeit set SERVICECONTROL_AUDIT_AUTHENTICATION_ENABLED=true set SERVICECONTROL_AUDIT_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/{tenantId} set SERVICECONTROL_AUDIT_AUTHENTICATION_AUDIENCE=api://servicecontrol-audit-different set SERVICECONTROL_AUDIT_AUTHENTICATION_REQUIREHTTPSMETADATA= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEISSUER= set SERVICECONTROL_AUDIT_AUTHENTICATION_VALIDATEAUDIENCE= rem ServiceControl.Monitoring set MONITORING_HTTPS_ENABLED=true set MONITORING_HTTPS_CERTIFICATEPATH=C:\path\to\cert\cert.pfx set MONITORING_HTTPS_CERTIFICATEPASSWORD=changeit set MONITORING_AUTHENTICATION_ENABLED=true set MONITORING_AUTHENTICATION_AUTHORITY=https://login.microsoftonline.com/{tenantId} set MONITORING_AUTHENTICATION_AUDIENCE=api://{servicecontrol-audience} set MONITORING_AUTHENTICATION_REQUIREHTTPSMETADATA= set MONITORING_AUTHENTICATION_VALIDATEISSUER= set MONITORING_AUTHENTICATION_VALIDATEAUDIENCE= dotnet run ``` -------------------------------- ### Get Queue Addresses Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a list of queue addresses, supporting pagination. ```APIDOC ## GET /errors/queues/addresses ### Description Retrieves a list of queue addresses with support for pagination. ### Method GET ### Endpoint /errors/queues/addresses ### Parameters #### Query Parameters - **pagingInfo** (PagingInfo) - Optional - Information for pagination. ``` -------------------------------- ### Get Failed Message by ID Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves a specific failed message by its ID. ```APIDOC ## GET /errors/{failedMessageId:required:minlength(1)} ### Description Retrieves a specific failed message by its ID. ### Method GET ### Endpoint /errors/{failedMessageId:required:minlength(1)} ### Parameters #### Path Parameters - **failedMessageId** (String) - Required - The ID of the failed message. ``` -------------------------------- ### Get Errors by Endpoint Name Source: https://github.com/particular/servicecontrol/blob/master/src/ServiceControl.UnitTests/ApprovalFiles/APIApprovals.HttpApiRoutes.approved.txt Retrieves errors for a specific endpoint name. ```APIDOC ## GET /endpoints/{endpointname}/errors ### Description Retrieves errors for a specific endpoint name. ### Method GET ### Endpoint /endpoints/{endpointname}/errors ### Parameters #### Path Parameters - **endpointName** (String) - Required - The name of the endpoint. #### Query Parameters - **pagingInfo** (PagingInfo) - Optional - Information for pagination. - **sortInfo** (SortInfo) - Optional - Information for sorting. - **status** (String) - Optional - The status to filter errors by. - **modified** (String) - Optional - The modification date to filter by. ``` -------------------------------- ### Test Platform Connection Endpoint Source: https://github.com/particular/servicecontrol/blob/master/docs/authentication-testing.md This command tests the platform connection endpoint on remote instances, which requires authentication. It ensures that connection details are aggregated correctly. ```bash curl --ssl-no-revoke -H "Authorization: Bearer %TOKEN%" https://localhost:33333/api/connection | json ```