### GetInstallationComponentStatus(IEnumerable, Func) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.InstallationManager.html Gets the installation status for a specified collection of installation components. ```APIDOC ## GetInstallationComponentStatus(IEnumerable, Func) ### Description Gets the installation status for a specified collection of installation components. ### Method GetInstallationComponentStatus ### Signature public InstallationComponentStatus GetInstallationComponentStatus(IEnumerable installBatch, Func installedBatchFilter) ### Parameters - **installBatch** (IEnumerable) - Required - Installation components to check - **installedBatchFilter** (Func) - Required - Optional filter function for installed components stored in the database (see remarks for details) ### Returns InstallationComponentStatus - Installation status for a specified collection of installation components ### Remarks `installedBatchFilter` can be null if all installed components stored in the database should be taken into account. ``` -------------------------------- ### apm install output Source: https://docs.timecockpit.com/doc/mcp/companion-skills.html Example output from apm install. Shows the resolved version and commit SHA, the package type, the deployed skills, and the MCP server configuration written to .mcp.json and .codex/config.toml. Note that MCP config for copilot and cursor is skipped when active targets are claude and codex. ```text Resolving software-architects/timecockpit-agents ... v0.1.7 (cf12563) Package type: skill_bundle · 7 skills · 1 MCP server declaration ✔ Installed to apm_modules/software-architects/timecockpit-agents ✔ Deployed 7 skills → .claude/skills/, .agents/skills/ timecockpit-mcp-setup, timecockpit-time-tracking, timecockpit-reporting, timecockpit-tcql, timecockpit-model-discovery, timecockpit-record-management, timecockpit-lists-and-actions ✔ MCP server 'timecockpit' (https://mcp.timecockpit.com) written to .mcp.json, .codex/config.toml [i] Skipped MCP config for copilot, cursor (active targets: claude, codex) ✔ Updated apm.yml and apm.lock.yaml · added apm_modules/ to .gitignore ``` -------------------------------- ### Install timecockpit-agents with apm install Source: https://docs.timecockpit.com/doc/mcp/companion-skills.html Install the timecockpit-agents skill bundle via APM. Use the full Git URL or the GitHub short form; optionally pin a version with #v0.1.7 or install a single skill by path. Running apm install without arguments installs everything from apm.yml, e.g. after cloning. ```bash apm install https://github.com/software-architects/timecockpit-agents # equivalent: short form, pin a version, single skill: apm install software-architects/timecockpit-agents apm install software-architects/timecockpit-agents#v0.1.7 apm install software-architects/timecockpit-agents/skills/timecockpit-mcp-setup # without argument: install everything from apm.yml (e.g. after cloning): apm install ``` -------------------------------- ### GetMissingComponents(IEnumerable, Nullable) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.InstallationManager.html Gets a list of missing installation components from a given batch, optionally limited by a batch GUID. ```APIDOC ## GetMissingComponents(IEnumerable, Nullable) ### Description Gets a list of missing installation components from the provided install batch. Components that have already been installed on the client database are excluded. ### Method GetMissingComponents ### Signature public IEnumerable GetMissingComponents(IEnumerable installBatch, Guid? guidOfLastBatchToBeChecked) ### Parameters - **installBatch** (IEnumerable) - Required - List of installation components for which to check if they have already been installed on the client db. - **guidOfLastBatchToBeChecked** (Nullable) - Required - Guid of the last batch that should be returned. See remarks for details. ### Returns IEnumerable - Those components from `installBatch` that have not already been installed on the client db. ### Remarks If `guidOfLastBatchToBeChecked` is null all batches in `installBatch` are returned. ``` -------------------------------- ### Install Codex CLI and sign in Source: https://docs.timecockpit.com/doc/mcp/codex.html Installs the Codex CLI globally via npm, checks the version, and signs in to your ChatGPT account. Note: this sign-in is separate from the MCP sign-in. ```bash npm install -g @openai/codex codex --version codex login ``` -------------------------------- ### MethodName Property Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Install.CompiledInstallationComponent.html Gets or sets the name of the method of the installation component. ```APIDOC ## MethodName Property ### Description Gets or sets the name of the method of the installation component. ### Property Signature ```csharp public string MethodName { get; set; } ``` ### Property Value - **String** - The name of the method. ``` -------------------------------- ### Install APM CLI Source: https://docs.timecockpit.com/doc/mcp/companion-skills.html Install the APM CLI on Windows, macOS, or Linux. The first command is for Windows PowerShell, the second is an alternative using winget, the third is for macOS, the fourth for Linux, and the fifth is a cross-platform Python install (requires Python >= 3.10). Verify the installation with `apm --version`. ```powershell irm https://aka.ms/apm-windows | iex # Windows (PowerShell) winget install --id Microsoft.APM --exact --source winget # alternative brew install apm # macOS curl -sSL https://aka.ms/apm-unix | sh # Linux python3 -m pip install apm-cli # cross-platform (Python >= 3.10) apm --version ``` -------------------------------- ### Set usage examples Source: https://docs.timecockpit.com/api/TimeCockpit.Data.QueryLanguage.Syntax.Set.html Two example queries showing the two forms of a set in the Time Cockpit query language: an explicit set of values and a named set reference using the Set() function. ```unknown From X In Timesheet Where 'SomeDesc' In (X.Description, X.Project.Description) Select X ``` ```unknown From X In Timesheet Where 'SomeDesc' In Set('SomeNamedSet') Select X ``` -------------------------------- ### Create(DataContext, Model, String) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.InstallationManager.html Creates a new installation manager that fits to the specified context. ```APIDOC ## Create(DataContext, Model, String) ### Description Creates a new installation manager that fits to the specified context. ### Method Create ### Signature public static InstallationManager Create(DataContext context, Model writableModel = null, string dataModelLanguage = null) ### Parameters - **context** (DataContext) - Required - Context that the installation manager has to work with - **writableModel** (Model) - Optional - Optional, preprovided writable model. - **dataModelLanguage** (String) - Optional - The language of the datamodel that is to be upgraded. ### Returns InstallationManager - New instance of the InstallationManager class ``` -------------------------------- ### InstallMissingUpdateBatches(IEnumerable, Nullable) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.InstallationManager.html Installs missing installation components from a given batch, optionally limited by a batch GUID. ```APIDOC ## InstallMissingUpdateBatches(IEnumerable, Nullable) ### Description Installs missing installation components from the provided install batch. Components that have not been installed yet will be installed. ### Method InstallMissingUpdateBatches ### Signature public void InstallMissingUpdateBatches(IEnumerable installBatch, Guid? guidOfLastBatchToBeExecuted) ### Parameters - **installBatch** (IEnumerable) - Required - List of installation components for which to check if they have already been installed on the client db. Those that have not been installed yet will be installed. - **guidOfLastBatchToBeExecuted** (Nullable) - Required - Guid of the last batch that should be installed. See remarks for details. ### Returns void ### Remarks Note that this function adds the installed components to `TcSys_InstalledBatches` even if the corresponding batch has not been executed because of not meeting the match criteria. If `guidOfLastBatchToBeExecuted` is null all batches in `installBatch` are installed. ``` -------------------------------- ### Create(DbClient, Model, String) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.InstallationManager.html Creates a new installation manager that fits to the specified client. ```APIDOC ## Create(DbClient, Model, String) ### Description Creates a new installation manager that fits to the specified client. ### Method Create ### Signature public static InstallationManager Create(DbClient client, Model writableModel = null, string dataModelLanguage = null) ### Parameters - **client** (DbClient) - Required - Database client that the installation manager has to work with - **writableModel** (Model) - Optional - Optional, preprovided writable model. - **dataModelLanguage** (String) - Optional - The language of the datamodel that is to be upgraded. ### Returns InstallationManager - New instance of the InstallationManager class ``` -------------------------------- ### Output of codex mcp add and list Source: https://docs.timecockpit.com/doc/mcp/codex.html Example output showing the successful addition of the MCP server, the OAuth callback URL, and the server list with status and auth. ```text Added global MCP server 'timecockpit'. OAuth callback URL: http://127.0.0.1/callback/XuuuHAzzHOni Detected OAuth support. Starting OAuth flow… Opening browser to authenticate with timecockpit... ✔ Successfully logged in to MCP server timecockpit Name Url Bearer Token Env Var Status Auth timecockpit https://mcp.timecockpit.com - enabled OAuth ``` -------------------------------- ### GetFeatureStatus(Guid, IEnumerable) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.InstallationManager.html Returns the status of a given feature based on a list of installed features. ```APIDOC ## GetFeatureStatus(Guid, IEnumerable) ### Description Returns the status of a given feature based on a list of installed features. ### Method GetFeatureStatus ### Signature public static FeatureStatus GetFeatureStatus(Guid featureGuid, IEnumerable installedFeatures) ### Parameters - **featureGuid** (Guid) - Required - Guid of the feature to check - **installedFeatures** (IEnumerable) - Required - Installed feature uuids. ### Returns FeatureStatus - Status of a given feature ``` -------------------------------- ### Simple Order By Example Source: https://docs.timecockpit.com/doc/tcql/order-by-clause.html Simple TCQL query that sorts projects by ProjectUuid in ascending order (default). ```tcql From P In Project Order By P.ProjectUuid Select P ``` -------------------------------- ### C# Sample Source: https://docs.timecockpit.com/doc/web-api/executelist.html C# example demonstrating how to call the ExecuteList endpoint to fetch the standard time report list. ```APIDOC ## [POST] https://api.timecockpit.com/executelist/{listName} ### Description Executes a TCQL or script list defined in time cockpit and returns the resulting data. The list is identified by its name in the URL, and parameters can be passed in the request body. ### Method POST ### Endpoint https://api.timecockpit.com/executelist/{listName} ### Parameters #### Path Parameters - **listName** (string) - Required - The name of the list to execute, e.g., `APP_DefaultTimeReportList`. #### Query Parameters - **$top** (integer) - Optional - Limits the number of returned records. Example: `?$top=301`. #### Request Body - **list** (string) - Required - The name of the list to execute (same as the path parameter). - **parameters** (object) - Optional - A JSON object containing the parameters required by the list. Each parameter is a key-value pair where the value is a string in the format `'type'value`, e.g., `"UserDetail": "guid'2019ff2c-edea-4864-b092-b0ba2b5be9c1'"`. ### Request Example ```json { "list": "APP_DefaultTimeReportList", "parameters": { "UserDetail": "guid'2019ff2c-edea-4864-b092-b0ba2b5be9c1'", "BeginTime": "datetime'2023-03-01T00:00:00'", "EndTime": "datetime'2023-03-31T00:00:00'" } } ``` ### Response #### Success Response (200) Returns the list data as a string (e.g., JSON). The exact structure is not specified in the source. #### Error Response If the request fails, the response body contains an `odata.error` property with error details. ### Authentication Authentication is required. Refer to the authentication documentation for details. ``` -------------------------------- ### GET https://api.timecockpit.com/odata/APP_Country Source: https://docs.timecockpit.com/doc/web-api/odata.html Example of querying all countries from the Time Cockpit OData API using HTTP GET. ```APIDOC ## [GET] https://api.timecockpit.com/odata/APP_Country ### Description Retrieves all items of the entity type APP_Country. The request uses token authentication and returns an unfiltered collection of countries. ### Method GET ### Endpoint https://api.timecockpit.com/odata/APP_Country ### Parameters #### Headers - **Authorization** (string) - Required - Bearer token for authentication. ### Request Example GET https://api.timecockpit.com/odata/APP_Country HTTP/1.1 Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9... Host: api.timecockpit.com ### Response #### Success Response (200) - **odata.metadata** (string) - Metadata URL for the entity set. - **value** (array) - Collection of country objects. - **APP_CountryUuid** (string) - Unique identifier of the country. - **APP_CountryName** (string) - Name of the country. - **APP_IsoCode** (string) - ISO code of the country. #### Response Example { "odata.metadata": "https://api.timecockpit.com/odata/$metadata#APP_Country", "value": [ { "APP_CountryUuid": "94bac4d3-fdc3-4ef7-ab6b-3123a6f361e0", "APP_CountryName": "Switzerland", "APP_IsoCode": "CH" }, { "APP_CountryUuid": "e3d0782e-b929-4edc-826b-3d1f79d45115", "APP_CountryName": "Germany", "APP_IsoCode": "DE" }, { "APP_CountryUuid": "89e40635-268f-436a-8388-516f2ccb1c9e", "APP_CountryName": "Austria", "APP_IsoCode": "AT" }, { "APP_CountryUuid": "35a34340-2533-4925-b445-ab243a1115d0", "APP_CountryName": "United Kingdom", "APP_IsoCode": "GB" } ] } ``` -------------------------------- ### SelectCache.GetOrAdd(ModelEntityBase, Guid, Func) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.SelectCache.html Gets an entity object from the cache or calls the provided factory to create and add a new one. ```APIDOC ## [GET] SelectCache.GetOrAdd(ModelEntityBase, Guid, Func) ### Description Gets an entity object from the cache or calls the factory to add a new value if not present. ### Method GET ### Endpoint SelectCache.GetOrAdd(ModelEntityBase, Guid, Func) ### Parameters #### Parameters - **entity** (ModelEntityBase) - Required - The entity type of the object. - **guid** (Guid) - Required - The object id to add. - **factory** (Func) - Required - The factory method to call. ### Returns - **EntityObject** - The added EntityObject. ### Response Example ```csharp EntityObject result = cache.GetOrAdd(entity, guid, id => new EntityObject()); ``` ``` -------------------------------- ### ActivateAndInstallFeatures(IEnumerable) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.InstallationManager.html Activates and installs a given set of features, ordering them by prerequisites. ```APIDOC ## ActivateAndInstallFeatures(IEnumerable) ### Description Activates and installs a given set of features. The method orders the features by prerequisites and installs them in order. ### Method ActivateAndInstallFeatures ### Signature public void ActivateAndInstallFeatures(IEnumerable features) ### Parameters - **features** (IEnumerable) - Required - Features to install ### Remarks The method orders the features by prerequisites and installs them in order. ``` -------------------------------- ### Interactive apm init output Source: https://docs.timecockpit.com/doc/mcp/companion-skills.html Example interactive output from `apm init`. Values in parentheses are defaults; targets are pre-selected from detected folders. Toggle targets by number, use 'all' or 'none', and confirm with Enter. Successfully creates `apm.yml`. ```text Project name (my-project): Version (1.0.0): Description (APM project for my-project): Author (Jane Doe): Select targets for this project: [x] 1. claude (.claude/ detected) [x] 2. codex (.codex/ detected) [ ] 3. copilot [ ] 4. cursor Type a number to toggle, 'all' / 'none', Enter to confirm: Is this OK? [Y/n] y ✔ Created apm.yml ``` -------------------------------- ### TypeName Property Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Install.CompiledInstallationComponent.html Gets or sets the name of the type of the installation component. ```APIDOC ## TypeName Property ### Description Gets or sets the name of the type of the installation component. ### Property Signature ```csharp public string TypeName { get; set; } ``` ### Property Value - **String** - The name of the type. ``` -------------------------------- ### Example: Creating a flat dimension with properties Source: https://docs.timecockpit.com/api/TimeCockpit.Data.DynamicObject.html Shows how to use the constructor with properties to create a DynamicObject representing a flat dimension, add text and date-time properties, and add it to the model entities. ```csharp flatDim = ModelEntity({ "Name": "Project" }) flatDim.Properties.Add(TextProperty({ "Name": "ProjectName", "MaxStorageSize": 50 })) flatDim.Properties.Add(DateTimeProperty({ "Name": "BeginTime", "FractionalSecondsPrecision": 2 })) Context.Model.Entities.Add(flatDim) ``` -------------------------------- ### AssemblyName Property Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Install.CompiledInstallationComponent.html Gets or sets the name of the assembly of the installation component. ```APIDOC ## AssemblyName Property ### Description Gets or sets the name of the assembly of the installation component. ### Property Signature ```csharp public string AssemblyName { get; set; } ``` ### Property Value - **String** - The name of the assembly. ``` -------------------------------- ### Create and save a new project with CreateEntityObject Source: https://docs.timecockpit.com/doc/scripting/overview.html Creates a new project entity using CreateEntityObject, saves it, retrieves it with a TCQL query, and deletes it. The example prints the project name and 'Done!' to confirm each step. ```python # Create and save a new project myNewObj = Context.Model.Project.CreateEntityObject() myNewObj.Code = "NewObject" myNewObj.ProjectName = "New Object" Context.SaveObject(myNewObj) # Get the newly created project from the db myObj = Context.SelectSingle("From P In Project Where P.Code = 'NewObject' Select P") print myObj.ProjectName # Delete the project. Context.DeleteObject(myObj) print "Done!" ``` -------------------------------- ### GetMissingComponents(Feature) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.InstallationManager.html Gets a list of missing installation components for a given feature. ```APIDOC ## GetMissingComponents(Feature) ### Description Gets a list of missing installation components for a given feature. Components that have already been installed on the client database are excluded. ### Method GetMissingComponents ### Signature public IEnumerable GetMissingComponents(Feature feature) ### Parameters - **feature** (Feature) - Required - Feature to check. ### Returns IEnumerable - Those installation components from the `feature` that have not already been installed on the client db. ``` -------------------------------- ### Initialize project with apm init Source: https://docs.timecockpit.com/doc/mcp/companion-skills.html Initialize an APM project in the repository root. `apm init` interactively asks for name, version, description, author, and targets; without targets, APM detects them from existing folders like `.claude/` and `.codex/`. Use `--yes --target claude,codex` to skip prompts. ```bash cd C:\Repos\my-project apm init # or without prompts: apm init --yes --target claude,codex ``` -------------------------------- ### Select Data with DataContext.Create and Select Source: https://docs.timecockpit.com/doc/scripting/use-c-sharp-to-access-time-cockpit-api.html Shows how to create a DataContext with user credentials and select all projects using a Time Cockpit query. The result is cast to dynamic and each project's ProjectName is printed to the console. Exceptions are caught and displayed, and the program waits for a key press before exiting. ```csharp using System; using System.Collections.Generic; using System.Linq; using System.Text; using TimeCockpit.Data; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { try { var dataContext = DataContext.Create("user@demo.com", "myPassword"); var projects = dataContext.Select("From P In Project Select P").Cast(); projects.ToList().ForEach(p => Console.WriteLine(p.ProjectName)); } catch (Exception ex) { Console.WriteLine("Exception: {0}", ex.ToString()); } Console.ReadKey(); } } } ``` -------------------------------- ### Basic TCQL query examples Source: https://docs.timecockpit.com/doc/tcql/overview.html Simple TCQL query examples. Keywords are case sensitive; identifiers must start with a capital letter. Shows filtering with Where, comparisons, date literals, and Null checks. ```tcql // Return all Project entities From P In Project Select P // Return all billable timesheet entities From T In Timesheet Where T.Billable=True Select T // Look for two project entities From P In Project Where P.ProjectName="ProjectName9" Or P.ProjectName="ProjectName8" Select P // Return all projects that have a specified number of hours From P In Project Where P.NumberOfHours=(6 + 4)*4 Select P // Return all projects that start on a specified date From P In Project Where P.StartDate=#2010-01-01# Select P // Return all projects for which number of hours is set From P In Project Where P.NumberOfHours <> Null Select P ``` -------------------------------- ### DbClientSettings.InstallMissingSystemObjects Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.DbClientSettings.html Gets or sets a value indicating whether missing system objects should be automatically installed or updated when the connection to the underlying database is established. ```APIDOC ## DbClientSettings.InstallMissingSystemObjects ### Description Gets or sets a value indicating whether missing system objects should be automatically installed or updated when the connection to the underlying database is established. ### Property - **Type**: bool - **Access**: get, set ### Remarks The default value for this property is false. ### Example ```csharp settings.InstallMissingSystemObjects = true; ``` ``` -------------------------------- ### Full command to reset configuration Source: https://docs.timecockpit.com/doc/getting-started/configuration-wizard.html Full command to reset the configuration of a default installation. Run this from the command line to start TimeCockpit.UI.exe with the --reset-configuration parameter. ```text C:\Program Files\software architects\time cockpit\time cockpit 2010\TimeCockpit.UI.exe --reset-configuration ``` -------------------------------- ### SyntaxASTToTCQL() Source: https://docs.timecockpit.com/api/TimeCockpit.Data.QueryLanguage.Syntax.SyntaxASTToTCQL.html Initializes a new instance of the SyntaxASTToTCQL class. ```APIDOC ## SyntaxASTToTCQL() ### Description Initializes a new instance of the SyntaxASTToTCQL class. ### Method Constructor ### Signature ```csharp public SyntaxASTToTCQL() ``` ``` -------------------------------- ### RegisterForTenantCreation(String, String, String, String, String, Boolean) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.RoutingService.ManagementServiceProxy.html Registers a new user for tenant creation. ```APIDOC ## RegisterForTenantCreation(String, String, String, String, String, Boolean) ### Description Registers a user and adds an entry in the UserInfo table. ### Method RegisterForTenantCreation ### Signature ```csharp public void RegisterForTenantCreation(string userName, string password, string firstName, string lastName, string company, bool admin) ``` ### Parameters - **userName** (String) - The username of the user. - **password** (String) - The password of the user. - **firstName** (String) - The firstname of the user. - **lastName** (String) - The lastname of the user. - **company** (String) - The company of the user. - **admin** (Boolean) - Indicates whether the user is admin or not. ``` -------------------------------- ### C# CRUD Example for Time Cockpit OData API Source: https://docs.timecockpit.com/doc/web-api/odata.html Shows how to perform create, read, update, and delete operations on the Time Cockpit OData endpoint using HttpClient and a personal access token (PAT). Requires the Newtonsoft.Json library for serialization and JSON parsing. The example uses a hardcoded GUID and project UUID. ```csharp var timeCockpitBaseUri = "https://api.timecockpit.com"; var timeCockpitDataApiPAT = "YOUR_PAT"; using (var httpClient = new HttpClient()) { httpClient.BaseAddress = new Uri(timeCockpitBaseUri); httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue($"Bearer", timeCockpitDataApiPAT); // ## CREATE var guid = new Guid("af0725c0-cf12-43da-8688-3dcced935909"); var newTask = new { APP_TaskUuid = guid, APP_Code = "IMPL", USR_Title = "Implementation", APP_ProjectUuid = "79b82123-596e-4abe-bdf2-38a8c279f589" }; var newTaskContent = new StringContent(JsonConvert.SerializeObject(newTask), Encoding.UTF8, "application/json"); var result = await httpClient.PostAsync($"https://api.timecockpit.com/odata/APP_Task", newTaskContent); // ## READ result = await httpClient.GetAsync($"https://api.timecockpit.com/odata/APP_Task()?$filter=APP_TaskUuid eq guid'{guid}'"); var json = JObject.Parse(result.Content.ReadAsStringAsync().Result); // ## READ ALL result = await httpClient.GetAsync("https://api.timecockpit.com/odata/APP_Task()"); json = JObject.Parse(result.Content.ReadAsStringAsync().Result); // ## UPDATE var taskData = new { APP_Description = "Development" }; var updatedJson = new StringContent(JsonConvert.SerializeObject(taskData), Encoding.UTF8, "application/json"); result = await httpClient.PatchAsync($"https://api.timecockpit.com/odata/APP_Task(guid'{guid}')", updatedJson); // ## DELETE result = await httpClient.DeleteAsync($"https://api.timecockpit.com/odata/APP_Task(guid'{guid}')"); } ``` -------------------------------- ### TCQLExpression.Constant(Guid) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.QueryLanguage.Syntax.TCQLExpression.html Creates a guid constant. ```APIDOC ## TCQLExpression.Constant(Guid) ### Description Creates a guid constant. ### Parameters - **guid** (Guid) - The value of the constant. ### Returns - **GuidConstant** - Returns a new GuidConstant. ### Example ```csharp public static GuidConstant Constant(Guid guid) ``` ``` -------------------------------- ### Configure Claude Desktop mcpServers Source: https://docs.timecockpit.com/doc/mcp/oncockpit-admin-local.html Claude Desktop configuration in %APPDATA%\Claude\claude_desktop_config.json to start the stdio server. Uses escaped backslashes in the command path. ```json { "mcpServers": { "timecockpit-local": { "command": "C:\\Users\\\\AppData\\Local\\OnCockpitAdmin\\OnCockpit.Admin.exe", "args": ["-c", "test", "--mcp"] } } } ``` -------------------------------- ### ToTCQLString(Guid) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.QueryLanguage.ConditionBuilder.html Converts a Guid to a TCQL string. ```APIDOC ## ToTCQLString(Guid) ### Description Converts a Guid to a TCQL string. ### Method ToTCQLString ### Signature public static string ToTCQLString(Guid guid) ### Parameters - **guid** (Guid) - Required - The guid to convert. ### Returns String - Returns the TCQL compatible string representation of the guid value. ``` -------------------------------- ### DbClientSettings() Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.DbClientSettings.html Initializes a new instance of the DbClientSettings class. ```APIDOC ## DbClientSettings() ### Description Initializes a new instance of the DbClientSettings class. ### Method Constructor ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response #### Success Response (200) - **instance** (DbClientSettings) - A new instance of DbClientSettings. #### Response Example ```csharp var settings = new DbClientSettings(); ``` ``` -------------------------------- ### Install Claude Code with PowerShell Source: https://docs.timecockpit.com/doc/mcp/claude-code.html Installs Claude Code via PowerShell. The output confirms successful installation and instructs to restart the terminal before running 'claude'. ```powershell irm https://claude.ai/install.ps1 | iex ``` ```text Downloading Claude Code... ✔ Claude Code installed successfully. Restart your terminal so the new PATH entry takes effect, then run 'claude' to get started. ``` -------------------------------- ### CompiledInstallationComponent() Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Install.CompiledInstallationComponent.html Initializes a new instance of the CompiledInstallationComponent class. ```APIDOC ## CompiledInstallationComponent() ### Description Initializes a new instance of the CompiledInstallationComponent class. ### Constructor ```csharp public CompiledInstallationComponent() ``` ``` -------------------------------- ### FixFeatureDependencies(List, Guid) Source: https://docs.timecockpit.com/api/TimeCockpit.UI.Common.Version.FeatureProviderHelper.html Adds the feature prerequisites. This method takes a list of features and a GUID, and sets the last GUID as a prerequisite to the first feature. ```APIDOC ## FixFeatureDependencies(List, Guid) ### Description Adds the feature prerequisites. ### Method FixFeatureDependencies ### Parameters - **features** (List) - Required - The features to batch up in a dependency chain. - **lastXamlFeatureGuid** (Guid) - Required - The last guid to set as prerequisite to the first feature. ### Returns - **void** - This method does not return a value. ``` -------------------------------- ### GetFeatureStatus(Guid) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Database.InstallationManager.html Returns the status of a given feature by its GUID. ```APIDOC ## GetFeatureStatus(Guid) ### Description Returns the status of a given feature. ### Method GetFeatureStatus ### Signature public FeatureStatus GetFeatureStatus(Guid featureGuid) ### Parameters - **featureGuid** (Guid) - Required - Guid of the feature to check ### Returns FeatureStatus - Status of a given feature ``` -------------------------------- ### GetSettings(ConnectionInformation, DataContextSettings) method signature Source: https://docs.timecockpit.com/api/TimeCockpit.Data.DataContext.html TODO review/preview ```csharp public static DataContextSettings GetSettings(ConnectionInformation connectionInformation, DataContextSettings settings)__ ``` -------------------------------- ### DataContextScriptHost(DebugSettings) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.DataContextScriptHost.html Initializes a new instance of the DataContextScriptHost class with optional debug settings. ```APIDOC ## DataContextScriptHost(DebugSettings) ### Description Initializes a new instance of the DataContextScriptHost class. ### Method Constructor ### Signature public DataContextScriptHost(DebugSettings settings = null) ### Parameters - **settings** (DebugSettings) - Optional - Debug settings. ``` -------------------------------- ### Get(String) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Localization.Default.StringLocalizer.html Gets the localized string for the given culture. ```APIDOC ## [METHOD] Get(String) ### Description Gets the localized string for the given culture. ### Parameters - **culture** (String) - Required - The culture to get a LocalizedString for. ### Returns - **LocalizedString** - The LocalizedString for the specified culture. ### Example ```csharp public LocalizedString Get(string culture) ``` ``` -------------------------------- ### PythonInstallationScript Constructor Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Install.PythonInstallationScript.html Initializes a new instance of the PythonInstallationScript class. ```APIDOC ## PythonInstallationScript() ### Description Initializes a new instance of the PythonInstallationScript class. ### Method Constructor ### Signature public PythonInstallationScript() ### Parameters None ### Returns A new instance of the PythonInstallationScript class. ``` -------------------------------- ### Method: GetCellValueGuid(Object, out Guid) Source: https://docs.timecockpit.com/api/TimeCockpit.Data.Import.Excel.ExcelImportEngine.html Attempts to convert a cell value to a Guid. ```APIDOC ## Method: GetCellValueGuid(Object, out Guid) ### Description Attempts to convert a cell value to a Guid. ### Signature ```csharp protected override bool GetCellValueGuid(object cellValue, out Guid g) ``` ### Parameters - **cellValue** (Object) - Required - The cell value to convert. - **g** (Guid) - Required - The output Guid value. ### Returns - **Boolean** - True if conversion succeeded; otherwise false. ``` -------------------------------- ### DELETE /odata/APP_Task(guid'{guid}') Source: https://docs.timecockpit.com/doc/web-api/odata.html Deletes an existing task entity from the Time Cockpit OData service. ```APIDOC ## [DELETE] /odata/APP_Task(guid'{guid}') ### Description Deletes an existing task entity from the Time Cockpit OData service. ### Method DELETE ### Endpoint https://api.timecockpit.com/odata/APP_Task(guid'{guid}') ### Parameters #### Path Parameters - **guid** (guid) - Required - The unique identifier of the task to delete. ### Response #### Success Response (200) - No response body is documented. ``` -------------------------------- ### Acquire token and request metadata with HttpClient Source: https://docs.timecockpit.com/doc/web-api/legacy-overview.html Shows how to acquire an access token using basic credentials and then use it as a Bearer token for a service request. The example retrieves and parses the OData metadata. ```csharp var tokenUri = "https://api.timecockpit.com/token"; var metadataUri = "https://api.timecockpit.com/odata/$metadata"; using (var client = new HttpClient()) { // set basic credentials and acquire token client.Credentials = new NetworkCredential("demo@timecockpit.com", "..."); var token = client.DownloadString(tokenUri); // remove basic credentials and add token to headers client.Credentials = null; client.Headers.Add("Authorization", "Bearer " + token); // example service usage: retrieve and parser metadata var metadata = XDocument.Parse(client.DownloadString(metadataUri)); } ```