forked from zapadi/redmine-net-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Add user to group
alinach edited this page May 16, 2016
·
7 revisions
Adds an existing user to a group.
Parameters:
user_id (required): id of the user to add to the group.
Sync Example:
using System;
using Redmine.Net.Api;
using Redmine.Net.Api.Types;
namespace RedmineTest
{
class Program
{
static void Main(string[] args)
{
string host = "<host>";
string apiKey = "<api-key>";
var manager = new RedmineManager(host, apiKey);
int groupId = <group-id>;
int userId = <user-id-to-be-added>;
manager.AddUserToGroup(groupId, userId);
var group = manager.GetObject<Group>(groupId,
new NameValueCollection() { { RedmineKeys.INCLUDE, RedmineKeys.USERS } });
Console.WriteLine("Group with added user: {0}.", group);
}
}
}
Async Example:
...
await manager.AddUserToGroupAsync(groupId, userId);
...
- Introduction
- Authentication
- User impersonation
- Using proxy
- CRUD Operations
- List Operations
- Specific operations
- Attachments - Upload file - Download file
- Issues - Add watcher to issue - Remove watcher from issue
- Users - Get current user
- Groups - Add user to group - Remove user from group
- Wiki pages - Get wiki page - Get all wiki pages - Create/Update wiki page - Delete wiki page