-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReferenceDataExample.cs
More file actions
22 lines (18 loc) · 975 Bytes
/
Copy pathReferenceDataExample.cs
File metadata and controls
22 lines (18 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace Ditio.Samples.Examples;
/// <summary>
/// Reference / lookup data you read before creating other entities — e.g. machine types (needed to
/// create machines) and alert (notification) types. Core API, scope <c>ditioapiv3</c>.
/// </summary>
public static class ReferenceDataExample
{
public static async Task RunAsync(DitioConfig cfg)
{
var api = new DitioApiClient(cfg.BaseUrl, cfg.Scope, new DitioTokenProvider(cfg));
// Machine types — each has a typeId used when creating machines (see 07-machines).
await api.GetAsync("api/MachineType");
// Alert / notification types — used when working with project alerts.
await api.GetAsync("api/ProjNotificationTypeSetup");
// Payroll types and absence types are configured in Ditio and referenced by id in the
// payroll export filters (payrollTypeIds / absenceTypeIds — see data-extraction (v1/payroll-lines, v1/absence-registrations).
}
}