EpicMorg.Atlassian.Downloader 1.0.0.3

dotnet add package EpicMorg.Atlassian.Downloader --version 1.0.0.3
                    
NuGet\Install-Package EpicMorg.Atlassian.Downloader -Version 1.0.0.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="EpicMorg.Atlassian.Downloader" Version="1.0.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EpicMorg.Atlassian.Downloader" Version="1.0.0.3" />
                    
Directory.Packages.props
<PackageReference Include="EpicMorg.Atlassian.Downloader" />
                    
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 EpicMorg.Atlassian.Downloader --version 1.0.0.3
                    
#r "nuget: EpicMorg.Atlassian.Downloader, 1.0.0.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 EpicMorg.Atlassian.Downloader@1.0.0.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=EpicMorg.Atlassian.Downloader&version=1.0.0.3
                    
Install as a Cake Addin
#tool nuget:?package=EpicMorg.Atlassian.Downloader&version=1.0.0.3
                    
Install as a Cake Tool

EpicMorg.Atlassian.Downloader

NuGet Version

EpicMorg.Atlassian.Downloader is a modern .NET library for programmatically downloading Atlassian Server/Data Center products and Marketplace plugins. It provides a simple, asynchronous API to handle interactions with Atlassian's download services, including paginated endpoints and artifact resolution.

This library is the core engine for the Atlassian Downloader console utility.


Installation

Install the library via the NuGet package manager.

dotnet add package EpicMorg.Atlassian.Downloader

Usage

The primary entry point for the library is the AtlassianClient class. It's designed to be used with dependency injection and IHttpClientFactory for proper HttpClient management.

1. Setup (Dependency Injection)

In your Program.cs or startup configuration, register the AtlassianClient.

using EpicMorg.Atlassian.Downloader.Core;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var host = Host.CreateDefaultBuilder(args)
    .ConfigureServices((context, services) =>
    {
        // Register the AtlassianClient and configure HttpClient for it
        services.AddHttpClient<AtlassianClient>();

        // Register your other application services
        // services.AddHostedService<MyWorker>();
    })
    .Build();

2. Creating Settings

All download operations require a DownloaderSettings object to configure their behavior.

using EpicMorg.Atlassian.Downloader.Core.Models;

var settings = new DownloaderSettings
{
    OutputDir = "C:\\atlassian-archive",
    SkipFileCheck = false,
    MaxRetries = 5,
    DelayBetweenRetries = 3000,
    UserAgent = "My-Awesome-App/1.0"
};

3. API and Examples

Once you have an instance of AtlassianClient (injected by your DI container), you can call its public methods.

DownloadPluginAsync

Downloads all available Server/Data Center versions of a specific Marketplace plugin. It automatically handles pagination, determines compatibility, creates an organized folder structure, and generates a readme.md for each version.

Signature:

Task DownloadPluginAsync(string pluginId, DownloaderSettings settings, CancellationToken cancellationToken = default)

Example:
using EpicMorg.Atlassian.Downloader.Core;
using Microsoft.Extensions.DependencyInjection; // For GetRequiredService

// Get the client from your DI container
var atlassianClient = host.Services.GetRequiredService<AtlassianClient>();

try
{
    string pluginId = "com.onresolve.jira.groovy.groovyrunner"; // Example: ScriptRunner for Jira
    await atlassianClient.DownloadPluginAsync(pluginId, settings);
    Console.WriteLine($"Successfully archived all versions of {pluginId}.");
}
catch (Exception ex)
{
    Console.WriteLine($"An error occurred: {ex.Message}");
}
DownloadProductsAsync

Downloads Atlassian products (like Jira, Confluence) from the official JSON data feeds.

Signature:
Task DownloadProductsAsync(DownloaderSettings settings, CancellationToken cancellationToken = default)

Example: You can specify ProductVersion and CustomFeed in the settings object to customize the download.

// Download a specific version of Confluence
var confluenceSettings = new DownloaderSettings
{
    OutputDir = "C:\\atlassian-archive",
    ProductVersion = "8.5.3",
    CustomFeed = new Uri[] { new Uri("[https://my.atlassian.com/download/feeds/current/confluence.json](https://my.atlassian.com/download/feeds/current/confluence.json)") }
};

try
{
    await atlassianClient.DownloadProductsAsync(confluenceSettings);
    Console.WriteLine("Confluence 8.5.3 download process completed.");
}
catch (Exception ex)
{
    Console.WriteLine($"An error occurred: {ex.Message}");
}
GetProductDataAsync & GetProductFeedUrls

These are lower-level methods for more granular control, allowing you to fetch product data without immediately downloading the files.

Signatures:
IReadOnlyList<string> GetProductFeedUrls(DownloaderSettings settings);

Task<(string json, IDictionary<string, ResponseItem[]> versions)> GetProductDataAsync(string feedUrl, DownloaderSettings settings, CancellationToken cancellationToken);

Example: Listing all available Jira versions without downloading.

var jiraSettings = new DownloaderSettings 
{ 
    OutputDir = "C:\\atlassian-archive",
    CustomFeed = new Uri[] { new Uri("[https://my.atlassian.com/download/feeds/current/jira-software.json](https://my.atlassian.com/download/feeds/current/jira-software.json)") }
};

var jiraFeed = atlassianClient.GetProductFeedUrls(jiraSettings).First();

var (_, versions) = await atlassianClient.GetProductDataAsync(jiraFeed, jiraSettings, CancellationToken.None);

Console.WriteLine($"--- Available Jira Software Versions ---");
foreach (var versionKey in versions.Keys)
{
    Console.WriteLine(versionKey);
}
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 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 is compatible.  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
1.0.0.3 205 11/23/2025
1.0.0.2 183 11/23/2025
1.0.0.1 199 10/2/2025
1.0.0 207 9/30/2025