1. Products
  2.   Project Management
  3.   .NET
  4.   Redmine-NET-API
 
  

Free C# .NET Project Management API to Handle MS Project MPP & MPX Files

Open Source C# .NET Library for Communicating with a Redmine Project Management Application. It Automate tTasks, Generating Insightful Reports, or Customizing Workflows in .NET apps.

In the world of project management, Redmine has established itself as a versatile and robust tool. It is an open-source project management tool, has long been a favorite among teams for its robust features and flexibility. To enhance its capabilities, software developers have contributed various plugins and libraries, one of which is the Redmine-Net-API. This library, available on GitHub and extends its functionality by providing a .NET API for seamless integration with .NET applications.

The Redmine-Net-API library is a .NET wrapper for the Redmine REST API, designed to simplify interaction with Redmine servers from .NET applications. Developed by zapadi, the library is actively maintained and has gained popularity among developers for its ease of use and comprehensive functionality. With its support for custom queries and attributes, the library empowers users to tailor Redmine to their specific requirements, whether it's implementing unique workflows, adding custom fields, or automating complex business processes.

The Redmine-Net-API library opens up new possibilities for software developers looking to integrate Redmine functionality into their .NET applications. Software Developers can utilize the library to log time entries for issues, making it easier to track and manage project-related activities and resources. It emerges as a powerful tool for enhancing the capabilities of Redmine and streamlining project management workflows. Its easy integration, object-oriented design, rich feature set, intuitive AP and support for the full range of Redmine's REST API makes it a valuable tool for streamlining project management tasks.

Previous Next

Getting Started with Redmine-Net-API

The recommend way to install Redmine-Net-API is via NuGet. Please use the following commands for a smooth installation.

Install Aspose.Tasks for .NET via NuGet

Install-Package redmine-net-api

You can download the directly from GitHub page

Create a New Project in Redmine via C#

The open source Redmine-Net-API library makes it easy for software developers to create a new project inside Redmine using .NET API. First you need to initialize the RedmineManager with your Redmine server URL and authentication credentials. Then, you can create a new Project object with the desired parameters and use the CreateObject method to add it to your Redmine instance. The following example shows how to create a new project. After running the code a new project will be created in your Redmine instance with the specified details, and the ID of the newly created project will be displayed in the console output.

How to Create a New Project inside Redmine using C# .NET API?

using Redmine.Net.Api;
using Redmine.Net.Api.Types;

class Program
{
    static void Main(string[] args)
    {
        // Initialize RedmineManager with server URL and API key
        var redmineManager = new RedmineManager("https://redmine.example.com", "your_api_key");

        // Create a new project object
        var newProject = new Project
        {
            Name = "New Project",                      // Set the name of the new project
            Identifier = "new-project",                // Set a unique identifier for the project
            Description = "This is a new project.",    // Set the description of the project
            IsPublic = true,                           // Set whether the project is public or private
            TrackerIds = new List { 1, 2, 3 },    // Set the tracker IDs for the project (e.g., 1 for bug, 2 for feature, 3 for support)
            IssueCustomFieldValues = new List // Set custom field values for the project, if any
            {
                new IssueCustomField { Id = 1, Value = "Custom Value 1" },
                new IssueCustomField { Id = 2, Value = "Custom Value 2" }
            }
        };

        try
        {
            // Create the new project
            Project createdProject = redmineManager.CreateObject(newProject);

            // Output the ID of the newly created project
            Console.WriteLine($"New project created with ID: {createdProject.Id}");
        }
        catch (RedmineException ex)
        {
            // Handle any errors that occur during project creation
            Console.WriteLine($"Error creating project: {ex.Message}");
        }
    }
}

Retrieving List of Existing Redmine Projects via C#

Retrieving a list of existing projects from Redmine using the open source Redmine-Net-API library is straightforward inside .NET applications. You need to initialize the RedmineManager with your Redmine server URL and authentication credentials, and then use the GetObjects method to fetch the projects. The following example demonstrates how developers can display details of each existing project in their Redmine instance, including its ID, name, description, and whether it is public or private.

How to Retrieve List of Existing Redmine Projects via C# API

using Redmine.Net.Api;
using Redmine.Net.Api.Types;
using System;

class Program
{
    static void Main(string[] args)
    {
        // Initialize RedmineManager with server URL and API key
        var redmineManager = new RedmineManager("https://redmine.example.com", "your_api_key");

        try
        {
            // Retrieve a list of projects from Redmine
            var projects = redmineManager.GetObjects();

            // Output details of each project
            foreach (var project in projects)
            {
                Console.WriteLine($"Project ID: {project.Id}");
                Console.WriteLine($"Project Name: {project.Name}");
                Console.WriteLine($"Project Description: {project.Description}");
                Console.WriteLine($"Is Project Public: {project.IsPublic}");
                Console.WriteLine();
            }
        }
        catch (RedmineException ex)
        {
            // Handle any errors that occur during project retrieval
            Console.WriteLine($"Error retrieving projects: {ex.Message}");
        }
    }
}
           

Object-Oriented Design & Security

One of the strengths of the Redmine-Net-API lies in its object-oriented design. It abstracts the underlying REST API calls into a set of intuitive and easy-to-use classes, making it more developer-friendly and reducing the complexity of interacting with Redmine. Moreover, the library supports various authentication methods, ensuring secure communication between the .NET application and the Redmine server. This includes API key authentication and username/password authentication, allowing developers to choose the method that best suits their security requirements.