Solidtime.Api
1.0.73
dotnet add package Solidtime.Api --version 1.0.73
NuGet\Install-Package Solidtime.Api -Version 1.0.73
<PackageReference Include="Solidtime.Api" Version="1.0.73" />
<PackageVersion Include="Solidtime.Api" Version="1.0.73" />
<PackageReference Include="Solidtime.Api" />
paket add Solidtime.Api --version 1.0.73
#r "nuget: Solidtime.Api, 1.0.73"
#:package Solidtime.Api@1.0.73
#addin nuget:?package=Solidtime.Api&version=1.0.73
#tool nuget:?package=Solidtime.Api&version=1.0.73
Solidtime.Api NuGet Package
Need help with APIs or .NET? Panoramic Data are experts in APIs and .NET, and we can help with your development. Contact us or see our software services.
Supports .NET 11.0.
Description
A .NET 11.0 client library for the Solidtime API.
Solidtime is a modern, open-source time tracking solution with comprehensive project management, time tracking, reporting, and team collaboration features.
This library provides strongly-typed access to the Solidtime API v1 with full support for:
- API Tokens - Personal access token management
- Users - User profile and current user information
- Organizations - Organization management and settings
- Clients - Client management with pagination
- Projects - Project management with archiving support
- Project Members - Project member and billing rate management
- Tags - Tag management with pagination
- Tasks - Task management
- Time Entries - Full time tracking with start/stop timer support
- Members - Organization member management
- Reports - Report generation and management
- Charts - Data visualization endpoints
- Imports - Data import from other time tracking tools
Installation
dotnet add package Solidtime.Api
Or via Package Manager:
Install-Package Solidtime.Api
Quick Start
using Solidtime.Api;
// Create a client with your API token
var client = new SolidtimeClient(new SolidtimeClientOptions
{
ApiToken = "your-api-token-here"
});
// Get current user information
var me = await client.Me.GetAsync(CancellationToken.None);
Console.WriteLine($"Hello, {me.Data.Name}!");
// Get an organization (you need to know your organization ID)
var organizationId = "your-organization-uuid";
var organization = await client.Organizations.GetAsync(organizationId, CancellationToken.None);
Console.WriteLine($"Organization: {organization.Data.Name}");
// Get projects for an organization
var projects = await client.Projects.GetAsync(organizationId, null, null, CancellationToken.None);
foreach (var project in projects.Data)
{
Console.WriteLine($"Project: {project.Name}");
}
Authentication
Solidtime API uses Bearer token authentication (Personal Access Tokens). You can create an API token in your Solidtime account settings.
var options = new SolidtimeClientOptions
{
ApiToken = "your-api-token",
TimeoutSeconds = 30 // Optional, default is 30
};
var client = new SolidtimeClient(options);
API Coverage
This library provides access to all Solidtime API v1 endpoints:
- API Tokens - Manage personal access tokens
- Users - User management and current user information
- Organizations - Organization management and settings
- Clients - Client management
- Projects - Project management and archiving
- Project Members - Project member management
- Tags - Tag management
- Tasks - Task management
- Time Entries - Time entry management and tracking
- Members - Organization member management
- Reports - Report generation and management
- Charts - Data visualization
- Imports - Import data from other time tracking tools
Usage Examples
Managing Projects
// Create a project
var newProject = await client.Projects.CreateAsync(
organizationId,
new ProjectStoreRequest
{
Name = "My New Project",
Color = "#3498db",
IsBillable = true,
ClientId = clientId // optional
},
CancellationToken.None);
// Update a project
var updatedProject = await client.Projects.UpdateAsync(
organizationId,
projectId,
new ProjectUpdateRequest
{
Name = "Updated Project Name",
IsArchived = false
},
CancellationToken.None);
// Get all projects
var projects = await client.Projects.GetAsync(
organizationId,
page: 1,
archived: null,
CancellationToken.None);
Time Tracking
// Start a time entry
var timeEntry = await client.TimeEntries.CreateAsync(
organizationId,
new TimeEntryStoreRequest
{
ProjectId = projectId,
TaskId = taskId, // optional
Description = "Working on feature X",
Start = DateTimeOffset.UtcNow,
Tags = new[] { tagId } // optional
},
CancellationToken.None);
// Stop a time entry
var stoppedEntry = await client.TimeEntries.UpdateAsync(
organizationId,
timeEntry.Data.Id,
new TimeEntryUpdateRequest
{
End = DateTimeOffset.UtcNow
},
CancellationToken.None);
Managing Clients
// Create a client
var newClient = await client.Clients.CreateAsync(
organizationId,
new ClientStoreRequest
{
Name = "Acme Corporation"
},
CancellationToken.None);
// List all clients
var clients = await client.Clients.GetAsync(
organizationId,
page: null,
archived: null,
CancellationToken.None);
Error Handling
The library throws SolidtimeApiException for API errors:
try
{
var project = await client.Projects.GetByIdAsync(orgId, projectId, CancellationToken.None);
}
catch (SolidtimeApiException ex)
{
Console.WriteLine($"API Error: {ex.Message}");
Console.WriteLine($"Status Code: {ex.StatusCode}");
}
Configuration
Base URL
By default, the client uses https://app.solidtime.io/api. You can override this:
var options = new SolidtimeClientOptions
{
ApiToken = "your-token",
BaseUrl = "https://your-instance.solidtime.io/api"
};
Logging
The client supports Microsoft.Extensions.Logging:
var logger = loggerFactory.CreateLogger<SolidtimeClient>();
var options = new SolidtimeClientOptions
{
ApiToken = "your-token",
Logger = logger
};
Contributing
This project is developed using:
- Refit for declarative HTTP client interfaces
- System.Text.Json for JSON serialization
- XUnit 3 and AwesomeAssertions for testing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for your changes
- Ensure all tests pass
- Submit a pull request
Refer to the Solidtime API documentation for endpoint details: https://docs.solidtime.io/api-reference
Running Tests
The test project requires configuration via user secrets. Set up your test environment:
Step 1: Find Your Organization ID
We've included a helper script to guide you:
# Run the helper script (it will prompt for your API token)
.\GetOrganizationId.ps1
# Or provide the token directly
.\GetOrganizationId.ps1 -ApiToken "your-api-token"
Alternatively, find it manually:
- Log into Solidtime at https://app.solidtime.io
- Look at the URL in your browser
- The URL will be:
https://app.solidtime.io/teams/{YOUR-ORGANIZATION-ID}/... - Copy the UUID from the URL (the part after
/teams/) - Note: The Solidtime UI uses "teams" in the URL path, but the API uses "organizations"
Step 2: Configure User Secrets
cd Solidtime.Api.Test
# Set your API token (required)
dotnet user-secrets set "Configuration:ApiToken" "your-api-token"
# Set your organization ID (required for most tests)
dotnet user-secrets set "Configuration:SampleOrganizationId" "your-organization-uuid"
# Optional: Set sample IDs to speed up tests
dotnet user-secrets set "Configuration:SampleProjectId" "project-uuid"
dotnet user-secrets set "Configuration:SampleClientId" "client-uuid"
Step 3: Run Tests
dotnet test
Publishing to NuGet (Maintainers Only)
This repository includes a PowerShell script for publishing packages to NuGet.org:
- Create a file named
nuget-key.txtin the solution root containing your NuGet API key- Get your API key from: https://www.nuget.org/account/apikeys
- This file is .gitignored and will not be committed
- Run the publish script:
# Run all tests and publish .\Publish.ps1 # Skip tests and publish (not recommended) .\Publish.ps1 -SkipTests # Publish a Debug build (not recommended for production) .\Publish.ps1 -Configuration Debug
The script will:
- ? Clean and restore the project
- ? Build in Release configuration
- ? Run all unit tests (unless -SkipTests is specified)
- ? Pack the NuGet package with symbols
- ? Publish to NuGet.org automatically
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built by Panoramic Data Limited
- Solidtime API documentation: https://docs.solidtime.io/api-reference
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Refit (>= 16.4.0)
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.73 | 48 | 11/15/2026 |
| 1.0.64 | 73 | 11/10/2026 |
| 1.0.40 | 132 | 9/14/2026 |
| 1.0.39 | 108 | 9/13/2026 |
| 1.0.36 | 124 | 9/9/2026 |
| 1.0.20 | 147 | 6/7/2026 |
| 1.0.19 | 138 | 4/16/2026 |
| 1.0.15 | 136 | 3/29/2026 |
| 1.0.12 | 483 | 12/10/2025 |
| 1.0.11 | 475 | 12/9/2025 |
| 1.0.2 | 242 | 12/4/2025 |
| 1.0.1 | 236 | 12/4/2025 |
| 0.1.6-beta | 227 | 12/4/2025 |
| 0.1.1-beta | 239 | 12/3/2025 |
Initial release of Solidtime.Api client library for .NET 10.
Provides strongly-typed access to the Solidtime time tracking API.