.NET Standard 1.3 Library to access YouTrack API.
For more information on YouTrack visit jetbrains.com/youtrack.
First of all, install YouTrackSharp
into your project using a NuGet client.
Install-Package YouTrackSharp
If you want to work with pre-release builds, configure our MyGet feed as a package source.
To communicate with a YouTrack server instance, we'll need a connection. It is recommended to always use permanent tokens to authenticate against YouTrack, using the BearerTokenConnection
. For YouTrack instances that do not have token support, UsernamePasswordConnection
can be used.
var connection = new BearerTokenConnection("https://ytsharp.myjetbrains.com/youtrack/", "perm:abcdefghijklmn");
// or:
var connection = new UsernamePasswordConnection("https://ytsharp.myjetbrains.com/youtrack/", "username", "password");
Once a connection is made, various services can be used. For example to get a list of projects the user has access to, the ProjectsService
can be used:
var projectsService = new connection.CreateProjectsService();
var projectsForCurrentUser = await projectsService.GetAccessibleProjects();
Other services are available as well, mapping to the YouTrack REST API endpoints and operations that are available.
YouTrackSharp is a .NET Library to access the YouTrack API. Main features:
- Targets .NET Standard 1.3 - can be used with pretty much any .NET platform!
- All calls are
async
all the way. - Handles serialization of YouTrack's timestamps into
DateTime
where possible. - Authentication using permanent tokens. For YouTrack instances that do not have token support, username/password can be used.
- Comes with a color indices list.
The following API's are currently supported:
- User-related methods through
UserService
- Projects-related methods through
ProjectsService
- Issues-related methods through
IssuesService
- Time-tracking-related methods through
TimeTrackingService
- Administration API's
- User management through
UserManagementService
- Time Tracker management through
TimeTrackingManagementService
- User management through
Many other API's are not included yet - feel free to tackle one of the UpForGrabs
issues and make YouTrackSharp better!
YouTrack versions 2017.x and higher as well as YouTrack InCloud are officially supported by this library.
Some features will work with older versions of YouTrack as well but they are not officially suppported. For other YouTrack versions:
- YouTrack Standalone 7.0 - use the 2.x branch or YouTrackSharp 2.x
- YouTrack Standalone 6.5 - use the 2.x branch or YouTrackSharp 2.x
- YouTrack Standalone 6.0 - use the 2.x branch or YouTrackSharp 2.x
- YouTrack Standalone 5.x - use the 2.x branch or YouTrackSharp 2.x
- YouTrack Standalone 4.x - use the 2.x branch or YouTrackSharp 2.x
- YouTrack Standalone 3.x - use the 1.x branch or YouTrackSharp 1.x
Be aware that these older branches are frozen and bug fixes nor new feature development is done on them.