PUT api/users/{id}
PUT api/users/5d1b0b57-7535-4880-9aa5-1b71ffd76fff Request body should be user fields for the fields that are to be updated Currently only supports changes to FirstName, Lastname, Email, JobTitle, JobRole and Telephone All these values are optional, can be left out of request if not to be updated. If successful returns 200 OK and the new User record in the body For CRM faults returns 504 Bad Gateway If user body contains Login (which are invariant through this process) returns 400 Bad Request If user body contains Id it must be the same as the Id in the URL else returns 400 Bad Request If the user or jobRole are not known values then returns a 404 Not Found
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
id | globally unique identifier |
Required |
Body Parameters
UserName | Description | Type | Additional information |
---|---|---|---|
Id | globally unique identifier |
None. |
|
IdSource | integer |
None. |
|
Login | string |
None. |
|
FirstName | string |
None. |
|
LastName | string |
None. |
|
string |
None. |
||
Telephone | string |
None. |
|
OrgMemberNumber | string |
None. |
|
OrgId | globally unique identifier |
None. |
|
StatusValue | integer |
None. |
|
StatusLabel | string |
None. |
|
JobTitle | string |
None. |
|
JobRole | globally unique identifier |
None. |
|
InvitationCode | globally unique identifier |
None. |
|
XrmContactId | globally unique identifier |
None. |
Request Formats
application/json, text/json
{ "Id": "0f7145d7-4d4b-4cad-981b-67b1d91f4a51", "IdSource": 2, "Login": "sample string 3", "FirstName": "sample string 4", "LastName": "sample string 5", "Email": "sample string 6", "Telephone": "sample string 7", "OrgMemberNumber": "sample string 8", "OrgId": "7ee1786a-d34b-4ac4-9a4b-ebb74e8f697d", "StatusValue": 9, "StatusLabel": "sample string 10", "JobTitle": "sample string 11", "JobRole": "c3a9ab2f-7da3-427d-9f03-54a0e259fcc9", "InvitationCode": "e7781ae5-693d-48cc-96c3-fc3c1bc54086", "XrmContactId": "c28b6ab9-edde-411a-a551-124d7c5616e5" }
application/xml, text/xml
<User xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.Webservices.Domain"> <Email>sample string 6</Email> <FirstName>sample string 4</FirstName> <Id>0f7145d7-4d4b-4cad-981b-67b1d91f4a51</Id> <IdSource>2</IdSource> <InvitationCode>e7781ae5-693d-48cc-96c3-fc3c1bc54086</InvitationCode> <JobRole>c3a9ab2f-7da3-427d-9f03-54a0e259fcc9</JobRole> <JobTitle>sample string 11</JobTitle> <LastName>sample string 5</LastName> <Login>sample string 3</Login> <OrgId>7ee1786a-d34b-4ac4-9a4b-ebb74e8f697d</OrgId> <OrgMemberNumber>sample string 8</OrgMemberNumber> <StatusLabel>sample string 10</StatusLabel> <StatusValue>9</StatusValue> <Telephone>sample string 7</Telephone> <XrmContactId>c28b6ab9-edde-411a-a551-124d7c5616e5</XrmContactId> </User>
application/x-www-form-urlencoded
Response Information
Resource Description
UserRepresentationName | Description | Type | Additional information |
---|---|---|---|
Id |
Unique identifier - same as in CRM |
globally unique identifier |
None. |
LocalLogin |
Login for this system |
string |
None. |
IdSource |
The source of identity for this user. Defined values are: 0 = reserved for test suites; 1 = SSAT website |
integer |
None. |
FirstName |
First name |
string |
None. |
LastName |
last name |
string |
None. |
Email address |
string |
None. |
|
Telephone |
Main telephone number |
string |
None. |
OrgMemberNumber |
Organisation membership number |
string |
None. |
OrgId |
Organisation ID |
globally unique identifier |
None. |
StatusValue |
User status |
integer |
None. |
StatusLabel |
User status label |
string |
None. |
JobTitle |
Free text job title |
string |
None. |
JobRole |
Reference to job role from pre-set list |
globally unique identifier |
None. |
InvitationCode |
Most recent invitation code generated by CRM |
globally unique identifier |
None. |
XrmContactId |
Unique XRM Id for the associated contact (NB N:1 User:Contact) |
globally unique identifier |
None. |
Links | Collection of Link |
None. |
Response Formats
application/json
{ "Id": "365afacb-6be5-4b42-9495-8164c3b41b21", "LocalLogin": "sample string 2", "IdSource": 3, "FirstName": "sample string 4", "LastName": "sample string 5", "Email": "sample string 6", "Telephone": "sample string 7", "OrgMemberNumber": "sample string 8", "OrgId": "59d59187-b900-4eba-a32b-99d00e34e9b4", "StatusValue": 9, "StatusLabel": "sample string 10", "JobTitle": "sample string 11", "JobRole": "3e916974-7188-4748-bf74-8f636b3dd34a", "InvitationCode": "6d01eac5-a57a-4277-bffb-e0d8bb6e9ae0", "XrmContactId": "d561c9c0-a111-4a90-b50f-23adde571819", "_links": [ { "Rel": "self", "Href": "~/users/365afacb-6be5-4b42-9495-8164c3b41b21", "Title": null, "IsTemplated": false }, { "Rel": "sample string 1", "Href": "sample string 2", "Title": "sample string 3", "IsTemplated": false }, { "Rel": "sample string 1", "Href": "sample string 2", "Title": "sample string 3", "IsTemplated": false }, { "Rel": "roles", "Href": "~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles", "Title": null, "IsTemplated": false }, { "Rel": "subjects", "Href": "~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects", "Title": null, "IsTemplated": false } ], "_embedded": null }
text/json
{ "Id": "365afacb-6be5-4b42-9495-8164c3b41b21", "LocalLogin": "sample string 2", "IdSource": 3, "FirstName": "sample string 4", "LastName": "sample string 5", "Email": "sample string 6", "Telephone": "sample string 7", "OrgMemberNumber": "sample string 8", "OrgId": "59d59187-b900-4eba-a32b-99d00e34e9b4", "StatusValue": 9, "StatusLabel": "sample string 10", "JobTitle": "sample string 11", "JobRole": "3e916974-7188-4748-bf74-8f636b3dd34a", "InvitationCode": "6d01eac5-a57a-4277-bffb-e0d8bb6e9ae0", "XrmContactId": "d561c9c0-a111-4a90-b50f-23adde571819", "_links": [ { "Rel": "self", "Href": "~/users/365afacb-6be5-4b42-9495-8164c3b41b21", "Title": null, "IsTemplated": false }, { "Rel": "sample string 1", "Href": "sample string 2", "Title": "sample string 3", "IsTemplated": false }, { "Rel": "sample string 1", "Href": "sample string 2", "Title": "sample string 3", "IsTemplated": false }, { "Rel": "roles", "Href": "~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles", "Title": null, "IsTemplated": false }, { "Rel": "subjects", "Href": "~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects", "Title": null, "IsTemplated": false }, { "Rel": "roles", "Href": "~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles", "Title": null, "IsTemplated": false }, { "Rel": "subjects", "Href": "~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects", "Title": null, "IsTemplated": false } ], "_embedded": null }
application/xml
<UserRepresentation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.WebServices.WebApp.Representations.Version1"> <Href xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">~/users/365afacb-6be5-4b42-9495-8164c3b41b21</Href> <LinkName xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 15</LinkName> <Links xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal"> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21</Href> <Rel>self</Rel> <Title i:nil="true" /> </Link> <Link> <Href>sample string 2</Href> <Rel>sample string 1</Rel> <Title>sample string 3</Title> </Link> <Link> <Href>sample string 2</Href> <Rel>sample string 1</Rel> <Title>sample string 3</Title> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles</Href> <Rel>roles</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects</Href> <Rel>subjects</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles</Href> <Rel>roles</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects</Href> <Rel>subjects</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles</Href> <Rel>roles</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects</Href> <Rel>subjects</Rel> <Title i:nil="true" /> </Link> </Links> <Rel xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 13</Rel> <Email>sample string 6</Email> <FirstName>sample string 4</FirstName> <Id>365afacb-6be5-4b42-9495-8164c3b41b21</Id> <IdSource>3</IdSource> <InvitationCode>6d01eac5-a57a-4277-bffb-e0d8bb6e9ae0</InvitationCode> <JobRole>3e916974-7188-4748-bf74-8f636b3dd34a</JobRole> <JobTitle>sample string 11</JobTitle> <LastName>sample string 5</LastName> <LocalLogin>sample string 2</LocalLogin> <OrgId>59d59187-b900-4eba-a32b-99d00e34e9b4</OrgId> <OrgMemberNumber>sample string 8</OrgMemberNumber> <StatusLabel>sample string 10</StatusLabel> <StatusValue>9</StatusValue> <Telephone>sample string 7</Telephone> <XrmContactId>d561c9c0-a111-4a90-b50f-23adde571819</XrmContactId> </UserRepresentation>
text/xml
<UserRepresentation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SSAT.WebServices.WebApp.Representations.Version1"> <Href xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">~/users/365afacb-6be5-4b42-9495-8164c3b41b21</Href> <LinkName xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 15</LinkName> <Links xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal"> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21</Href> <Rel>self</Rel> <Title i:nil="true" /> </Link> <Link> <Href>sample string 2</Href> <Rel>sample string 1</Rel> <Title>sample string 3</Title> </Link> <Link> <Href>sample string 2</Href> <Rel>sample string 1</Rel> <Title>sample string 3</Title> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles</Href> <Rel>roles</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects</Href> <Rel>subjects</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles</Href> <Rel>roles</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects</Href> <Rel>subjects</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles</Href> <Rel>roles</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects</Href> <Rel>subjects</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles</Href> <Rel>roles</Rel> <Title i:nil="true" /> </Link> <Link> <Href>~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects</Href> <Rel>subjects</Rel> <Title i:nil="true" /> </Link> </Links> <Rel xmlns="http://schemas.datacontract.org/2004/07/WebApi.Hal">sample string 13</Rel> <Email>sample string 6</Email> <FirstName>sample string 4</FirstName> <Id>365afacb-6be5-4b42-9495-8164c3b41b21</Id> <IdSource>3</IdSource> <InvitationCode>6d01eac5-a57a-4277-bffb-e0d8bb6e9ae0</InvitationCode> <JobRole>3e916974-7188-4748-bf74-8f636b3dd34a</JobRole> <JobTitle>sample string 11</JobTitle> <LastName>sample string 5</LastName> <LocalLogin>sample string 2</LocalLogin> <OrgId>59d59187-b900-4eba-a32b-99d00e34e9b4</OrgId> <OrgMemberNumber>sample string 8</OrgMemberNumber> <StatusLabel>sample string 10</StatusLabel> <StatusValue>9</StatusValue> <Telephone>sample string 7</Telephone> <XrmContactId>d561c9c0-a111-4a90-b50f-23adde571819</XrmContactId> </UserRepresentation>
application/hal+json
{ "Id": "365afacb-6be5-4b42-9495-8164c3b41b21", "LocalLogin": "sample string 2", "IdSource": 3, "FirstName": "sample string 4", "LastName": "sample string 5", "Email": "sample string 6", "Telephone": "sample string 7", "OrgMemberNumber": "sample string 8", "OrgId": "59d59187-b900-4eba-a32b-99d00e34e9b4", "StatusValue": 9, "StatusLabel": "sample string 10", "JobTitle": "sample string 11", "JobRole": "3e916974-7188-4748-bf74-8f636b3dd34a", "InvitationCode": "6d01eac5-a57a-4277-bffb-e0d8bb6e9ae0", "XrmContactId": "d561c9c0-a111-4a90-b50f-23adde571819", "_links": { "self": { "href": "/users/365afacb-6be5-4b42-9495-8164c3b41b21" }, "sample string 1": { "href": "sample string 2", "title": "sample string 3" }, "roles": { "href": "/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles" }, "subjects": { "href": "/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects" } } }
application/hal+xml
<resource rel="sample string 13" href="~/users/365afacb-6be5-4b42-9495-8164c3b41b21" name="sample string 15"> <link rel="sample string 1" href="sample string 2" /> <link rel="roles" href="~/users/365afacb-6be5-4b42-9495-8164c3b41b21/roles" /> <link rel="subjects" href="~/users/365afacb-6be5-4b42-9495-8164c3b41b21/subjects" /> <Id>365afacb-6be5-4b42-9495-8164c3b41b21</Id> <LocalLogin>sample string 2</LocalLogin> <IdSource>3</IdSource> <FirstName>sample string 4</FirstName> <LastName>sample string 5</LastName> <Email>sample string 6</Email> <Telephone>sample string 7</Telephone> <OrgMemberNumber>sample string 8</OrgMemberNumber> <OrgId>59d59187-b900-4eba-a32b-99d00e34e9b4</OrgId> <StatusValue>9</StatusValue> <StatusLabel>sample string 10</StatusLabel> <JobTitle>sample string 11</JobTitle> <JobRole>3e916974-7188-4748-bf74-8f636b3dd34a</JobRole> <InvitationCode>6d01eac5-a57a-4277-bffb-e0d8bb6e9ae0</InvitationCode> <XrmContactId>d561c9c0-a111-4a90-b50f-23adde571819</XrmContactId> </resource>