84 authenticationContext,
135 if (
model.NewVersion ==
null)
138 AdditionalData =
"newVersion is required!",
156#pragma warning disable API1001
160#pragma warning restore API1001
200 .OrderByDescending(
x =>
x.Name));
207 AdditionalData = ex.ToString(),
Represents a request to update TGS.
Represents administrative server information.
Represents an error message returned by the server.
Represents a server log file.
Represents a paginated set of models.
A response to a Request.ServerUpdateRequest.
Routes to a server actions.
const string Administration
The server administration controller.
const string Logs
The endpoint to download server logs.
ApiController for TGS administration purposes.
AdministrationController(IDatabaseContext databaseContext, IAuthenticationContext authenticationContext, IApiHeadersProvider apiHeadersProvider, ILogger< AdministrationController > logger, IRestAuthorityInvoker< IAdministrationAuthority > administrationAuthority, IAssemblyInformationProvider assemblyInformationProvider, IIOManager ioManager, IPlatformIdentifier platformIdentifier, IOptions< FileLoggingConfiguration > fileLoggingConfigurationOptions)
Initializes a new instance of the AdministrationController class.
readonly IRestAuthorityInvoker< IAdministrationAuthority > administrationAuthority
The IRestAuthorityInvoker<TAuthority> for the IAdministrationAuthority.
ValueTask< IActionResult > Read([FromQuery] bool? fresh, CancellationToken cancellationToken)
Get AdministrationResponse server information.
ValueTask< IActionResult > ListLogs([FromQuery] int? page, [FromQuery] int? pageSize, CancellationToken cancellationToken)
List LogFileResponses present.
ValueTask< IActionResult > AdministrationResponse(this, authority=> authority.GetUpdateInformation(fresh ?? false, cancellationToken))
readonly IAssemblyInformationProvider assemblyInformationProvider
The IAssemblyInformationProvider for the AdministrationController.
ValueTask< IActionResult > LogFileResponse(this, authority=> authority.GetLog(path, cancellationToken))
ValueTask< IActionResult > Delete()
Attempts to restart the server.
async ValueTask< IActionResult > Update([FromBody] ServerUpdateRequest model, CancellationToken cancellationToken)
Attempt to perform a server upgrade.
ValueTask< IActionResult > GetLog(string path, CancellationToken cancellationToken)
Download a LogFileResponse.
readonly IOptions< FileLoggingConfiguration > fileLoggingConfigurationOptions
The IOptions<TOptions> FileLoggingConfiguration for the AdministrationController.
readonly IPlatformIdentifier platformIdentifier
The IPlatformIdentifier for the AdministrationController.
readonly IIOManager ioManager
The IIOManager for the AdministrationController.
Base Controller for API functions.
Invokes TAuthority methods and generates IActionResult responses.
ValueTask< IActionResult > Invoke(ApiController controller, Func< TAuthority, RequirementsGated< AuthorityResponse > > authorityInvoker)
Invoke a TAuthority method with no success result.
Interface for using filesystems.
Task< IReadOnlyList< string > > GetFiles(string path, CancellationToken cancellationToken)
Returns full file names in a given path .
string GetFileName(string path)
Gets the file name portion of a path .
string ConcatPath(params string[] paths)
Combines an array of strings into a path.
For creating and accessing authentication contexts.
ErrorCode
Types of Response.ErrorMessageResponses that the API may return.
@ List
User may list files if the Models.Instance allows it.
AdministrationRights
Administration rights for the server.