📘
TimeLine E3
  • TimeLine E3 Documentation
  • Framework
    • Introduction
    • DataSet Definition
    • Window Handling Object
      • Input/Output arguments
      • Open
      • BindDataControls
      • Item Changes
      • Item Search
      • MenuItemClicked
      • Print
      • ModuleOpened (BlueArrow)
      • BlueArrowArguments
      • New Row
      • Delete Row
      • Save
      • Transactions
      • Locking [deprecated]
      • Locking (new)
      • Resizing a response window
      • ParaPanel
      • Adding DMS Tab to a Module
    • BusinessObject
    • Controls
      • BindingFormat
      • LookupGrid and SearchDef
      • ComboBox
      • RadioButton
      • Multiline Textbox
      • xTextBoxSearch
      • xFileBrowse [v16+]
      • DxDispoColumn
      • DxProgressColumn
      • DxTemplateColumn
      • Change control caption programmatically
      • TabControl
      • Navigation
      • Enable controls programmatically
      • Enable a MenuItem programmatically
      • Filter search values
      • Jumping to another module
      • Messages, Notifications, Log, Exceptions, Translation
      • LoggerSink [deprecated]
      • Log
      • OpenFile, FolderBrowsing and SaveFile
      • Execute Actions while displaying an Hourglass
      • Using Progress
      • Async methods with progress bar
      • Wizard
      • Customizing controls using xBehaviors
      • TLProperty.AllowInReadOnly [v16+]
    • DataSet Operations
    • Business-related functionality
      • Getting the next primary key
      • Hybrids
      • Enums
      • Get Current User
    • SQL
    • SQL (using named parameters)
    • Advanced SQL
    • Expression Binding
    • Server-side logic & customization [v16+]
      • Service Hoster
      • Starting / stopping hosted services
      • Changes to scheduled jobs!
      • Business Object Proxies
      • Business Object API
    • Colors in Expression Bindings [v15+]
    • Theming
      • Icons
  • TimeLine Developer (TLD)
    • Debugging in TLD
    • Targets
    • Custom Project Rework [v16+]
  • TimeLine-specific LL functions
  • Stunnel proxy
    • Pre-requisites
    • 1. Initial setup
    • 2. Generate the server/web certificates
    • 3.a. Generating client certificates using the CSR flow
    • 3.b. Generate client certificates from the server console
    • 4. Setting up the E3 client connection
    • 5. Setting up the browser certificates
  • Configuration
    • Configuring the WCF timeout
  • Troubleshooting the E3 Bridge
  • [Deprecated]
    • TimeLine WEB - deprecated in v16+
      • Prerequisites for running the WASM modules on the server
      • Prerequisites for developing WASM modules with TLD
      • Creating a small web module with TLD
      • Terminal Configuration
    • Customization Examples - deprecated in v16+
    • Codestore [deprecated]
    • Configuring the scheduled jobs timeout - deprecated in v16+
Powered by GitBook
On this page
  1. Framework
  2. Server-side logic & customization [v16+]

Business Object API

The Business Object API is a HTTP interface to expose business functionality. By default it is started using the Service Hoster.

PreviousBusiness Object ProxiesNextColors in Expression Bindings [v15+]

Last updated 1 year ago

To run the Business Object API it has to be added to the services.json inside the server config directory. An example can be found in the services.boapi.example.json. The config can also be edited using the visual config editor in the TimeLine Server.

The API should use a user that is explicitly created for the API and is not used by anyone else.

The API itself reads its config from three configuration files inside the server config directory. The file api.config.json is used to configure general settings like the port it will run under, OAuth2 settings and rate limiting. The settings themselves are described using comments inside the file. Inside api.clients.json all authorized clients credentials are kept. By default it contains the Gebauer Development credentials. This should be removed or replaced by newly generated credentials.

using System;
using System.Security.Cryptography;
public class Program
{
    public static void Main()
    {
        Console.WriteLine("Guid:");
        Console.WriteLine(Guid.NewGuid().ToString());
        Console.WriteLine();
        Console.WriteLine("Secret/Hash:");
        RandomNumberGenerator cryptoRandomDataGenerator = new RNGCryptoServiceProvider();
        byte[] buffer = new byte[36];
        cryptoRandomDataGenerator.GetBytes(buffer);
        string uniq = Convert.ToBase64String(buffer);
        Console.WriteLine(uniq);
    }
}

Inside api.nlog.config the API request logger can be configured. By default the API logs the requests to C:\TimeLine\Logs\Api.json.

Credentials can be generated using or any other C# compiler with the following code

https://dotnetfiddle.net/
Business Object API service config