PUT api/users/{id}/responsibilities

Requires authentication. Updates the user with the set of responsibilities contained in the request body. Any responsibilities not in the request but already associated with the user in CRM will be removed. To clear all responsibilities on the user, post an empty list. If successful returns "200 OK", with the body of the response containing a representation of the the user's responsibilities. If user not found, returns "404 Not Found" If CRM operations fail for an un-recoverable reason, the service returns "502 Bad Gateway" Any other server-side errors return "500 Internal Server Error"

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

globally unique identifier

Required

Body Parameters

Collection of Responsibility
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

Name

string

None.

TreeLevel1

string

None.

TreeLevel2

string

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "Id": "c9b6a397-f74a-4031-af46-70530eedd3b7",
    "Name": "sample string 2",
    "TreeLevel1": "sample string 3",
    "TreeLevel2": "sample string 4"
  },
  {
    "Id": "c9b6a397-f74a-4031-af46-70530eedd3b7",
    "Name": "sample string 2",
    "TreeLevel1": "sample string 3",
    "TreeLevel2": "sample string 4"
  }
]

application/xml, text/xml

Sample:
<ArrayOfResponsibility xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.Webservices.Domain">
  <Responsibility>
    <Id>c9b6a397-f74a-4031-af46-70530eedd3b7</Id>
    <Name>sample string 2</Name>
    <TreeLevel1>sample string 3</TreeLevel1>
    <TreeLevel2>sample string 4</TreeLevel2>
  </Responsibility>
  <Responsibility>
    <Id>c9b6a397-f74a-4031-af46-70530eedd3b7</Id>
    <Name>sample string 2</Name>
    <TreeLevel1>sample string 3</TreeLevel1>
    <TreeLevel2>sample string 4</TreeLevel2>
  </Responsibility>
</ArrayOfResponsibility>

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'.

Response Information

Resource Description

UserResponsibilitiesListRepresentation

UserResponsibilityListsRepresentation
NameDescriptionTypeAdditional information
Id

Unique identifier - same as in CRM

globally unique identifier

None.

TotalResults

Total number of results in the list

integer

None.

ResourceList

Collection of ResponsibilityRepresentation

None.

Links

Collection of Link

None.

Response Formats

application/json, text/json, application/hal+json, application/hal+xml

Sample:

Sample not available.