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
<PackageReference Include="Veracity.Core.Api.V4" Version="1.0.20241120.7" />
paket add Veracity.Core.Api.V4 --version 1.0.20241120.7
#r "nuget: Veracity.Core.Api.V4, 1.0.20241120.7"
// 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 ofTenant
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
: TheTenant
object representing the specified tenant.
CreateTenant(Tenant tenant)
Creates a new tenant in the system.
Parameters
tenant
(Tenant): TheTenant
object containing the details of the new tenant.
Returns
Tenant
: TheTenant
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): TheTenant
object containing the updated details of the tenant.
Returns
Tenant
: TheTenant
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 ofUser
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
: TheUser
object representing the specified user.
CreateUser(User user)
Creates a new user in the system.
Parameters
user
(User): TheUser
object containing the details of the new user.
Returns
User
: TheUser
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): TheUser
object containing the updated details of the user.
Returns
User
: TheUser
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 ofGroup
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
: TheGroup
object representing the specified group.
CreateGroup(Group group)
Creates a new group in the system.
Parameters
group
(Group): TheGroup
object containing the details of the new group.
Returns
Group
: TheGroup
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): TheGroup
object containing the updated details of the group.
Returns
Group
: TheGroup
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 ofApplication
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
: TheApplication
object representing the specified application.
CreateApplication(Application application)
Creates a new application in the system.
Parameters
application
(Application): TheApplication
object containing the details of the new application.
Returns
Application
: TheApplication
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): TheApplication
object containing the updated details of the application.
Returns
Application
: TheApplication
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
: TheThisApplication
object representing this application.
UpdateThisApplication(ThisApplication application)
Updates the details of this application.
Parameters
application
(ThisApplication): TheThisApplication
object containing the updated details of this application.
Returns
ThisApplication
: TheThisApplication
object representing the updated application.
DeleteThisApplication()
Deletes this application from the system.
Parameters
None
Returns
None
Product | Versions 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. |
-
net6.0
- Microsoft.AspNetCore.JsonPatch (>= 6.0.33)
- Stardust.Interstellar.Rest (>= 5.6.1)
- Stardust.Interstellar.Rest.Annotations (>= 5.6.1)
- Swashbuckle.AspNetCore.Annotations (>= 6.7.3)
- System.Drawing.Common (>= 6.0.0)
- Veracity.Common.Authentication.Abstractions (>= 3.6.1)
- Veracity.Common.Authentication.AspNetCore (>= 3.6.5.2)
-
net7.0
- Microsoft.AspNetCore.JsonPatch (>= 7.0.20)
- Stardust.Interstellar.Rest (>= 5.6.1)
- Stardust.Interstellar.Rest.Annotations (>= 5.6.1)
- Swashbuckle.AspNetCore.Annotations (>= 6.7.3)
- System.Drawing.Common (>= 7.0.0)
- Veracity.Common.Authentication.Abstractions (>= 3.6.1)
- Veracity.Common.Authentication.AspNetCore (>= 3.6.5.2)
-
net8.0
- Microsoft.AspNetCore.JsonPatch (>= 8.0.8)
- Stardust.Interstellar.Rest (>= 5.6.1)
- Stardust.Interstellar.Rest.Annotations (>= 5.6.1)
- Swashbuckle.AspNetCore.Annotations (>= 6.7.3)
- System.Drawing.Common (>= 8.0.8)
- Veracity.Common.Authentication.Abstractions (>= 3.6.1)
- Veracity.Common.Authentication.AspNetCore (>= 3.6.5.2)
-
net9.0
- Microsoft.AspNetCore.JsonPatch (>= 9.0.0)
- Stardust.Interstellar.Rest (>= 5.6.1)
- Stardust.Interstellar.Rest.Annotations (>= 5.6.1)
- Swashbuckle.AspNetCore.Annotations (>= 6.7.3)
- System.Drawing.Common (>= 9.0.0)
- Veracity.Common.Authentication.Abstractions (>= 3.6.1)
- Veracity.Common.Authentication.AspNetCore (>= 3.6.5.2)
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.