Create a new managed Group Rule object targeted to Active Directory, Azure Active Directory or WORKGROUP computer.
HTTP Request
POST /computerManagedGroupRules
Request headers
Header | Value |
Authorization | If required by the Recast Agent Gateway configuration |
Key | Authentication key if required by Recast Agent Gateway configuration. Key can be passed also as URI parameter (like: /computerManagedGroupRules?Key=configuredkey) |
Accept | application/json |
Request Body
In the request body, supply a JSON representation for the managed Group Rule object.
Following table shows the properties that are required when you create the managed Group Rule (follow link for information about all properties and their data types and descriptions).
Property | Remarks |
DirectoryId | Use 1 for WORKGROUP computers. |
TargetType | |
TargetName | |
ManagedGroupId | 1 = Built-in local Administrators group 2 = Built-in local Users group 3 = Built-in local Guests group 4 = Built-in local Power Users group 5 = Built-in local Account Operators group 6 = Built-in local Server Operators group 7 = Built-in local Print Operators group 8 = Built-in local Backup Operators group 9 = Built-in local Remote Desktop Users group 10 = Built-in local Network Configuration Operators group |
MemberId | Use 1 for Active Directory or Azure Active Directory members. |
MemberAccount | Use also attribute MemberDomain if member is from Active Directory |
Enabled |
Response
If successful, this method returns a 201 Created response code and managed Group Rule object in the response body.
Example
Request
Here is an example of the request.
POST https://cgw.dns.domain/api/v1.0/computerManagedGroupRules
Content-Type: application/json
{
"DirectoryId": 2,
"TargetType": 3,
"TargetGuid": "91eba3a1-a803-4a22-b57f-94af33d1eda9",
"TargetName": "COMPUTER1",
"ManagedGroupId": 1,
"MemberId": 1,
"MemberSid": "S-1-5-21-987350600-1586923962-3403462686-1143",
"MemberDomain": "DOMAIN",
"MemberAccount": "doejo",
"MemberDisplayName": "John Doe",
"Enabled": true,
"ValidUntil": "2020-12-13T14:00:00"
}
Response
HTTP/1.1 201 Created
Content-Type: application/json
{
"Id": 1,
"DirectoryId": 2,
"TargetType": 3,
"TargetGuid": "91eba3a1-a803-4a22-b57f-94af33d1eda9",
"TargetName": "COMPUTER1",
"ManagedGroupId": 1,
"MemberId": 1,
"MemberSid": "S-1-5-21-987350600-1586923962-3403462686-1143",
"MemberDomain": "DOMAIN",
"MemberAccount": "doejo",
"MemberDisplayName": "John Doe",
"Enabled": true,
"ValidUntil": "2020-12-13T14:00:00"
}