Mapscale API Appsettings
Below is the documentation for the appsettings.json
configuration file in Mapscale.API
. This documentation explains each section of the file, guiding you to understand and manage the application settings effectively.
Overview
The appsettings.json
file specifies configuration settings for an ASP.NET Core application. It includes application-specific settings, such as connection strings, scheduler jobs, Azure configurations, and other application settings.
1. ConnectionStrings
{
"ConnectionStrings": {
"DefaultConnection": "{Your connection string comes here}"
}
}
Docker-compose form of environment variables.
environment:
ConnectionStrings__DefaultConnection:"{Your connection string comes here}"
- DefaultConnection: This signifies the database connection string, which is used to connect to your database.
2. Parameters
{
"Parameters": {
"DashboardUrl": "{Your dashboard url comes here}"
}
}
Docker-compose form of environment variables.
environment:
Parameters__DashboardUrl:"{Your dashboard url comes here}"
- DashboardUrl: The URL for the dashboard, which is used to access the mapscale's dashboard interface.
3. Environment
{
"Environment": "Development"
}
Docker-compose form of environment variables.
environment:
Environment:"{Your environment variable comes here}"
- Environment: This specifies the environment in which the application is running, such as
Development
,Test
, orProduction
.
4. ScheduledJobSettings
{
"ScheduledJobSettings": {
"FloorPlanJobStatusCheckIntervalInMinutes": 1,
"FloorPlanJobReSendIntervalInMinutes": 1,
"ReSendDelayMinutes": 1,
"ReSendMaxTryCount": 5,
"WebhookSchedulerMinutes": 1,
"WebhookAlertMailSchedulerMinutes": 30
}
}
Docker-compose form of environment variables.
environment:
ScheduledJobSettings__FloorPlanJobStatusCheckIntervalInMinutes:"1"
ScheduledJobSettings__FloorPlanJobReSendIntervalInMinutes:"1"
ScheduledJobSettings__ReSendDelayMinutes:"1"
ScheduledJobSettings__ReSendMaxTryCount:"5"
ScheduledJobSettings__WebhookSchedulerMinutes:"1"
ScheduledJobSettings__WebhookAlertMailSchedulerMinutes:"30"
- FloorPlanJobStatusCheckIntervalInMinutes: Specifies the interval in minutes for checking the status of floor plan jobs.
- FloorPlanJobReSendIntervalInMinutes: This setting indicates the interval in minutes for resending floor plan jobs.
- ReSendDelayMinutes: This setting indicates the delay in minutes before resending a job.
- ReSendMaxTryCount: This setting indicates the maximum number of attempts to resend a job.
- WebhookSchedulerMinutes: This setting indicates the interval in minutes for scheduling webhooks.
- WebhookAlertMailSchedulerMinutes: This setting indicates the interval in minutes for sending alert emails via webhooks.
5. AzureBlobConfiguration
{
"AzureBlobConfiguration": {
"MapscaleCadsFolder": "mapscale-cads",
"MapscaleResultsFolder": "mapscale-results"
}
}
Docker-compose form of environment variables.
environment:
AzureBlobConfiguration__MapscaleCadsFolder: "{Your Mapscale Cads Container here}"
AzureBlobConfiguration__MapscaleResultsFolder: "{Your Mapscale Results Container here}"
- MapscaleCadsFolder: The name of the Azure Blob Storage container for storing CAD files.
- MapscaleResultsFolder: The name of the Azure Blob Storage container for storing results.
6. PointrCloudConfigurations
{
"PointrCloudConfigurations": {
"SiteCheckUri": "api/v9/content/draft/clients/{0}/sites/{1}",
"BuildingCheckUri": "api/v9/content/draft/clients/{0}/sites/{1}/buildings/{2}",
"LevelCheckUri": "api/v9/content/draft/clients/{0}/sites/{1}/buildings/{2}/levels/{3}",
"TokenUri": "api/v9/identity/clients/{0}/auth/token",
"LevelMapObjectUri": "api/v9/content/draft/clients/{0}/sites/{1}/buildings/{2}/levels/{3}/map-objects",
"ValidateTokenUri": "api/v9/identity/validate/token"
}
}
Docker-compose form of environment variables.
environment:
PointrCloudConfigurations__SiteCheckUri: "api/v9/content/draft/clients/{0}/sites/{1}"
PointrCloudConfigurations__BuildingCheckUri: "api/v9/content/draft/clients/{0}/sites/{1}/buildings/{2}"
PointrCloudConfigurations__LevelCheckUri: "api/v9/content/draft/clients/{0}/sites/{1}/buildings/{2}/levels/{3}"
PointrCloudConfigurations__TokenUri: "api/v9/identity/clients/{0}/auth/token"
PointrCloudConfigurations__LevelMapObjectUri: "api/v9/content/draft/clients/{0}/sites/{1}/buildings/{2}/levels/{3}/map-objects"
PointrCloudConfigurations__ValidateTokenUri: "api/v9/identity/validate/token"
- SiteCheckUri: URI template to check site information.
- BuildingCheckUri: URI template to check building information.
- LevelCheckUri: URI template to check level information.
- TokenUri: URI template to obtain a token for authentication.
- LevelMapObjectUri: URI template to check level map objects.
- ValidateTokenUri: URI template to validate a token.
7. MCSConfigurations
{
"MCSConfigurations": {
"HealthCheckUri": "api/v9/health/",
"CreateJobUri": "api/v9/mapscale/tasks/",
"JobStatusUri": "api/v9/mapscale/tasks",
"TokenValidityUri": "api/v9/mapscale/",
"DeleteJobUri": "api/v9/mapscale/tasks",
"Token": "{Your MCS Token here}"
}
}
Docker-compose form of environment variables.
environment:
MCSConfigurations__HealthCheckUri: "api/v9/health/"
MCSConfigurations__CreateJobUri: "api/v9/mapscale/tasks/"
MCSConfigurations__JobStatusUri: "api/v9/mapscale/tasks"
MCSConfigurations__TokenValidityUri: "api/v9/mapscale/"
MCSConfigurations__DeleteJobUri: "api/v9/mapscale/tasks"
MCSConfigurations__Token: "{Your MCS Token here}"
- HealthCheckUri: URI template to check the health of the MCS service.
- CreateJobUri: URI template to create a new job in MCS.
- JobStatusUri: URI template to check the status of a job in MCS.
- TokenValidityUri: URI template to check the validity of a token.
- DeleteJobUri: URI template to delete a job in MCS.
- Token: The token used for authentication with MCS.
8. JwtOptions
{
"JwtOptions": {
"JwtKey": "{Your JWT Secret Key here}",
"JwtIssuer": "MapScaleAPI",
"JwtAudience": "MapScaleAPI",
"JwtExpireMinutes": 60
}
}
Docker-compose form of environment variables.
environment:
JwtOptions__JwtKey: "{Your JWT Secret Key here}"
JwtOptions__JwtIssuer: "{Your JWT Issuer here}"
JwtOptions__JwtAudience: "{Your JWT Audience here}"
JwtOptions__JwtExpireMinutes: "{Your JWT Expire Minutes here}"
- JwtKey: The secret key used for signing JWT tokens. This should be kept secure and not shared publicly.
- JwtIssuer: The issuer of the JWT token, typically the name of your application or service.
- JwtAudience: The intended audience for the JWT token, usually the name of your application or service.
- JwtExpireMinutes: The expiration time for the JWT token in minutes. After this time, the token will no longer be valid.
9. FileOperationOption
{
"FileOperationOption": {
"TempFolder": "TempFiles",
"PathToUpload": "{0}/{1}/input"
}
}
Docker-compose form of environment variables.
environment:
FileOperationOption__TempFolder: "{Your TempFolder here}"
FileOperationOption__PathToUpload: "{Your Path To Upload here}"
- TempFolder: The folder where temporary files are stored. This should be a path that is writable by the application.
- PathToUpload: The path where files are uploaded in blob.
10. MailConfigurations
{
"MailConfigurations": {
"ApiKey": "{Your Email Provider API Key here}",
"MailAddressesToSend": "mapping@pointr.tech",
"FromAddress": "no-reply@pointr.tech",
"FromDisplayName": "Pointr"
}
}
Docker-compose form of environment variables.
environment:
MailConfigurations__ApiKey: "{Your Email Provider API Key here}"
MailConfigurations__MailAddressesToSend: "{Your Email Address To Send here}"
MailConfigurations__FromAddress: "{Your From Address here}"
MailConfigurations__FromDisplayName: "{Your From Display Name here}"
- ApiKey: The API key for the email provider. This should be kept secure and not shared publicly.
- MailAddressesToSend: The email address to which notifications are sent. This should be a valid email address.
- FromAddress: The email address from which notifications are sent. This should be a valid email address.
- FromDisplayName: The display name for the sender of the email. This is the name that will appear in the "From" field of the email.
11. SlackConfigurations
{
"SlackConfigurations": {
"NotificationWorkFlow": "{Your Workflow Address here}",
"HealthCheckWorkFlow": "{Your Health Check Address here}",
"NotificationEnabled": false
}
}
Docker-compose form of environment variables.
environment:
SlackConfigurations__NotificationWorkFlow: "{Your Workflow Address here}"
SlackConfigurations__HealthCheckWorkFlow: "{Your Health Check Address here}"
SlackConfigurations__NotificationEnabled: "false"
- NotificationWorkFlow: The URL for the Slack notification workflow. This should be a valid URL.
- HealthCheckWorkFlow: The URL for the Slack health check workflow. This should be a valid URL.
- NotificationEnabled: A boolean value indicating whether Slack notifications are enabled. Set to
true
to enable notifications, orfalse
to disable them.
12. JiraConfigurations
{
"JiraConfigurations": {
"Url": "{Your Jira URL here}",
"Username": "{Your Jira Username here}",
"Password": "{Your Jira Password here}",
"ProjectName": "{Your Jira Project Name here}",
"Priority": "{Your Jira Priority here}",
"NotificationEnabled": false
}
}
Docker-compose form of environment variables.
environment:
JiraConfigurations__Url: "{Your Jira URL here}"
JiraConfigurations__Username: "{Your Jira Username here}"
JiraConfigurations__Password: "{Your Jira Password here}"
JiraConfigurations__ProjectName: "{Your Jira Project Name here}"
JiraConfigurations__Priority: "{Your Jira Priority here}"
JiraConfigurations__NotificationEnabled: "false"
- Url: The URL for the Jira instance. This should be a valid URL.
- Username: The username for the Jira account. This should be a valid username.
- Password : The password for the Jira account. This should be kept secure and not shared publicly.
- ProjectName : The name of the Jira project where issues will be created. This should be a valid project name.
- Priority: The priority level for the Jira issues. This should be a valid priority level as defined in your Jira instance.
- NotificationEnabled: A boolean value indicating whether Jira notifications are enabled. Set to
true
to enable notifications, orfalse
to disable them.
13. FileOperationOption
{
"WebhookSettings": {
"MailSendingThreshold": 25
}
}
Docker-compose form of environment variables.
environment:
WebhookSettings__MailSendingThreshold: "{Your Mail Sending Threshold here}"
- MailSendingThreshold: The threshold for sending emails via webhooks. This is the number of events that must occur before an email is sent. This should be a positive integer.
14. Serilog
{
"Serilog": {
"Using": [ "Serilog.Sinks.Console" ],
"MinimumLevel": {
"Default": "Information",
"Override": {
"Microsoft": "Information",
"System": "Information",
"Microsoft.EntityFrameworkCore.Database.Command": "Warning",
"Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor": "Warning"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console",
"outputTemplate": "[{Level} {@Timestamp:yyyy-MM-dd HH:mm:ss}] [Message: {Message} {Exception}]{NewLine}"
}
},
{
"Name": "CustomFile",
"Args": {
"path": "logs/log-.txt"
}
}
],
"Enrich": ["FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId"],
"Destructure": [
{
"Name": "ToMaximumDepth",
"Args": { "maximumDestructuringDepth": 20 }
},
{
"Name": "ToMaximumStringLength",
"Args": { "maximumStringLength": 5000 }
},
{
"Name": "ToMaximumCollectionCount",
"Args": { "maximumCollectionCount": 20 }
}
],
"Properties": {
"Application": "Pointr.Microservice.Mapscale.API"
}
}
}
Docker-compose form of environment variables.
environment:
Serilog__Using__0: "Serilog.Sinks.Console"
Serilog__MinimumLevel__Default: "Information"
Serilog__MinimumLevel__Override__Microsoft: "Information"
Serilog__MinimumLevel__Override__System: "Information"
Serilog__MinimumLevel__Override__Microsoft.EntityFrameworkCore.Database.Command: "Warning"
Serilog__MinimumLevel__Override__Microsoft.AspNetCore.Mvc.Infrastructure.ObjectResultExecutor: "Warning"
Serilog__WriteTo__0__Name: "Console"
Serilog__WriteTo__0__Args__theme: "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console"
Serilog__WriteTo__0__Args__outputTemplate: "[{Level} {@Timestamp:yyyy-MM-dd HH:mm:ss}] [Message: {Message} {Exception}]{NewLine}"
Serilog__WriteTo__1__Name: "CustomFile"
Serilog__WriteTo__1__Args__path: "logs/log-.txt"
Serilog__Enrich__0: "FromLogContext"
Serilog__Enrich__1: "WithMachineName"
Serilog__Enrich__2: "WithProcessId"
Serilog__Enrich__3: "WithThreadId"
Serilog__Destructure__0__Name: "ToMaximumDepth"
Serilog__Destructure__0__Args__maximumDestructuringDepth: "20"
Serilog__Destructure__1__Name: "ToMaximumStringLength"
Serilog__Destructure__1__Args__maximumStringLength: "5000"
Serilog__Destructure__2__Name: "ToMaximumCollectionCount"
Serilog__Destructure__2__Args__maximumCollectionCount: "20"
Serilog__Properties__Application: "Pointr.Microservice.Mapscale.API"
- Using: Specifies the Serilog sinks in use, such as
"Serilog.Sinks.Console"
for console logging. - MinimumLevel: Sets the minimum logging level to
Warning
, with specific overrides available for Microsoft and System namespaces. - WriteTo: Defines where log output is sent, using a compact JSON formatter for console output.
- Enrich: Add contextual data to logs, such as machine name and process ID.
- Destructure: Configures destructuring with limits on depth, string length, and collection count to manage log size and detail.
- Properties: Additional properties to include in every log, like specifying the application name.
Notes:
This documentation is designed to make the configuration more comprehensible and guide you in making necessary adjustments where needed. It includes explanations of what each setting is for and important considerations when making changes.