Pescheck.Client 0.4.3

dotnet add package Pescheck.Client --version 0.4.3
                    
NuGet\Install-Package Pescheck.Client -Version 0.4.3
                    
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="Pescheck.Client" Version="0.4.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pescheck.Client" Version="0.4.3" />
                    
Directory.Packages.props
<PackageReference Include="Pescheck.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Pescheck.Client --version 0.4.3
                    
#r "nuget: Pescheck.Client, 0.4.3"
                    
#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.
#:package Pescheck.Client@0.4.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Pescheck.Client&version=0.4.3
                    
Install as a Cake Addin
#tool nuget:?package=Pescheck.Client&version=0.4.3
                    
Install as a Cake Tool

Official Pescheck API client - part of the pescheck-clients SDKs.

Pescheck.Client - the C# library for the Pescheck API

Official client library for the Pescheck API (v2), generated from the OpenAPI specification. Authenticate with OAuth2 client credentials and use the checks, profiles, screenings, webhooks and divisions endpoints. See https://github.com/pescheckit/pescheck-clients for installation and usage.

This C# SDK is automatically generated by the OpenAPI Generator project:

  • API version: 2.0.0
  • SDK version: 0.1.0
  • Generator version: 7.23.0
  • Build package: org.openapitools.codegen.languages.CSharpClientCodegen

<a id="frameworks-supported"></a>

Frameworks supported

<a id="dependencies"></a>

Dependencies

The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations

<a id="installation"></a>

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

using Pescheck.Client.Api;
using Pescheck.Client.Client;
using Pescheck.Client.Model;

<a id="packaging"></a>

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out Pescheck.Client.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

<a id="usage"></a>

Usage

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

Configuration c = new Configuration();
System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
c.Proxy = webProxy;

Connections

Each ApiClass (properly the ApiClient inside it) will create an instance of HttpClient. It will use that for the entire lifecycle and dispose it when called the Dispose method.

To better manager the connections it's a common practice to reuse the HttpClient and HttpClientHandler (see here for details). To use your own HttpClient instance just pass it to the ApiClass constructor.

HttpClientHandler yourHandler = new HttpClientHandler();
HttpClient yourHttpClient = new HttpClient(yourHandler);
var api = new YourApiClass(yourHttpClient, yourHandler);

If you want to use an HttpClient and don't have access to the handler, for example in a DI context in Asp.net Core when using IHttpClientFactory.

HttpClient yourHttpClient = new HttpClient();
var api = new YourApiClass(yourHttpClient);

You'll loose some configuration settings, the features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. You need to either manually handle those in your setup of the HttpClient or they won't be available.

Here an example of DI setup in a sample web project:

services.AddHttpClient<YourApiClass>(httpClient =>
   new PetApi(httpClient));

<a id="getting-started"></a>

Getting Started

using System.Collections.Generic;
using System.Diagnostics;
using System.Net.Http;
using Pescheck.Client.Api;
using Pescheck.Client.Client;
using Pescheck.Client.Model;

namespace Example
{
    public class Example
    {
        public static void Main()
        {

            Configuration config = new Configuration();
            config.BasePath = "https://api.pescheck.io";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            // create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
            HttpClient httpClient = new HttpClient();
            HttpClientHandler httpClientHandler = new HttpClientHandler();
            var apiInstance = new AuthenticationApi(httpClient, config, httpClientHandler);
            var jWTGeneration = new JWTGeneration(); // JWTGeneration | 

            try
            {
                JWTResponse result = apiInstance.GenerateJWTToken2(jWTGeneration);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling AuthenticationApi.GenerateJWTToken2: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }

        }
    }
}

<a id="documentation-for-api-endpoints"></a>

Documentation for API Endpoints

All URIs are relative to https://api.pescheck.io

Class Method HTTP request Description
AuthenticationApi GenerateJWTToken2 POST /api/v2/jwt/generate/
AuthenticationApi JwtCreate POST /api/jwt/
AuthenticationApi JwtRefreshCreate POST /api/jwt/refresh/
ChecksApi V2ChecksList GET /api/v2/checks/
ChecksApi V2ChecksRetrieve GET /api/v2/checks/{check_type}/
DivisionsApi V2OrganisationsDivisionsCreate POST /api/v2/organisations/divisions/
DivisionsApi V2OrganisationsDivisionsList GET /api/v2/organisations/divisions/
DivisionsApi V2OrganisationsDivisionsPartialUpdate PATCH /api/v2/organisations/divisions/{id}/
DivisionsApi V2OrganisationsDivisionsRetrieve GET /api/v2/organisations/divisions/{id}/
DivisionsApi V2OrganisationsDivisionsUpdate PUT /api/v2/organisations/divisions/{id}/
OAuthApi CreateOAuthApplication2 POST /api/v2/oauth/applications/
OAuthApi DeleteOAuthApplication2 DELETE /api/v2/oauth/applications/{application_id}/
OAuthApi ListOAuthApplications2 GET /api/v2/oauth/applications/list/
ProfilesApi V2ProfilesCreate POST /api/v2/profiles/
ProfilesApi V2ProfilesDestroy DELETE /api/v2/profiles/{id}/
ProfilesApi V2ProfilesList GET /api/v2/profiles/
ProfilesApi V2ProfilesPartialUpdate PATCH /api/v2/profiles/{id}/
ProfilesApi V2ProfilesRetrieve GET /api/v2/profiles/{id}/
ProfilesApi V2ProfilesUpdate PUT /api/v2/profiles/{id}/
ScreeningsApi V2ScreeningsCreate POST /api/v2/screenings/
ScreeningsApi V2ScreeningsDocumentsList GET /api/v2/screenings/{id}/documents/ Retrieve screening documents
ScreeningsApi V2ScreeningsList GET /api/v2/screenings/
ScreeningsApi V2ScreeningsRetrieve GET /api/v2/screenings/{id}/
WebhooksApi CreateWebhook2 POST /api/v2/webhooks/
WebhooksApi DeleteWebhook2 DELETE /api/v2/webhooks/{webhook_id}/
WebhooksApi ListWebhooks2 GET /api/v2/webhooks/list/
WebhooksApi VerifyWebhook2 POST /api/v2/webhooks/{webhook_id}/verify/

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

Documentation for Models

<a id="documentation-for-authorization"></a>

Documentation for Authorization

Authentication schemes defined for the API: <a id="cookieAuth"></a>

cookieAuth

  • Type: API key
  • API key parameter name: __Secure-sessionid
  • Location:

<a id="jwtAuth"></a>

jwtAuth

  • Type: Bearer Authentication

<a id="oauth2"></a>

oauth2

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
    • read:api: read groups
    • create:api: create groups
    • update:api: update groups
Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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. 
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
0.4.3 112 7/14/2026
0.4.2 119 6/29/2026
0.4.1 104 6/29/2026
0.4.0 104 6/29/2026
0.2.1 102 6/29/2026
0.2.0 107 6/29/2026
0.1.0 101 6/29/2026
0.0.6 108 6/29/2026
0.0.5 102 6/29/2026
0.0.4 112 6/29/2026

Minor update