POST {authenticationKey}/{version}/Permissions/{userPublicKey}/Assign

Assigns permissions to a given user.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
userPublicKey

globally unique identifier

Required

authenticationKey

string

None.

version

string

None.

Body Parameters

Collection of AssignedPermissionModel
NameDescriptionTypeAdditional information
Name

string

Required

Max length: 64

Tag

string

Max length: 10240

Request Formats

application/json, text/json

Sample:
[
  {
    "Name": "sample string 1",
    "Tag": "sample string 2"
  },
  {
    "Name": "sample string 1",
    "Tag": "sample string 2"
  }
]

text/html

Sample:
[{"Name":"sample string 1","Tag":"sample string 2"},{"Name":"sample string 1","Tag":"sample string 2"}]

application/xml, text/xml

Sample:
<ArrayOfAssignedPermissionModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Toluna.TEF.Common.ViewModels.Membership">
  <AssignedPermissionModel>
    <Name>sample string 1</Name>
    <Tag>sample string 2</Tag>
  </AssignedPermissionModel>
  <AssignedPermissionModel>
    <Name>sample string 1</Name>
    <Tag>sample string 2</Tag>
  </AssignedPermissionModel>
</ArrayOfAssignedPermissionModel>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'List`1'.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.

Response Information

Resource Description

AuthenticationResult
NameDescriptionTypeAdditional information
Succeeded

boolean

None.

Errors

Collection of string

None.

ErrorCode

APIErrorCodes

None.

Response Formats

application/json, text/json

Sample:
{
  "ErrorCode": 0,
  "Succeeded": true,
  "Errors": [
    "sample string 1",
    "sample string 2"
  ]
}

text/html

Sample:
{"ErrorCode":0,"Succeeded":true,"Errors":["sample string 1","sample string 2"]}

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.