Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Add user permission

Description

Add a user permission for a service.

Package Details

Interface

IUserServicePermissionManager

Syntax

await UserServicePermissionManager.Add(UserServicePermission);

Returns

Task<UserServicePermission>

API

POST
/api/v1/users/{id}/permissions

Parameters

Path
Id: The user's id

Request Body
{
"PermissionId": 0,
"ServiceId": 0,
"OrganizationId": 0
}

Returns

200 OK - User Service Permission

Example

const int userId = 2757;
const int serviceId = 2;
const int permissionId = 3;
const int organizationId = 9999;
var newUserServicePermission = new UserServicePermission
{
PermissionId = permissionId,
UserId = userId,
ServiceId = serviceId,
OrganizationId = organization2Id
};
var userServicePermission = await _userServicePermissionManager.Add(newUserServicePermission);

  • No labels