POST api/users/{id}/subjects

Requires authentication. Updates the user with the set of subjects contained in the request body. To clear all subjects, send an empty list If successful returns "200 OK", with the body of the response containing a representation of the the user's subjects. 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 Subject
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

Name

string

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "Id": "12494283-e55f-49a2-adae-662fb41d2918",
    "Name": "sample string 2"
  },
  {
    "Id": "12494283-e55f-49a2-adae-662fb41d2918",
    "Name": "sample string 2"
  }
]

application/xml, text/xml

Sample:
<ArrayOfSubject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.Webservices.Domain">
  <Subject>
    <Id>12494283-e55f-49a2-adae-662fb41d2918</Id>
    <Name>sample string 2</Name>
  </Subject>
  <Subject>
    <Id>12494283-e55f-49a2-adae-662fb41d2918</Id>
    <Name>sample string 2</Name>
  </Subject>
</ArrayOfSubject>

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

UserSubjectsListRepresentation

UserSubjectListsRepresentation
NameDescriptionTypeAdditional information
Id

Unique identifier - same as in CRM

globally unique identifier

None.

TotalResults

integer

None.

ResourceList

Collection of SubjectRepresentation

None.

Links

Collection of Link

None.

Response Formats

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

Sample:

Sample not available.