RipeClient 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package RipeClient --version 1.1.0
                    
NuGet\Install-Package RipeClient -Version 1.1.0
                    
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="RipeClient" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RipeClient" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="RipeClient" />
                    
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 RipeClient --version 1.1.0
                    
#r "nuget: RipeClient, 1.1.0"
                    
#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 RipeClient@1.1.0
                    
#: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=RipeClient&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=RipeClient&version=1.1.0
                    
Install as a Cake Tool

ripeclient

.NET Core RIPE Database client

Build status master: .NET

Installation

dotnet add package RipeClient

Quick Start

var ripe = new RipeClient(new RipeSecureLocation(),
            new RipeClientAuthAnonymous());

var result = await ripe.Search(new RipeSearchRequest(request.Prefix, TypeFilter.Inetnum));

screenshot

Authentication

The RIPE Database supports multiple authentication methods. Choose the appropriate method based on your use case.

Anonymous Authentication

Use anonymous authentication for public read-only operations such as searching the database.

var auth = new RipeClientAuthAnonymous();
var client = new RipeClient(new RipeSecureLocation(), auth);

// Search for objects
var results = await client.Search(
    new RipeSearchRequest("192.0.2.0/24", TypeFilter.Inetnum)
);

Password Authentication

Traditional authentication method using password query parameter. The password is sent as a query string parameter (?password=xxx).

var auth = new RipeClientAuthPassword("your-password");
var client = new RipeClient(new RipeSecureLocation(), auth);

// Create a new person object
var person = new Person();
person["person"] = "John Doe";
person["address"] = "123 Main St";
person["phone"] = "+1-234-567-8900";
person["nic-hdl"] = "AUTO-1";
person["mnt-by"] = "YOUR-MNT";
person["source"] = "RIPE";

await client.AddObject(person);

API Key Authentication

Modern authentication method using the X-API-Key HTTP header. This is the recommended method for automated systems and applications.

How to get an API key:

  1. Log in to your RIPE NCC Access account
  2. Navigate to API Keys management
  3. Create a new API key with appropriate permissions
var auth = new RipeClientAuthApiKey("your-api-key-here");
var client = new RipeClient(new RipeSecureLocation(), auth);

// Update an existing object
var route = await client.GetObjectByKey("192.0.2.0/24", "route", "ripe");
route["descr"] = "Updated description";

await client.UpdateObject(route);

Advantages of API Key authentication:

  • More secure than password authentication
  • Can be easily revoked without changing your account password
  • Supports fine-grained permissions
  • Recommended by RIPE NCC for API access

Basic Authentication

HTTP Basic Authentication sends credentials as a Base64-encoded username:password in the Authorization header.

var auth = new RipeClientAuthBasic("username", "password");
var client = new RipeClient(new RipeSecureLocation(), auth);

// Delete an object
var objectToDelete = await client.GetObjectByKey("PP1-RIPE", "person", "ripe");
await client.RemoveObject(objectToDelete);

Advanced Examples

Searching with Multiple Filters

var auth = new RipeClientAuthAnonymous();
var client = new RipeClient(new RipeSecureLocation(), auth);

// Search for both IPv4 and IPv6 routes
var request = new RipeSearchRequest("AS64512");
request.AddFilter(TypeFilter.Route | TypeFilter.Route6);

var results = await client.Search(request);

Search with Flags

// Find one level more specific
var request = new RipeSearchRequest("192.0.2.0/24", TypeFilter.Inetnum);
request.AddFlag(RipeSearchRequestFlags.OneMore);

var results = await client.Search(request);

HTTP Debugging

Enable HTTP request/response debugging to troubleshoot API calls:

var client = new RipeClient(new RipeSecureLocation(), auth);
client.Debug = true; // Logs all HTTP traffic to console

var results = await client.Search(request);

Authentication Method Comparison

Method Use Case Security Sent Via
Anonymous Public searches N/A None
Password Legacy systems, manual operations Low Query parameter
API Key Automated systems, applications High HTTP Header (X-API-Key)
Basic Auth Systems requiring standard auth Medium HTTP Header (Authorization)

Recommendation: Use API Key authentication for production applications and automated systems. Use Anonymous for read-only operations.

Features

  • Full CRUD operations for RIPE Database objects
  • Multiple authentication methods (Anonymous, Password, API Key, Basic)
  • Async/await support
  • Type-safe search filters
  • HTTP request/response debugging
  • LIR Resources client
  • RPKI client for ROA management

Documentation

For more information about RIPE Database API:

Product Compatible and additional computed target framework versions.
.NET 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. 
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.