tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
Routes.cs
Go to the documentation of this file.
1using System;
2
4{
8 public static class Routes
9 {
13 public const string ApiRoot = "/api/";
14
18 public const string GraphQL = ApiRoot + "graphql";
19
23 public const string HubsRoot = ApiRoot + "hubs";
24
28 public const string Administration = ApiRoot + "Administration";
29
33 public const string Logs = Administration + "/Logs";
34
38 public const string User = ApiRoot + "User";
39
43 public const string UserGroup = ApiRoot + "UserGroup";
44
48 public const string InstanceManager = ApiRoot + "Instance";
49
53 public const string Engine = ApiRoot + "Engine";
54
58 public const string Repository = ApiRoot + "Repository";
59
63 public const string DreamDaemon = ApiRoot + "DreamDaemon";
64
68 public const string Diagnostics = DreamDaemon + "/Diagnostics";
69
73 public const string Configuration = ApiRoot + "Config";
74
78 public const string File = "File";
79
83 public const string ConfigurationFile = Configuration + "/" + File;
84
88 public const string InstancePermissionSet = ApiRoot + "InstancePermissionSet";
89
93 public const string Chat = ApiRoot + "Chat";
94
98 public const string DreamMaker = ApiRoot + "DreamMaker";
99
103 public const string Jobs = ApiRoot + "Job";
104
108 public const string Transfer = ApiRoot + "Transfer";
109
113 public const string List = "List";
114
118 public const string JobsHub = HubsRoot + "/jobs";
119
126 public static string SetID(string route, long id) => $"{route}/{id}";
127
133 public static string ListRoute(string route) => $"{route}/{List}";
134
140 public static string SanitizeGetPath(string path)
141 {
142 path ??= String.Empty;
143 if (path.Length == 0 || path[0] != '/')
144 path = '/' + path;
145 return path;
146 }
147 }
148}
Routes to a server actions.
Definition Routes.cs:9
static string SetID(string route, long id)
Apply an id postfix to a route .
const string User
The user controller.
Definition Routes.cs:38
const string InstanceManager
The Models.Instance controller.
Definition Routes.cs:48
const string Administration
The server administration controller.
Definition Routes.cs:28
static string ListRoute(string route)
Get the /List postfix for a route .
static string SanitizeGetPath(string path)
Sanitize a Models.Response.FileTicketResponse path for use in a GET Uri.
Definition Routes.cs:140
const string DreamDaemon
The DreamDaemon controller.
Definition Routes.cs:63
const string GraphQL
The GraphQL route.
Definition Routes.cs:18
const string Diagnostics
For accessing DD diagnostics.
Definition Routes.cs:68
const string HubsRoot
The root route of all hubs.
Definition Routes.cs:23
const string UserGroup
The user group controller.
Definition Routes.cs:43
const string List
The postfix for list operations.
Definition Routes.cs:113
const string Chat
The chat bot controller.
Definition Routes.cs:93
const string File
To be paired with Configuration for accessing Models.IConfigurationFiles.
Definition Routes.cs:78
const string Repository
The git repository controller.
Definition Routes.cs:58
const string Jobs
The jobs controller.
Definition Routes.cs:103
const string Configuration
The configuration controller.
Definition Routes.cs:73
const string ApiRoot
The root of API methods.
Definition Routes.cs:13
const string JobsHub
The root route of all hubs.
Definition Routes.cs:118
const string ConfigurationFile
Full combination of Configuration and File.
Definition Routes.cs:83
const string Transfer
The transfer controller.
Definition Routes.cs:108
const string Engine
The engine controller.
Definition Routes.cs:53
const string DreamMaker
The deployment controller.
Definition Routes.cs:98
const string InstancePermissionSet
The instance permission set controller.
Definition Routes.cs:88
const string Logs
The endpoint to download server logs.
Definition Routes.cs:33