Veracity.Core.Api.V4 1.0.20241120.7

Prefix Reserved
dotnet add package Veracity.Core.Api.V4 --version 1.0.20241120.7                
NuGet\Install-Package Veracity.Core.Api.V4 -Version 1.0.20241120.7                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Veracity.Core.Api.V4" Version="1.0.20241120.7" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Veracity.Core.Api.V4 --version 1.0.20241120.7                
#r "nuget: Veracity.Core.Api.V4, 1.0.20241120.7"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Veracity.Core.Api.V4 as a Cake Addin
#addin nuget:?package=Veracity.Core.Api.V4&version=1.0.20241120.7

// Install Veracity.Core.Api.V4 as a Cake Tool
#tool nuget:?package=Veracity.Core.Api.V4&version=1.0.20241120.7                

Documentation

configuring the Veracity Graph api Client

This package is designed to be an extension of the existing official Veracity packages. See Github for details on setting this up.

In ConfigureServices replace the statment: .AddVeracityServices(ConfigurationManagerHelper.GetValueOnKey("myApiV3Url")) with .AddVeracityGraphApi(ConfigurationManagerHelper.GetValueOnKey("veracityGraphBaseUrl"))

add the following line to your app config: "veracityGraphBaseUrl": "https://api.veracity.com/apiv4/v1"

add the below line in your Configure method to enable the profile picture middleware: app.UseProfilePictureMiddleware();

Custom typed responses

To make the development easier, the package provides custom typed responses for the Veracity.Core.Api.V4 application. These responses are based on the official Veracity.Core.Api.V4 responses, but they are strongly typed and easier to work with. You only need to implement the base types in Veracity.Core.Api.V4.CustomResponseTypes and call ToTyped<T>() on the api responses.

Sample custom response:

public class MyTenant : TypedTenantBase
{
	public List<string> MyFleet
        {
            get => GetValue<List<string>>();
            set => SetValue(value);
        }
}

Convert the response to a custom typed response:

var typedTenant = tenant.ToTyped<MyTenant>();
//or
typedTenant=var tenant = await api.GetTenant(tenant_id_).ToTyped<MyTenant>();

Authorization

Use the VeracityAuthorization attribute on your controllers and/or actions if you use Veracity Access Hub for rights mamagement (managementMode=veracityManaged). This attribute supports accessLevels as well.

Interfaces and methods

Interface Description

The ITenantApi interface represents the contract for managing tenants in the Veracity.Core.Api.V4 application.

Methods

GetAllTenants()

Retrieves a list of all tenants in the system.

Parameters

None

Returns
  • IEnumerable<Tenant>: A collection of Tenant objects representing all the tenants in the system.

GetTenantById(int id)

Retrieves a specific tenant by its unique identifier.

Parameters
  • id (int): The unique identifier of the tenant.
Returns
  • Tenant: The Tenant object representing the specified tenant.

CreateTenant(Tenant tenant)

Creates a new tenant in the system.

Parameters
  • tenant (Tenant): The Tenant object containing the details of the new tenant.
Returns
  • Tenant: The Tenant object representing the newly created tenant.

UpdateTenant(int id, Tenant tenant)

Updates an existing tenant in the system.

Parameters
  • id (int): The unique identifier of the tenant to be updated.
  • tenant (Tenant): The Tenant object containing the updated details of the tenant.
Returns
  • Tenant: The Tenant object representing the updated tenant.

DeleteTenant(int id)

Deletes a tenant from the system.

Parameters
  • id (int): The unique identifier of the tenant to be deleted.
Returns

None

Interface Description

The IUsersApi interface represents the contract for managing users in the Veracity.Core.Api.V4 application.

Methods

GetAllUsers()

Retrieves a list of all users in the system.

Parameters

None

Returns
  • IEnumerable<User>: A collection of User objects representing all the users in the system.

GetUserById(int id)

Retrieves a specific user by their unique identifier.

Parameters
  • id (int): The unique identifier of the user.
Returns
  • User: The User object representing the specified user.

CreateUser(User user)

Creates a new user in the system.

Parameters
  • user (User): The User object containing the details of the new user.
Returns
  • User: The User object representing the newly created user.

UpdateUser(int id, User user)

Updates an existing user in the system.

Parameters
  • id (int): The unique identifier of the user to be updated.
  • user (User): The User object containing the updated details of the user.
Returns
  • User: The User object representing the updated user.

DeleteUser(int id)

Deletes a user from the system.

Parameters
  • id (int): The unique identifier of the user to be deleted.
Returns

None

Interface Description

The IGroupApi interface represents the contract for managing groups in the Veracity.Core.Api.V4 application.

Methods

GetAllGroups()

Retrieves a list of all groups in the system.

Parameters

None

Returns
  • IEnumerable<Group>: A collection of Group objects representing all the groups in the system.

GetGroupById(int id)

Retrieves a specific group by its unique identifier.

Parameters
  • id (int): The unique identifier of the group.
Returns
  • Group: The Group object representing the specified group.

CreateGroup(Group group)

Creates a new group in the system.

Parameters
  • group (Group): The Group object containing the details of the new group.
Returns
  • Group: The Group object representing the newly created group.

UpdateGroup(int id, Group group)

Updates an existing group in the system.

Parameters
  • id (int): The unique identifier of the group to be updated.
  • group (Group): The Group object containing the updated details of the group.
Returns
  • Group: The Group object representing the updated group.

DeleteGroup(int id)

Deletes a group from the system.

Parameters
  • id (int): The unique identifier of the group to be deleted.
Returns

None

Interface Description

The IApplicationsApi interface represents the contract for managing applications in the Veracity.Core.Api.V4 application.

Methods

GetAllApplications()

Retrieves a list of all applications in the system.

Parameters

None

Returns
  • IEnumerable<Application>: A collection of Application objects representing all the applications in the system.

GetApplicationById(int id)

Retrieves a specific application by its unique identifier.

Parameters
  • id (int): The unique identifier of the application.
Returns
  • Application: The Application object representing the specified application.

CreateApplication(Application application)

Creates a new application in the system.

Parameters
  • application (Application): The Application object containing the details of the new application.
Returns
  • Application: The Application object representing the newly created application.

UpdateApplication(int id, Application application)

Updates an existing application in the system.

Parameters
  • id (int): The unique identifier of the application to be updated.
  • application (Application): The Application object containing the updated details of the application.
Returns
  • Application: The Application object representing the updated application.

DeleteApplication(int id)

Deletes an application from the system.

Parameters
  • id (int): The unique identifier of the application to be deleted.
Returns

None

Interface Description

The ThisApplicationApi interface represents the contract for managing this application in the Veracity.Core.Api.V4 application.

Methods

GetThisApplication()

Retrieves the details of this application.

Parameters

None

Returns
  • ThisApplication: The ThisApplication object representing this application.

UpdateThisApplication(ThisApplication application)

Updates the details of this application.

Parameters
  • application (ThisApplication): The ThisApplication object containing the updated details of this application.
Returns
  • ThisApplication: The ThisApplication object representing the updated application.

DeleteThisApplication()

Deletes this application from the system.

Parameters

None

Returns

None

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.20241120.7 47 11/20/2024

Prelease version of the Veracity.Core.Api.V4. Only for some early adopters.