anouri.GAEB365.API.Client
1.0.20250821.2
dotnet add package anouri.GAEB365.API.Client --version 1.0.20250821.2
NuGet\Install-Package anouri.GAEB365.API.Client -Version 1.0.20250821.2
<PackageReference Include="anouri.GAEB365.API.Client" Version="1.0.20250821.2" />
<PackageVersion Include="anouri.GAEB365.API.Client" Version="1.0.20250821.2" />
<PackageReference Include="anouri.GAEB365.API.Client" />
paket add anouri.GAEB365.API.Client --version 1.0.20250821.2
#r "nuget: anouri.GAEB365.API.Client, 1.0.20250821.2"
#:package anouri.GAEB365.API.Client@1.0.20250821.2
#addin nuget:?package=anouri.GAEB365.API.Client&version=1.0.20250821.2
#tool nuget:?package=anouri.GAEB365.API.Client&version=1.0.20250821.2
GAEB365.online API-Client
This is the .NET Client for the GAEB365.online API.
The API enables access to projects in the context of the authorized user. The API also contains the GAEB Converter to convert a GAEB file to another GAEB version, as well as the GAEB Check, which checks whether a GAEB file matches the GAEB DA XML 3.0, 3.1, 3.2 or 3.3 specifications.
The API can be used by partners of anouri GmbH. Individual API credentials are required for use. We support all official .NET versions that have not yet reached Microsoft's end of support date.
Usage
Namespace: Anouri.GAEB365.API
Authorization
We are using OAuth2 with the Authorization Code flow. All requests are made in the context of the authorized user. The user requires the corresponding license for the individual functions. Some functions are also available with the Client Credentials flow.
Initialize the api and request a new access token within a client application
Authorization Code flow:
using ApiService apiService = new ApiService(new AuthCodeCredentials("<your clientId>", "<your clientSecret>", [<scope>]));
Client Credentials flow:
using ApiService apiService = new ApiService(new ClientCredentials("<your clientId>", "<your clientSecret>", [<scope>]));
Token Exchange flow:
You can use the Token Exchange flow to exchange a subject token for an access token. This flow can be used if you provide a module for the GAEB365.online web site.
using ApiService apiService = new ApiService(new TokenExchangeCredentials("<your clientId>", "<your clientSecret>", "<your subject token>", [<scope>]));
Available scopes:
- gaeb365.api.read (Read)
- gaeb365.api.write (Read & write)
- gaeb365.api.check (Check)
- gaeb365.api.convert (Convert)
- gaeb365.api.all (All)
- offline_access (Is required to issue a refresh token if it is not issued automatically when a desktop application is used. Only for the Authorization Code flow.)
Projects
A project is the entry point and contains one or more boQLists.
Get all active projects:
ICollection<ProjectModel> projects = await apiService.Projects.GetProjectsAsync();
Use oData to display projects in a list with paging or to use filtering and sorting:
var odataResult = await apiService.OdataProjects.GetOdataProjectAsync("uId, name", "created DESC", $"created ge {dt.ToString("s")}Z", 10, 0, true);
Get a project with details:
ProjectDetailsModel project = await apiService.Projects.GetProjectAsync(uId);
BoQLists
A boQList is part of a project and contains one or more boQs (bill of quantities).
Get a boQList with details:
BoQListDetailsModel boQList = await apiService.BoQLists.GetBoQListAsync(uId);
BoQs
A boQ (bill of quantities) is part of a boQList and contains the information required for GAEB data exchange. A boQ contains elements that provide informations like descriptions, quantities and prices. A boQ can contain several export and import files for downloading.
Get a boQ with details:
BoQDetailsModel boQ = await apiService.BoQs.GetBoQAsync(uId);
Elements
An element is a part of a boQ and define the categories, items, remarks, description and additional text from the GAEB data exchange.
Use oData to display elements in a list with paging or to use filtering and sorting:
var odataResult = await apiService.OdataElements.GetElementsAsync(boQUId, "uId, name", "sortNo", $"created ge {dt.ToString("s")}Z", 10, 0, true);
Get a boQ element with details:
ElementDetailsModel element = await apiService.Elements.GetElementAsync(uId, false);
Files
A file is part of a boQ and can be used to import a GAEB file as a new boQ or to download import and export files. A file contains the data at the time of creation and is not updated when changes are made. New exports generate new files which overwrite previous files. Export files are automatically deleted after a certain period of time.
Get the downloadable export and import files from the boQ:
ICollection<FileModel> files = await apiService.BoQs.GetBoQFilesAsync(boQUId)
Download a file:
FileResponse file = await apiService.Files.DownloadFileAsync(uId);
string contentType = file.GetContentType();
string fileName = file.GetFileName();
byte[] bytes = file.GetFileBytes();
Export
Provides functions to export boQs to different file formats. A new asynchronous job is created for each export. The job status can be queried with the job endpoint. A completed job contains the details of the created file.
JobModel exportJob = await apiService.Export.ExportGaebFileAsync(boQUId, new ExportGaebFileModel { DataPhase = 84, GaebVersion = GaebVersion.XML33 });
await apiService.Jobs.WaitForJobAsync(exportJob.UId);
FileResponse file = await apiService.Files.DownloadFileAsync(job.CreatedFileUId.Value);
Jobs
Tasks such as imports and exports are saved as asynchronous jobs and can be tracked here. A completed export job delivers a createdFileUId that can be used to download the file. A completed import job delivers the uIds of the created objects.
Get a job:
JobModel job = await apiService.Jobs.GetJobAsync(uId);
Waiting for the job to finish:
JobModel job = await apiService.Jobs.WaitForJobAsync(uId, cancellationToken);
GaebCheck
Create a job to check if a GAEB file matches the GAEB DA XML 3.0, 3.1, 3.2 or 3.3 specifications:
JobModel job = await apiService.GaebCheck.CheckFileAsync(new FileParameter(stream, fileName));
await apiService.Jobs.WaitForJobAsync(job.UId);
CheckResult result = await apiService.GaebCheck.GetCheckResultAsync(job.UId);
The GAEB Check also supports the use of the Client Credentials flow. In this case the scope 'gaeb365.api.check' or 'gaeb365.api.all' is required to display the complete details.
GaebConvert
Create a job to convert a GAEB file into another GAEB version:
JobModel job = await apiService.GaebConvert.ConvertFileAsync(new FileParameter(stream, fileName), GaebVersion.GAEB2000);
await apiService.Jobs.WaitForJobAsync(job.UId);
FileResponse file = await apiService.GaebConvert.DownloadConvertedFileAsync(job.UId);
Supported GAEB versions are GAEB 90, GAEB 2000, GAEB DA XML 3.0, 3.1, 3.2 and 3.3.
The GAEB Converter also supports the use of the Client Credentials flow. In this case the function requires the scope 'gaeb365.api.convert' or 'gaeb365.api.all'.
Logout
Logs out the current user from the API and revokes the used access token. Does not log out the user from the OAuth2 server.
await apiService.Users.LogoutAsync();
For more information, please consult the API documentation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.3)
- System.ComponentModel.Annotations (>= 5.0.0)
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
-
net9.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.20250821.2 | 96 | 8/22/2025 |
1.0.20250602.2 | 168 | 6/2/2025 |
1.0.20250325.2 | 509 | 3/25/2025 |
1.0.20250314.5 | 98 | 3/14/2025 |
1.0.20250310.8 | 176 | 3/10/2025 |