XRoad.Sdk 1.0.2

.NET 6.0
dotnet add package XRoad.Sdk --version 1.0.2
NuGet\Install-Package XRoad.Sdk -Version 1.0.2
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="XRoad.Sdk" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add XRoad.Sdk --version 1.0.2
#r "nuget: XRoad.Sdk, 1.0.2"
#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 XRoad.Sdk as a Cake Addin
#addin nuget:?package=XRoad.Sdk&version=1.0.2

// Install XRoad.Sdk as a Cake Tool
#tool nuget:?package=XRoad.Sdk&version=1.0.2

ChihabHajji.XRoad.Sdk - the C# library for the X-Road Security Server Admin API

X-Road Security Server Admin API. Note that the error metadata responses described in some endpoints are subjects to change and may be updated in upcoming versions.

This C# SDK is automatically generated using NSwag:

  • API version: 7.0.1
  • SDK version: 1.0.1

Frameworks supported



To use the API client with a HTTP proxy, setup a System.Net.WebProxy

        string token = "<YOUR-TOKEN>";
        var clientHandler = new HttpClientHandler();
        // When using docker standalone-security-server, ignore SSL certificate
        clientHandler.ServerCertificateCustomValidationCallback = (_, _, _, _) => true;
        var client = new HttpClient(clientHandler);
        client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("X-Road-ApiKey", $"token={token}");
        _instance = new XRoadClient(client)
            BaseUrl = "https://<SECURITY-SERVER-URL>/api/v1",

Documentation for API Endpoints

All URIs are relative to /api/v1

Class Method HTTP request Description
BackupsApi AddBackup POST /backups add new backup for the security server
BackupsApi AddBackupExt POST /backups/ext add new backup for the security server and return extra backup state
BackupsApi DeleteBackup DELETE /backups/{filename} delete security server backup
BackupsApi DownloadBackup GET /backups/{filename}/download download security server backup
BackupsApi GetBackups GET /backups get security server backups
BackupsApi RestoreBackup PUT /backups/{filename}/restore restore security server configuration from backup
BackupsApi UploadBackup POST /backups/upload upload new backup for the security server
CertificateAuthoritiesApi GetApprovedCertificateAuthorities GET /certificate-authorities view the approved certificate authorities
CertificateAuthoritiesApi GetSubjectFieldDescriptions GET /certificate-authorities/{ca_name}/csr-subject-fields get description of subject DN fields for CSR
ClientsApi AddClient POST /clients Add new client for the security server.
ClientsApi AddClientLocalGroup POST /clients/{id}/local-groups add new local group for the security server client
ClientsApi AddClientServiceDescription POST /clients/{id}/service-descriptions add new service description for the security server client
ClientsApi AddClientTlsCertificate POST /clients/{id}/tls-certificates add new certificate for the security server client
ClientsApi AddServiceClientAccessRights POST /clients/{id}/service-clients/{sc_id}/access-rights Add new access rights for selected service client. If service client did not exist yet, one is created.
ClientsApi ChangeOwner PUT /clients/{id}/make-owner make client Security Server's owner. Client must be a member and already registered on the Security Server
ClientsApi DeleteClient DELETE /clients/{id} delete security server client
ClientsApi DeleteClientTlsCertificate DELETE /clients/{id}/tls-certificates/{hash} delete certificate
ClientsApi DeleteOrphans DELETE /clients/{id}/orphans delete orphaned sign keys, certificates and csrs left behind a delete client
ClientsApi DeleteServiceClientAccessRights POST /clients/{id}/service-clients/{sc_id}/access-rights/delete remove access rights
ClientsApi FindClients GET /clients find security server clients
ClientsApi FindServiceClientCandidates GET /clients/{id}/service-client-candidates find ServiceClient candidates for a specific client
ClientsApi GetClient GET /clients/{id} get security server client information
ClientsApi GetClientLocalGroups GET /clients/{id}/local-groups get local groups for the selected client
ClientsApi GetClientOrphans GET /clients/{id}/orphans get information about orphaned sign keys, certificates and csrs left behind a delete client
ClientsApi GetClientServiceClients GET /clients/{id}/service-clients get service clients for the selected client's services
ClientsApi GetClientServiceDescriptions GET /clients/{id}/service-descriptions get security server client service descriptions
ClientsApi GetClientSignCertificates GET /clients/{id}/sign-certificates get security server client certificates information
ClientsApi GetClientTlsCertificate GET /clients/{id}/tls-certificates/{hash} get TLS certificate
ClientsApi GetClientTlsCertificates GET /clients/{id}/tls-certificates get security server client TLS certificates information
ClientsApi GetServiceClient GET /clients/{id}/service-clients/{sc_id} get single service client by client id and service client id
ClientsApi GetServiceClientAccessRights GET /clients/{id}/service-clients/{sc_id}/access-rights get access rights for the selected service client.
ClientsApi RegisterClient PUT /clients/{id}/register register security server client
ClientsApi UnregisterClient PUT /clients/{id}/unregister unregister security server client
ClientsApi UpdateClient PATCH /clients/{id} update security server client information
DiagnosticsApi GetGlobalConfDiagnostics GET /diagnostics/globalconf view global configuration diagnostics information
DiagnosticsApi GetOcspRespondersDiagnostics GET /diagnostics/ocsp-responders view ocsp responders diagnostics information
DiagnosticsApi GetTimestampingServicesDiagnostics GET /diagnostics/timestamping-services view timestamping services diagnostics information
EndpointsApi AddEndpointServiceClients POST /endpoints/{id}/service-clients add access rights for given service clients to the selected endpoint
EndpointsApi DeleteEndpoint DELETE /endpoints/{id} delete endpoint
EndpointsApi DeleteEndpointServiceClients POST /endpoints/{id}/service-clients/delete remove access rights from specified service clients to the selected endpoint
EndpointsApi GetEndpoint GET /endpoints/{id} Get an endpoint by its id
EndpointsApi GetEndpointServiceClients GET /endpoints/{id}/service-clients get service clients who have access rights for the selected endpoint
EndpointsApi UpdateEndpoint PATCH /endpoints/{id} Update an endpoint
InitializationApi GetInitializationStatus GET /initialization/status Check the initialization status of the Security Server
InitializationApi InitSecurityServer POST /initialization Initialize a new security server with the provided initial configuration
KeysApi DeleteCsr DELETE /keys/{id}/csrs/{csr_id} delete csr from the selected key
KeysApi DeleteKey DELETE /keys/{id} delete key
KeysApi DownloadCsr GET /keys/{id}/csrs/{csr_id} download a CSR binary
KeysApi GenerateCsr POST /keys/{id}/csrs generate csr for the selected key
KeysApi GetKey GET /keys/{id} get information for the selected key in selected token
KeysApi GetPossibleActionsForCsr GET /keys/{id}/csrs/{csr_id}/possible-actions get possible actions for one csr
KeysApi GetPossibleActionsForKey GET /keys/{id}/possible-actions get possible actions for one key
KeysApi UpdateKey PATCH /keys/{id} update key information
LanguageApi Language PUT /language/{code} change language
LocalGroupsApi AddLocalGroupMember POST /local-groups/{group_id}/members add new member for the local group
LocalGroupsApi DeleteLocalGroup DELETE /local-groups/{group_id} delete local group
LocalGroupsApi DeleteLocalGroupMember POST /local-groups/{group_id}/members/delete delete member from local group
LocalGroupsApi GetLocalGroup GET /local-groups/{group_id} get local group information
LocalGroupsApi UpdateLocalGroup PATCH /local-groups/{group_id} update local group information
MemberClassesApi GetMemberClasses GET /member-classes get list of known member classes
MemberClassesApi GetMemberClassesForInstance GET /member-classes/{id} get list of known member classes for a given instance
MemberNamesApi FindMemberName GET /member-names find member name by member class and member code
OpenapiApi DownloadOpenApi GET /openapi.yaml download security server's openapi definition
SecurityServersApi GetSecurityServer GET /security-servers/{id} get security server information
SecurityServersApi GetSecurityServers GET /security-servers get all security servers
ServiceDescriptionsApi DeleteServiceDescription DELETE /service-descriptions/{id} delete service description
ServiceDescriptionsApi DisableServiceDescription PUT /service-descriptions/{id}/disable disable selected service description
ServiceDescriptionsApi EnableServiceDescription PUT /service-descriptions/{id}/enable enable selected service description
ServiceDescriptionsApi GetServiceDescription GET /service-descriptions/{id} get service description with provided id
ServiceDescriptionsApi GetServiceDescriptionServices GET /service-descriptions/{id}/services get services for the selected service description
ServiceDescriptionsApi RefreshServiceDescription PUT /service-descriptions/{id}/refresh refresh selected service description
ServiceDescriptionsApi UpdateServiceDescription PATCH /service-descriptions/{id} update url or service code for the selected service description
ServicesApi AddEndpoint POST /services/{id}/endpoints create endpoint
ServicesApi AddServiceServiceClients POST /services/{id}/service-clients add access rights to selected service for new ServiceClients
ServicesApi DeleteServiceServiceClients POST /services/{id}/service-clients/delete remove access to selected service from given ServiceClients
ServicesApi GetService GET /services/{id} get service
ServicesApi GetServiceServiceClients GET /services/{id}/service-clients get service clients who have access rights for the selected service
ServicesApi UpdateService PATCH /services/{id} update service
SystemApi AddConfiguredTimestampingService POST /system/timestamping-services add a configured timestamping service
SystemApi DeleteConfiguredTimestampingService POST /system/timestamping-services/delete delete configured timestamping service
SystemApi DownloadAnchor GET /system/anchor/download download configuration anchor information
SystemApi DownloadSystemCertificate GET /system/certificate/export download the security server certificate as gzip compressed tar archive
SystemApi GenerateSystemCertificateRequest POST /system/certificate/csr generate new certificate request
SystemApi GenerateSystemTlsKeyAndCertificate POST /system/certificate generate a new internal TLS key and cert
SystemApi GetAnchor GET /system/anchor view the configuration anchor information
SystemApi GetConfiguredTimestampingServices GET /system/timestamping-services view the configured timestamping services
SystemApi GetNodeType GET /system/node-type get the node type
SystemApi GetSystemCertificate GET /system/certificate view the security server certificate information
SystemApi ImportSystemCertificate POST /system/certificate/import import new internal TLS certificate.
SystemApi PreviewAnchor POST /system/anchor/previews Read and the configuration anchor file and return the hash for a preview.
SystemApi ReplaceAnchor PUT /system/anchor Upload a configuration anchor file to replace an existing one.
SystemApi SystemVersion GET /system/version get information for the system version
SystemApi UploadInitialAnchor POST /system/anchor Upload a new configuration anchor file when initializing a new security server.
TimestampingServicesApi GetApprovedTimestampingServices GET /timestamping-services view the approved timestamping services
TokenCertificatesApi ActivateCertificate PUT /token-certificates/{hash}/activate activate certificate
TokenCertificatesApi DeleteCertificate DELETE /token-certificates/{hash} delete certificate
TokenCertificatesApi DisableCertificate PUT /token-certificates/{hash}/disable deactivate certificate
TokenCertificatesApi GetCertificate GET /token-certificates/{hash} get certificate information
TokenCertificatesApi GetPossibleActionsForCertificate GET /token-certificates/{hash}/possible-actions get possible actions for one certificate
TokenCertificatesApi ImportCertificate POST /token-certificates import new certificate
TokenCertificatesApi ImportCertificateFromToken POST /token-certificates/{hash}/import import an existing certificate from a token by cert hash
TokenCertificatesApi MarkAuthCertForDeletion PUT /token-certificates/{hash}/mark-for-deletion marks an auth certificate for deletion
TokenCertificatesApi RegisterCertificate PUT /token-certificates/{hash}/register register certificate
TokenCertificatesApi UnregisterAuthCertificate PUT /token-certificates/{hash}/unregister unregister authentication certificate
TokensApi AddKey POST /tokens/{id}/keys add new key
TokensApi AddKeyAndCsr POST /tokens/{id}/keys-with-csrs add a new key and generate a csr for it
TokensApi GetToken GET /tokens/{id} get security server token information
TokensApi GetTokens GET /tokens get security server tokens
TokensApi LoginToken PUT /tokens/{id}/login login to token
TokensApi LogoutToken PUT /tokens/{id}/logout logout from token
TokensApi UpdateToken PATCH /tokens/{id} update security server token information
TokensApi UpdateTokenPin PUT /tokens/{id}/pin update security server software token pin code
UserApi GetUser GET /user get user data for the logged user
XroadInstancesApi GetXroadInstances GET /xroad-instances get list of known xroad instance identifiers

<a name="documentation-for-models"></a>

Documentation for Models

Integration with official x-road documentation

Feel free to contribute!
Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
Compatible target framework(s)
Additional computed target framework(s)
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.2 315 4/17/2022
1.0.1 284 4/17/2022
1.0.0 271 4/2/2022

Minor update